[TikiWiki-commits] [Git][tikiwiki/tiki][30.x] [BP][FIX] Tracker Comments: Fix collapsible comments expansion when item...

"luci \(@luciash\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6a8e96f68b28f_3818d710369b@gitlab-sidekiq-low-urgency-cpu-bound-v2-6667565cdc-df7x4.mail>

luci pushed to branch 30.x at Tiki Wiki CMS Groupware / Tiki


Commits:
252fe0c3 by Moïse Nturubika at 2026-08-26T07:26:15+00:00
[BP][FIX] Tracker Comments: Fix collapsible comments expansion when item history version diff is present
---
* [FIX] Tracker Comments: Fix collapsible comments expansion when item history version diff is present
---
* Fix collapsible comments expansion when version diff is present

See merge request tikiwiki/tiki!10198

(cherry picked from commit c91f74f90cd5cf3aed97ea7f0c828f57765a76f2)

See merge request tikiwiki/tiki!11060

- - - - -


1 changed file:

- templates/comment/list.tpl


Changes:

=====================================
templates/comment/list.tpl
=====================================
@@ -38,7 +38,8 @@
                         var hash = window.location.hash;
                         $('.comment-thread-wrapper[data-resolved="true"]').each(function() {
                             var $wrapper = $(this);
-                            var $collapse = $wrapper.find('.collapse').first();
+                            var threadId = $wrapper.data('comment-thread-id');
+                            var $collapse = $wrapper.find('#comment-thread-body-' + threadId);
                             if ($collapse.length) {
                                 var shouldExpand = false;
                                 if (hash && hash.match(/^#threadId=?\d+/)) {
@@ -82,12 +83,12 @@
                     $(document).off('click.resolved').on('click.resolved', '.comment-resolved-header', function() {
                         // Toggle handled by Bootstrap collapse
                     });
-                    $(document).on('shown.bs.collapse', '.comment-thread-wrapper .collapse', function() {
+                    $(document).on('shown.bs.collapse', '.comment-thread-wrapper .collapse[id^="comment-thread-body-"]', function () {
                         var $wrapper = $(this).closest('.comment-thread-wrapper');
                         $wrapper.find('.comment-collapse-icon').addClass('comment-collapse-icon-open');
                         $wrapper.find('.comment-resolved-header').attr('aria-expanded', 'true');
                     });
-                    $(document).on('hidden.bs.collapse', '.comment-thread-wrapper .collapse', function() {
+                    $(document).on('hidden.bs.collapse', '.comment-thread-wrapper .collapse[id^="comment-thread-body-"]', function () {
                         var $wrapper = $(this).closest('.comment-thread-wrapper');
                         $wrapper.find('.comment-collapse-icon').removeClass('comment-collapse-icon-open');
                         $wrapper.find('.comment-resolved-header').attr('aria-expanded', 'false');



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/252fe0c3f866d53d744c01773c58e2297ebe4343

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/252fe0c3f866d53d744c01773c58e2297ebe4343
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.