docs/resources/page.js
authorAlan Knowles <alan@akbkhome.com>
Wed, 2 Jun 2010 10:11:21 +0000 (18:11 +0800)
committerAlan Knowles <alan@akbkhome.com>
Wed, 2 Jun 2010 10:11:21 +0000 (18:11 +0800)
docs/resources/page.js

index 3d7c49c..cf6d9ff 100755 (executable)
@@ -126,11 +126,22 @@ RooDocsPage = {
             
         } 
         return d.getAttributeNS(ns, name) || d.getAttribute(ns+":"+name) || d.getAttribute(name) || d[name];
+    },
+    display : '',      
+    toggle : function () {
+        display  = display == 'none' ? '': 'none';
+        Array.prototype.slice.call(
+           document.getElementsByTagName('tr')
+        ).forEach(function(tr) {
+           tr.style.display = ''; 
+           if (tr.className.match(/notInherited/)) return;
+           if (!tr.className.match(/expandable/)) return;
+           tr.style.display = display; 
+        });
     }
-    
 }
 
-
  /*
 this.preview.getEl().on('click', function(e, target)
         {