From: David Lawrence Date: Mon, 22 Dec 2014 19:18:01 +0000 (+0000) Subject: Bug 1093924: Move replyToMarkdownComment() and replyToComment() out of templates X-Git-Tag: release-5.1.1~409 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be26c119991e5e4e6ec28a881bc0860a4cd9aefc;p=thirdparty%2Fbugzilla.git Bug 1093924: Move replyToMarkdownComment() and replyToComment() out of templates r=LpSolit,a=glob --- diff --git a/js/comments.js b/js/comments.js index 43e6fe96ec..30baf53f4b 100644 --- a/js/comments.js +++ b/js/comments.js @@ -6,6 +6,69 @@ * defined by the Mozilla Public License, v. 2.0. */ +/* Adds the reply text to the 'comment' textarea */ +function replyToComment(id, real_id, replyto_header, text) { + var replytext = ""; + if (replyCommentConfig.quote_replies == 'quoted_reply') { + /* pre id="comment_name_N" */ + if (text == null) { + var text_elem = document.getElementById('comment_text_'+id); + text = getText(text_elem); + } + replytext = replyto_header + "\n" + wrapReplyText(text); + } else if (replyCommentConfig.quote_replies == 'simple_reply') { + replytext = replyto_header + "\n"; + } + + if (replyCommentConfig.is_insider) { + if (document.getElementById('isprivate_' + real_id).checked) { + document.getElementById('newcommentprivacy').checked = 'checked'; + updateCommentTagControl(document.getElementById('newcommentprivacy'), 'comment'); + } + } + + /*