From bd0b5af7d8aaae874560f2f5ce11581e4f55fba2 Mon Sep 17 00:00:00 2001 From: Kohei Yoshino Date: Tue, 25 Jun 2019 16:10:26 -0400 Subject: [PATCH] Bug 1545002 - Clicking on "Reply to this comment" on a private comment should automatically check the private checkbox --- .../en/default/bug_modal/activity_stream.html.tmpl | 3 ++- extensions/BugModal/web/bug_modal.js | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) 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 { -- 2.47.3