]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 404412: Couldn't edit comments anymore because of a regression from bug 401957.
authormkanat%bugzilla.org <>
Wed, 21 Nov 2007 07:06:22 +0000 (07:06 +0000)
committermkanat%bugzilla.org <>
Wed, 21 Nov 2007 07:06:22 +0000 (07:06 +0000)
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit

template/en/default/bug/comments.html.tmpl
template/en/default/bug/edit.html.tmpl

index 7a0020d473a915497f6ec88f5ae9e4c51263e8fb..1fc5d46d362f24d1ca3c71529062e226a93e7649 100644 (file)
         [% IF mode == "edit" %]
           <script type="text/javascript"><!--
             addCollapseLink([% count %]);
-            addReplyLink([% count %]); //-->
+            addReplyLink([% count %], [% comment.id %]); //-->
           </script>
         [% END %]
         [%+ decoration FILTER none %]
index a43fd225f8ad9ef2ead9f2a3058617346c567bff..e2ce068e41fa81d2a38dd8c8130205866fd87664 100644 (file)
   <!--
 
   /* Outputs a link to call replyToComment(); used to reduce HTML output */
-  function addReplyLink(id) {
+  function addReplyLink(id, real_id) {
       /* XXX this should really be updated to use the DOM Core's
        * createElement, but finding a container isn't trivial.
        */
       [% IF user.settings.quote_replies.value != 'off' %]
         document.write('[<a href="#add_comment" onclick="replyToComment(' + 
-                       id + ');">reply<' + '/a>]');
+                       id + ',' + real_id + ');">reply<' + '/a>]');
       [% END %]
   }
 
   /* Adds the reply text to the `comment' textarea */
-  function replyToComment(id) {
+  function replyToComment(id, real_id) {
       var prefix = "(In reply to comment #" + id + ")\n";
       var replytext = "";
       [% IF user.settings.quote_replies.value == 'quoted_reply' %]
@@ -66,7 +66,7 @@
       [% END %]
 
     [% IF Param("insidergroup") && user.in_group(Param("insidergroup")) %]
-      if (document.getElementById('isprivate-'+id).checked) {
+      if (document.getElementById('isprivate_' + real_id).checked) {
           document.getElementById('newcommentprivacy').checked = 'checked';
       }
     [% END %]