From 4d1b66af361378015042bc3d73d83c12de58621d Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Wed, 8 Aug 2007 06:49:25 +0000 Subject: Bug 225731: Implement a user pref to choose if clicking the "Reply" link of a comment should qutote the comment or not, or only its ID - Patch by Albert Ting r/a=LpSolit --- template/en/default/bug/edit.html.tmpl | 39 ++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 16 deletions(-) (limited to 'template/en/default/bug/edit.html.tmpl') diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl index a7bef1ff5..61f5221ad 100644 --- a/template/en/default/bug/edit.html.tmpl +++ b/template/en/default/bug/edit.html.tmpl @@ -37,27 +37,34 @@ /* XXX this should really be updated to use the DOM Core's * createElement, but finding a container isn't trivial. */ - document.write('[reply<' + '/a>]'); + [% IF user.settings.quote_replies.value != 'off' %] + document.write('[reply<' + '/a>]'); + [% END %] } /* Adds the reply text to the `comment' textarea */ function replyToComment(id) { - /* pre id="comment_name_N" */ - var text_elem = document.getElementById('comment_text_'+id); - var text = getText(text_elem); - - /* make sure we split on all newlines -- IE or Moz use \r and \n - * respectively. - */ - text = text.split(/\r|\n/); - + var prefix = "(In reply to comment #" + id + ")\n"; var replytext = ""; - for (var i=0; i < text.length; i++) { - replytext += "> " + text[i] + "\n"; - } - - replytext = "(In reply to comment #" + id + ")\n" + replytext + "\n"; + [% IF user.settings.quote_replies.value == 'quoted_reply' %] + /* pre id="comment_name_N" */ + var text_elem = document.getElementById('comment_text_'+id); + var text = getText(text_elem); + + /* make sure we split on all newlines -- IE or Moz use \r and \n + * respectively. + */ + text = text.split(/\r|\n/); + + for (var i=0; i < text.length; i++) { + replytext += "> " + text[i] + "\n"; + } + + replytext = prefix + replytext + "\n"; + [% ELSIF user.settings.quote_replies.value == 'simple_reply' %] + replytext = prefix; + [% END %] [% IF Param("insidergroup") && user.in_group(Param("insidergroup")) %] if (document.getElementById('isprivate-'+id).checked) { -- cgit v1.2.3-24-g4f1b