]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Fix for bug 98021: Cleans up "edit attachment" interface on NS4.x by removing text...
authormyk%mozilla.org <>
Sat, 2 Feb 2002 01:50:00 +0000 (01:50 +0000)
committermyk%mozilla.org <>
Sat, 2 Feb 2002 01:50:00 +0000 (01:50 +0000)
Patch by Myk Melez <myk@mozilla.org>.
r=kiko x 2

template/default/attachment/edit.atml

index 49984dc000bed8c79f8d6a3fa5d6494b9fdc8eec..61452145a4bf0fd0563991cc325ca8973f89552a 100755 (executable)
             <b>You cannot view the attachment while editing it because your browser does not support IFRAMEs.
             <a href="attachment.cgi?id=[% attachid %]&action=view">View the attachment on a separate page</a>.</b>
           </iframe>
-          <button id="editButton" onclick="editAsComment();">Edit Attachment As Comment</button>
-          <button id="undoEditButton" onclick="undoEditAsComment();" style="display: none;">Undo Edit As Comment</button>
-          <button id="redoEditButton" onclick="redoEditAsComment();" style="display: none;">Redo Edit As Comment</button>
+          <script type="application/x-javascript" language="JavaScript">
+            <!--
+            if (typeof document.getElementById == "function") {
+              document.write('<button id="editButton" onclick="editAsComment();">Edit Attachment As Comment</button>');
+              document.write('<button id="undoEditButton" onclick="undoEditAsComment();" style="display: none;">Undo Edit As Comment</button>');
+              document.write('<button id="redoEditButton" onclick="redoEditAsComment();" style="display: none;">Redo Edit As Comment</button>');
+            }
+            //-->
+          </script>
         </td>
       [% ELSE %]
         <td id="noview" width="50%">
 </form>
 
 <script type="application/x-javascript" language="JavaScript">
+  <!--
   function editAsComment()
     {
       // Get the content of the document as a string.
       big.parentNode.removeChild(big);
     }
   }
+  //-->
 </script>
 
 <br>