docs/resources/page.js
[gnome.introspection-doc-generator] / 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)
         {