From fa85815baff686e60b460dcdaf01a096fbbe9f8d Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Tue, 4 Dec 2018 16:47:00 +0800 Subject: [PATCH] Roo/bootstrap/NavGroup.js roojs-bootstrap.js roojs-bootstrap-debug.js --- Roo/bootstrap/NavGroup.js | 2 +- roojs-bootstrap-debug.js | 2 +- roojs-bootstrap.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Roo/bootstrap/NavGroup.js b/Roo/bootstrap/NavGroup.js index 5fd5f0383a..dc4f41a1fa 100644 --- a/Roo/bootstrap/NavGroup.js +++ b/Roo/bootstrap/NavGroup.js @@ -59,7 +59,7 @@ Roo.extend(Roo.bootstrap.NavGroup, Roo.bootstrap.Component, { }; if (Roo.bootstrap.version == 4) { if (['tabs','pills'].indexOf(this.type) != -1) { - cfg.cls = ' nav-' + this.type; + cfg.cls += ' nav-' + this.type; } else { cfg.cls += ' navbar-nav'; } diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 9132b8b96a..6b27616e37 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -4372,7 +4372,7 @@ Roo.extend(Roo.bootstrap.NavGroup, Roo.bootstrap.Component, { }; if (Roo.bootstrap.version == 4) { if (['tabs','pills'].indexOf(this.type) != -1) { - cfg.cls = ' nav-' + this.type; + cfg.cls += ' nav-' + this.type; } else { cfg.cls += ' navbar-nav'; } diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index afca1a53ed..0c8359e26b 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -176,7 +176,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(['tabs','pills'].indexOf(this.type)!=-1){A.cls=' nav-'+this.type;}else{A.cls+=' navbar-nav';}}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(['tabs','pills'].indexOf(this.type)!=-1){A.cls+=' nav-'+this.type;}else{A.cls+=' navbar-nav';}}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; -- 2.39.2