Commits

Anonymous committed 1d25625

0.13dev: Follow-up to [10687], fixed ticket comment threading, and improved its performance.

  • Participants
  • Parent commits eab1be2
  • Branches trunk

Comments (0)

Files changed (1)

File trac/htdocs/js/threaded_comments.js

       comments.each(function() {
         var children = $("a.follow-up", this).map(function() {
           var cnum = $(this).attr("href").replace('#comment:', '');
-          return $('#trac-change-' + cnum).get(0);
+          return $('[id^="trac-change-' + cnum + '-"]').get(0);
         });
         if (children.length) {
           var ul = $('<ul class="children"></ul>').appendTo(this);
         }
       });
     } else {
-      if (comments)
-        comments.each(function() {
-          $("#changelog").append(comments);
-          $("ul.children").remove();
-        });
+      if (comments) {
+        $("#changelog").append(comments);
+        $("#changelog ul.children").remove();
+      }
     }
   });
   if ($("a.follow-up").length)