Roo/bootstrap/Navbar.js
authorEdward <edward@roojs.com>
Thu, 12 Jun 2014 06:38:31 +0000 (14:38 +0800)
committerEdward <edward@roojs.com>
Thu, 12 Jun 2014 06:38:31 +0000 (14:38 +0800)
Roo/bootstrap/NavGroup.js

Roo/bootstrap/NavGroup.js
Roo/bootstrap/Navbar.js

index d79effd..aeb97f7 100644 (file)
@@ -12,6 +12,7 @@
  * @cfg {String} align left | right
  * @cfg {Boolean} inverse false | true
  * @cfg {String} type (nav|pills|tab) default nav
+ * @cfg {Boolean} disable (true|false) disable the bar, add marks
  * 
  * @constructor
  * Create a new nav group
@@ -28,6 +29,7 @@ Roo.extend(Roo.bootstrap.NavGroup, Roo.bootstrap.Component,  {
     inverse: false,
     form: false,
     type: 'nav',
+    disable : false,
     
     getAutoCreate : function(){
         var cfg = Roo.apply({}, Roo.bootstrap.NavGroup.superclass.getAutoCreate.call(this));
@@ -79,7 +81,34 @@ Roo.extend(Roo.bootstrap.NavGroup, Roo.bootstrap.Component,  {
         
         
         return cfg;
-    }
+    },
+    
+    initEvents :function ()
+    {
+        Roo.bootstrap.NavGroup.superclass.initEvents.call(this);
+        
+        var mark = {
+            tag: "div",
+            cls:"x-dlg-mask"
+        }
+        
+        this.maskEl = Roo.DomHelper.append(this.el, mark, true);
+        
+        var size = this.el.getSize();
+        if(this.disable && this.sidebar){
+            Roo.log('size!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!');
+            Roo.log(this.el);
+            var a = this.el.select('.dashboard-menu', true).first();
+            Roo.log(a);
+            
+        }
+        this.maskEl.setSize(size.width, size.height);
+        this.maskEl.enableDisplayMode("block");
+        
+        if(this.disable){
+            this.maskEl.show();
+        }
+    },
    
 });
 
index 688fe01..33fd0ff 100644 (file)
@@ -44,7 +44,6 @@ Roo.extend(Roo.bootstrap.Navbar, Roo.bootstrap.Component,  {
     arrangement: '',
     brand_href: false,
     main : false,
-    disable : false,
     
     getAutoCreate : function(){
         var cfg = {