From: Kohei Yoshino Date: Tue, 25 Jun 2019 20:10:26 +0000 (-0400) Subject: Bug 1545002 - Clicking on "Reply to this comment" on a private comment should automat... X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bd0b5af7d8aaae874560f2f5ce11581e4f55fba2;p=thirdparty%2Fbugzilla.git Bug 1545002 - Clicking on "Reply to this comment" on a private comment should automatically check the private checkbox --- diff --git a/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl index 20b4ee014..5d33e8649 100644 --- a/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl +++ b/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl @@ -142,7 +142,8 @@ [% END %] diff --git a/extensions/BugModal/web/bug_modal.js b/extensions/BugModal/web/bug_modal.js index 9a33a7aae..d56d4a8f1 100644 --- a/extensions/BugModal/web/bug_modal.js +++ b/extensions/BugModal/web/bug_modal.js @@ -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 {