瀏覽代碼

Hdie tabs while initializing

Denis K 8 年之前
父節點
當前提交
3d77951296
共有 2 個文件被更改,包括 14 次插入1 次删除
  1. 12 1
      jet/static/jet/css/_changeform.scss
  2. 2 0
      jet/static/jet/js/src/layout-updaters/changeform-tabs.js

+ 12 - 1
jet/static/jet/css/_changeform.scss

@@ -856,10 +856,21 @@ form .related-widget-wrapper ul {
   }
 
   ~ .module, ~ .inline-group {
-    display: none;
+    display: none !important;
     border-radius: 0 0 4px 4px;
 
     &.selected {
+      display: block !important;
+    }
+  }
+}
+
+
+body.change-form #content-main > form > div {
+  > .module, > .inline-group {
+    display: none;
+
+    &.initialized {
       display: block;
     }
   }

+ 2 - 0
jet/static/jet/js/src/layout-updaters/changeform-tabs.js

@@ -75,6 +75,8 @@ ChangeFormTabsUpdater.prototype = {
         } catch (e) {
             console.error(e, e.stack);
         }
+
+        $contentWrappers.addClass('initialized');
     }
 };