Roo/bootstrap/NavGroup.js
authorAlan Knowles <alan@roojs.com>
Tue, 4 Dec 2018 08:23:32 +0000 (16:23 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 4 Dec 2018 08:23:32 +0000 (16:23 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

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

index 8ff00bc..37f16dc 100644 (file)
@@ -59,7 +59,7 @@ Roo.extend(Roo.bootstrap.NavGroup, Roo.bootstrap.Component,  {
         };
         if (Roo.bootstrap.version == 4) {
            if (['nav','pills'].indexOf(this.type) != -1) {
-               cfg.cls = ' nav-' + this.type; 
+               cfg.cls = ' navbar-' + this.type; 
            }
        } else {
            if (['tabs','pills'].indexOf(this.type) != -1) {
index 2d1e471..8903a61 100644 (file)
@@ -4366,7 +4366,7 @@ Roo.extend(Roo.bootstrap.NavGroup, Roo.bootstrap.Component,  {
         };
         if (Roo.bootstrap.version == 4) {
            if (['nav','pills'].indexOf(this.type) != -1) {
-               cfg.cls = ' nav-' + this.type; 
+               cfg.cls = ' navbar-' + this.type; 
            }
        } else {
            if (['tabs','pills'].indexOf(this.type) != -1) {
index bec72ad..8b7fe60 100644 (file)
@@ -175,7 +175,7 @@ if(this.autohide){var A=0;var ft=this.el;Roo.get(document).on('scroll',function(
 Roo.bootstrap.NavSidebar=function(A){Roo.bootstrap.NavSidebar.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.NavSidebar,Roo.bootstrap.Navbar,{sidebar:true,getAutoCreate:function(){return {tag:'div',cls:'sidebar sidebar-nav'};}});
 // 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 A=Roo.apply({}
-,Roo.bootstrap.NavGroup.superclass.getAutoCreate.call(this));A={tag:'ul',cls:'nav'};if(Roo.bootstrap.version==4){if(['nav','pills'].indexOf(this.type)!=-1){A.cls=' nav-'+this.type;}}else{if(['tabs','pills'].indexOf(this.type)!=-1){A.cls+=' nav-'+this.type}
+,Roo.bootstrap.NavGroup.superclass.getAutoCreate.call(this));A={tag:'ul',cls:'nav'};if(Roo.bootstrap.version==4){if(['nav','pills'].indexOf(this.type)!=-1){A.cls=' navbar-'+this.type;}}else{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()&&this.parent().sidebar){A={tag:'ul',cls:'dashboard-menu sidebar-menu'};return A;}if(this.form===true){A={tag:'form',cls:'navbar-form form-inline'}
 ;if(this.align==='right'){A.cls+=' navbar-right ml-md-auto';}else{A.cls+=' navbar-left';}}if(this.align==='right'){A.cls+=' navbar-right ml-md-auto';}else{A.cls+=' mr-auto';}if(this.inverse){A.cls+=' navbar-inverse';}return A;},setActiveItem:function(A){var B=false;
 Roo.each(this.navItems,function(v){if(v==A){return;}if(v.isActive()){v.setActive(false,true);B=v;}});A.setActive(true,true);this.fireEvent('changed',this,A,B);},getActive:function(){var A=false;Roo.each(this.navItems,function(v){if(v.isActive()){A=v;}});return A;