Browse Source

original display fixes for boolean turn off and on

Ivan Asmer 8 years ago
parent
commit
670d0e07af
1 changed files with 8 additions and 1 deletions
  1. 8 1
      static/nb.js

+ 8 - 1
static/nb.js

@@ -106,7 +106,7 @@ function nbInit(a,b){
                     item.style.display = "originalDisplay" in item ? item.originalDisplay : "";
                 }
                 else {
-                    item.originalDisplay = item.style.display;
+                    item.originalDisplay = "originalDisplay" in item ? item.originalDisplay : item.style.display;
                     item.style.display   = "none";
                 }
                 return;
@@ -264,3 +264,10 @@ function nbInit(a,b){
 
     return scopeProxy;
 }
+
+function nbGetData(el){
+    while (!('nbData' in el)){
+        el = el.parentElement || return null;
+    }
+    return el.nbData;
+}