Roo/bootstrap/NavGroup.js
authorAlan Knowles <alan@roojs.com>
Tue, 22 Jul 2014 08:25:13 +0000 (16:25 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 22 Jul 2014 08:25:13 +0000 (16:25 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

Roo/bootstrap/NavGroup.js
roojs-bootstrap-debug.js
roojs-bootstrap.js

index 0417a8b..c287b4d 100644 (file)
@@ -138,7 +138,7 @@ Roo.extend(Roo.bootstrap.NavGroup, Roo.bootstrap.Component,  {
             
         });
         return ret;
-    
+    }
 });
 
  
index 2f14fde..8039d6b 100644 (file)
@@ -2368,7 +2368,7 @@ Roo.extend(Roo.bootstrap.NavGroup, Roo.bootstrap.Component,  {
             
         });
         return ret;
-    
+    }
 });
 
  
index f623dce..58f0bcb 100644 (file)
@@ -57,8 +57,8 @@ A.cn=[{cls:'nav',tag:'ul'}];if(['tabs','pills'].indexOf(this.type)!==-1){A.cn[0]
 A.cn[0].cls+=' navbar-nav'}if(['stacked','justified'].indexOf(this.arrangement)!==-1){A.cn[0].cls+=' nav-'+this.arrangement;}if(this.align==='right'){A.cn[0].cls+=' navbar-right';}if(this.inverse){A.cls+=' navbar-inverse';}return A;},initEvents:function(){this.el.select('.navbar-toggle',true).on('click',function(){this.el.select('.navbar-collapse',true).toggleClass('in');},this);var A={tag:"div",cls:"x-dlg-mask"}
 this.maskEl=Roo.DomHelper.append(this.el,A,true);var B=this.el.getSize();this.maskEl.setSize(B.width,B.height);this.maskEl.enableDisplayMode("block");this.maskEl.hide();if(this.loadMask){this.maskEl.show();}},getChildContainer:function(){if(this.bar===true){return this.el.select('.collapse',true).first();}return this.el;},mask:function(){this.maskEl.show();},unmask:function(){this.maskEl.hide();}});
 //Roo/bootstrap/NavGroup.js
-Roo.bootstrap.NavGroup=function(A){Roo.bootstrap.NavGroup.superclass.constructor.call(this,A);this.navItems=[];Roo.bootstrap.NavGroup.register(this);this.addEvents({'changed':true});};Roo.extend(Roo.bootstrap.NavGroup,Roo.bootstrap.Component,{align:'',inverse:false,form:false,type:'nav',navId:'',navItems:false,getAutoCreate:function(){var cfg=Roo.apply({},Roo.bootstrap.NavGroup.superclass.getAutoCreate.call(this));cfg={tag:'ul',cls:'nav'};if(['tabs','pills'].indexOf(this.type)!==-1){cfg.cls+=' nav-'+this.type}else {if(this.type!=='nav'){Roo.log('nav type must be nav/tabs/pills')}
-cfg.cls+=' navbar-nav'}if(this.parent().sidebar===true){cfg={tag:'ul',cls:'dashboard-menu'};return cfg;}if(this.form===true){cfg={tag:'form',cls:'navbar-form'};if(this.align==='right'){cfg.cls+=' navbar-right';}else {cfg.cls+=' navbar-left';}}if(this.align==='right'){cfg.cls+=' navbar-right';}if(this.inverse){cfg.cls+=' navbar-inverse';}return cfg;},setActiveItem:function(item){var prev=false;Roo.each(this.navItems,function(v){if(v.isActive()){v.setActive(false,true);prev=v;}});item.el.setActive('active',true);this.fireEvent('changed',this,item,prev);},register:function(item){this.navItems.push(item);item.navId=this.navId;},getNavItem:function(tabId){var ret=false;Roo.each(this.navItems,function(e){if(e.tabId==tabId){ret=e;return true;}return false;});return ret;});Roo.apply(Roo.bootstrap.NavGroup,{groups:{},register:function(A){this.groups[A.navId]=A;},get:function(A){return this.groups[A];}});
+Roo.bootstrap.NavGroup=function(A){Roo.bootstrap.NavGroup.superclass.constructor.call(this,A);this.navItems=[];Roo.bootstrap.NavGroup.register(this);this.addEvents({'changed':true});};Roo.extend(Roo.bootstrap.NavGroup,Roo.bootstrap.Component,{align:'',inverse:false,form:false,type:'nav',navId:'',navItems:false,getAutoCreate:function(){var A=Roo.apply({},Roo.bootstrap.NavGroup.superclass.getAutoCreate.call(this));A={tag:'ul',cls:'nav'};if(['tabs','pills'].indexOf(this.type)!==-1){A.cls+=' nav-'+this.type}else {if(this.type!=='nav'){Roo.log('nav type must be nav/tabs/pills')}
+A.cls+=' navbar-nav'}if(this.parent().sidebar===true){A={tag:'ul',cls:'dashboard-menu'};return A;}if(this.form===true){A={tag:'form',cls:'navbar-form'};if(this.align==='right'){A.cls+=' navbar-right';}else {A.cls+=' navbar-left';}}if(this.align==='right'){A.cls+=' navbar-right';}if(this.inverse){A.cls+=' navbar-inverse';}return A;},setActiveItem:function(A){var B=false;Roo.each(this.navItems,function(v){if(v.isActive()){v.setActive(false,true);B=v;}});A.el.setActive('active',true);this.fireEvent('changed',this,A,B);},register:function(A){this.navItems.push(A);A.navId=this.navId;},getNavItem:function(A){var B=false;Roo.each(this.navItems,function(e){if(e.tabId==A){B=e;return true;}return false;});return B;}});Roo.apply(Roo.bootstrap.NavGroup,{groups:{},register:function(A){this.groups[A.navId]=A;},get:function(A){return this.groups[A];}});
 //Roo/bootstrap/Navbar/Item.js
 Roo.bootstrap.Navbar.Item=function(A){Roo.bootstrap.Navbar.Item.superclass.constructor.call(this,A);this.addEvents({"click":true,'changed':true});};Roo.extend(Roo.bootstrap.Navbar.Item,Roo.bootstrap.Component,{href:false,html:'',badge:'',icon:false,glyphicon:false,active:false,preventDefault:false,tabId:false,getAutoCreate:function(){var A=Roo.apply({},Roo.bootstrap.Navbar.Item.superclass.getAutoCreate.call(this));if(this.parent().parent().sidebar===true){A={tag:'li',cls:'',cn:[{tag:'p',cls:''}]};if(this.html){A.cn[0].html=this.html;}if(this.active){this.cls+=' active';}if(this.menu){A.cn[0].cls+=' dropdown-toggle';A.cn[0].html=(A.cn[0].html||this.html)+'<span class="glyphicon glyphicon-chevron-down"></span>';}if(this.href){A.cn[0].tag='a',A.cn[0].href=this.href;}if(this.glyphicon){A.cn[0].html='<i class="glyphicon glyphicon-'+this.glyphicon+'"></i><span>'+A.cn[0].html||this.html+'</span>'}if(this.icon){A.cn[0].html='<i class="'+this.icon+'"></i><span>'+A.cn[0].html||this.html+'</span>'}return A;}
 A={tag:'li',cls:'nav-item'};if(this.active){A.cls=typeof(A.cls)=='undefined'?'active':A.cls+' active';}