Roo/bootstrap/NavHeaderbar.js
authorAlan Knowles <alan@roojs.com>
Thu, 29 Nov 2018 04:26:13 +0000 (12:26 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 29 Nov 2018 04:26:13 +0000 (12:26 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

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

index 69f869b..9dce251 100644 (file)
@@ -56,11 +56,11 @@ Roo.extend(Roo.bootstrap.NavHeaderbar, Roo.bootstrap.NavSimplebar,  {
         }
         
         if(this.srButton){
-            cn.push(/*{
+            cn.push({
                 tag: 'div',
                 cls: 'navbar-header',
                 cn: [
-                   */ {
+                    {
                         tag: 'button',
                         type: 'button',
                         cls: 'navbar-toggle navbar-toggler',
@@ -84,9 +84,9 @@ Roo.extend(Roo.bootstrap.NavHeaderbar, Roo.bootstrap.NavSimplebar,  {
                                 cls: 'icon-bar'
                             }
                         ]
-                    } /*
+                    }
                 ]
-            }*/);
+            });
         }
         
         cn.push({
@@ -106,8 +106,7 @@ Roo.extend(Roo.bootstrap.NavHeaderbar, Roo.bootstrap.NavSimplebar,  {
         }
         
         if (this.brand !== '') {
-            //cn[0].cn.unshift
-            cn.unshift({ // changed from push ?? BS4 needs it at the start? - does this break or exsiting?
+            cn[0].cn.unshift({ // changed from push ?? BS4 needs it at the start? - does this break or exsiting?
                 tag: 'a',
                 href: this.brand_href ? this.brand_href : '#',
                 cls: 'navbar-brand',
index 686fab5..582a196 100644 (file)
@@ -4088,11 +4088,11 @@ Roo.extend(Roo.bootstrap.NavHeaderbar, Roo.bootstrap.NavSimplebar,  {
         }
         
         if(this.srButton){
-            cn.push(/*{
+            cn.push({
                 tag: 'div',
                 cls: 'navbar-header',
                 cn: [
-                   */ {
+                    {
                         tag: 'button',
                         type: 'button',
                         cls: 'navbar-toggle navbar-toggler',
@@ -4116,9 +4116,9 @@ Roo.extend(Roo.bootstrap.NavHeaderbar, Roo.bootstrap.NavSimplebar,  {
                                 cls: 'icon-bar'
                             }
                         ]
-                    } /*
+                    }
                 ]
-            }*/);
+            });
         }
         
         cn.push({
@@ -4138,8 +4138,7 @@ Roo.extend(Roo.bootstrap.NavHeaderbar, Roo.bootstrap.NavSimplebar,  {
         }
         
         if (this.brand !== '') {
-            //cn[0].cn.unshift
-            cn.unshift({ // changed from push ?? BS4 needs it at the start? - does this break or exsiting?
+            cn[0].cn.unshift({ // changed from push ?? BS4 needs it at the start? - does this break or exsiting?
                 tag: 'a',
                 href: this.brand_href ? this.brand_href : '#',
                 cls: 'navbar-brand',
index 155a7b5..9bf652c 100644 (file)
@@ -161,9 +161,9 @@ else{if(this.type!=='nav'){Roo.log('nav type must be nav/tabs/pills')}A.cn[0].cl
 }return A;}});
 // 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){cn.push({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({tag:'div',cls:'collapse navbar-collapse',cn:[]});A.cls+=this.inverse?' navbar-inverse navbar-dark bg-dark':' navbar-default';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!==''){cn.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();
+;var cn=A.cn;if(this.desktopCenter){cn.push({cls:'container',cn:[]});cn=cn[0].cn;}if(this.srButton){cn.push({tag:'div',cls:'navbar-header',cn:[{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({tag:'div',cls:'collapse navbar-collapse',cn:[]});A.cls+=this.inverse?' navbar-inverse navbar-dark bg-dark':' navbar-default';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!==''){cn[0].cn.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);if(this.autohide){var A=0;var ft=this.el;Roo.get(document).on('scroll',function(e){var ns=Roo.get(document).getScroll().top;var os=A;A=ns;
 if(ns>os){ft.removeClass('slideDown');ft.addClass('slideUp');return;}ft.removeClass('slideUp');ft.addClass('slideDown');},this);}}});
 // Roo/bootstrap/NavSidebar.js