From: Alan Knowles Date: Thu, 24 Jan 2019 09:18:26 +0000 (+0800) Subject: roojs-bootstrap.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=892a274985f468d655da5402d8583de701028b07 roojs-bootstrap.js roojs-bootstrap-debug.js --- diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 7b2100bbf4..365d947702 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -4222,7 +4222,7 @@ Roo.extend(Roo.bootstrap.NavHeaderbar, Roo.bootstrap.NavSimplebar, { cn.push({ tag: 'div', - cls: 'collapse navbar-collapse', + cls: Roo.bootstrap.version == 4 ? 'nav flex-row' : 'collapse navbar-collapse', cn : [] }); diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index e720149477..13f4389bcf 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -167,7 +167,7 @@ Roo.bootstrap.NavSimplebar=function(A){Roo.bootstrap.NavSimplebar.superclass.con // Roo/bootstrap/NavHeaderbar.js Roo.bootstrap.NavHeaderbar=function(A){Roo.bootstrap.NavHeaderbar.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.NavHeaderbar,Roo.bootstrap.NavSimplebar,{position:'',brand:'',brand_href:false,srButton:true,autohide:false,desktopCenter:false,getAutoCreate:function(){var A={tag:this.nav||'nav',cls:'navbar navbar-expand-md',role:'navigation',cn:[]} ;var cn=A.cn;if(this.desktopCenter){cn.push({cls:'container',cn:[]});cn=cn[0].cn;}if(this.srButton){var B={tag:'button',type:'button',cls:'navbar-toggle navbar-toggler','data-toggle':'collapse',cn:[{tag:'span',cls:'sr-only',html:'Toggle navigation'},{tag:'span',cls:'icon-bar navbar-toggler-icon'} -,{tag:'span',cls:'icon-bar'},{tag:'span',cls:'icon-bar'}]};cn.push(Roo.bootstrap.version==4?B:{tag:'div',cls:'navbar-header',cn:[B]});}cn.push({tag:'div',cls:'collapse navbar-collapse',cn:[]});A.cls+=this.inverse?' navbar-inverse navbar-dark bg-dark':' navbar-default'; +,{tag:'span',cls:'icon-bar'},{tag:'span',cls:'icon-bar'}]};cn.push(Roo.bootstrap.version==4?B:{tag:'div',cls:'navbar-header',cn:[B]});}cn.push({tag:'div',cls:Roo.bootstrap.version==4?'nav flex-row':'collapse navbar-collapse',cn:[]});A.cls+=this.inverse?' navbar-inverse navbar-dark bg-dark':' navbar-default'; if(['light','white'].indexOf(this.weight)>-1){A.cls+=['light','white'].indexOf(this.weight)>-1?' navbar-light':' navbar-dark';}A.cls+=' bg-'+this.weight;if(['fixed-top','fixed-bottom','static-top'].indexOf(this.position)>-1){A.cls+=' navbar-'+this.position+' '+this.position; A.tag=this.tag||(this.position=='fixed-bottom'?'footer':'header');}if(this.brand!==''){var cp=Roo.bootstrap.version==4?cn:cn[0].cn;cp.unshift({tag:'a',href:this.brand_href?this.brand_href:'#',cls:'navbar-brand',cn:[this.brand]});}if(this.main){A.cls+=' main-nav'; }return A;},getHeaderChildContainer:function(){if(this.srButton&&this.el.select('.navbar-header').getCount()){return this.el.select('.navbar-header',true).first();}return this.getChildContainer();},initEvents:function(){Roo.bootstrap.NavHeaderbar.superclass.initEvents.call(this);