]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 108547 - Make the JavaScript use proper DOM
authorjake%acutex.net <>
Wed, 7 Nov 2001 22:58:56 +0000 (22:58 +0000)
committerjake%acutex.net <>
Wed, 7 Nov 2001 22:58:56 +0000 (22:58 +0000)
Patch by Christopher Aillon <caillon@returnzero.com>
r= timeless@bemail.org, kiko@async.com.br

template/default/attachment/edit.atml

index ac9f327d032f06c646e46403750e9babca9acbe7..ee6d005e7a3edca36e7e89e221a4575f3ef5f061 100755 (executable)
   function hideElementById(id)
   {
     var elm = document.getElementById(id);
-    if (!elm) return;
-
-    elm.style.setProperty('display', 'none', '');
+    if (elm) {
+      elm.style.display = 'none';
+    }
   }
 
   function showElementById(id, val)
   {
     var elm = document.getElementById(id);
-    if (!elm) return;
-
-    if (!val) val = 'inline';
-    elm.style.setProperty('display', val, '');
+    if (elm) {
+      if (!val) val = 'inline';
+      elm.style.display = val;
+    }
   }
 
   function normalizeComments()
 
     var small = document.getElementById('smallCommentFrame');
     var big = document.getElementById('editFrame');
-    if ( small.style.getProperty('display') == 'none' )
+    if ( small.style.display == 'none' )
     {
       small.parentNode.removeChild(small);
     }
-    if ( big.style.getProperty('display') == 'none' )
+    if ( big.style.display == 'none' )
     {
       big.parentNode.removeChild(big);
     }
-    
   }
 </script>