]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1545002 - Clicking on "Reply to this comment" on a private comment should automat...
authorKohei Yoshino <kohei.yoshino@gmail.com>
Tue, 25 Jun 2019 20:10:26 +0000 (16:10 -0400)
committerGitHub <noreply@github.com>
Tue, 25 Jun 2019 20:10:26 +0000 (16:10 -0400)
extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl
extensions/BugModal/web/bug_modal.js

index 20b4ee014845bc303bfaee494a9d7d20ba8cf506..5d33e8649bdd2461201568ff9e073f4ff10172e8 100644 (file)
               </button>
             [% END %]
             <button type="button" class="reply-btn minor iconic" title="Reply to this comment" aria-label="Reply"
-                    [% 'disabled' IF !comment.body %] data-reply-id="[% comment.count FILTER none %]"
+                    [% 'disabled' IF !comment.body %]
+                    data-id="[% comment.id FILTER none %]" data-no="[% comment.count FILTER none %]"
                     data-reply-name="[% comment.author.name || comment.author.nick FILTER html %]">
               <span class="icon" aria-hidden="true"></span>
             </button>
index 9a33a7aae154b30a8a727b9544f2f3cf03a4a748..d56d4a8f1fa7d7fd795ddfc0fbb909bad8328850 100644 (file)
@@ -892,10 +892,11 @@ $(function() {
     $('.reply-btn')
         .click(function(event) {
             event.preventDefault();
-            var comment_id = $(event.target).data('reply-id');
+            var comment_id = $(event.target).data('id');
+            var comment_no = $(event.target).data('no');
             var comment_author = $(event.target).data('reply-name');
 
-            var prefix = "(In reply to " + comment_author + " from comment #" + comment_id + ")\n";
+            var prefix = "(In reply to " + comment_author + " from comment #" + comment_no + ")\n";
             var reply_text = "";
 
             var quoteMarkdown = function($comment) {
@@ -934,7 +935,7 @@ $(function() {
             }
 
             if (BUGZILLA.user.settings.quote_replies == 'quoted_reply') {
-                var $comment = $('#ct-' + comment_id);
+                var $comment = $('#ct-' + comment_no);
                 if ($comment.attr('data-ismarkdown')) {
                     quoteMarkdown($comment);
                 } else {