Roo/bootstrap/Navbar.js
authorAlan Knowles <alan@roojs.com>
Tue, 15 Jan 2019 03:13:38 +0000 (11:13 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 15 Jan 2019 03:13:38 +0000 (11:13 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

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

index 4869d6a..1f05c38 100644 (file)
@@ -140,11 +140,11 @@ Roo.extend(Roo.bootstrap.Navbar, Roo.bootstrap.Component,  {
      */
     collapse : function()
     {
-        
+         var ce = this.el.select('.navbar-collapse',true).first();
+       
         if (ce.hasClass('collapsing')) {
             return;
         }
-        var ce = this.el.select('.navbar-collapse',true).first();
         ce.removeClass('in'); // old...
         ce.setHeight(ce.getHeight());
         ce.removeClass('show');
index 427ef4e..87c1166 100644 (file)
@@ -3970,11 +3970,11 @@ Roo.extend(Roo.bootstrap.Navbar, Roo.bootstrap.Component,  {
      */
     collapse : function()
     {
-        
+         var ce = this.el.select('.navbar-collapse',true).first();
+       
         if (ce.hasClass('collapsing')) {
             return;
         }
-        var ce = this.el.select('.navbar-collapse',true).first();
         ce.removeClass('in'); // old...
         ce.setHeight(ce.getHeight());
         ce.removeClass('show');
index f5d01b6..5ea26a6 100644 (file)
@@ -157,7 +157,7 @@ Roo.bootstrap.Navbar=function(A){Roo.bootstrap.Navbar.superclass.constructor.cal
 this.maskEl.hide();if(this.loadMask){this.maskEl.show();}},getChildContainer:function(){if(this.el&&this.el.select('.collapse').getCount()){return this.el.select('.collapse',true).first();}return this.el;},mask:function(){this.maskEl.show();},unmask:function(){this.maskEl.hide();
 },onToggle:function(){if(this.fireEvent('beforetoggle',this)===false){return;}var ce=this.el.select('.navbar-collapse',true).first();if(!ce.hasClass('show')){this.expand();}else{this.collapse();}},expand:function(){var ce=this.el.select('.navbar-collapse',true).first();
 if(ce.hasClass('collapsing')){return;}ce.dom.style.height='';ce.addClass('in');ce.removeClass('collapse');ce.addClass('show');var h=ce.getHeight();Roo.log(h);ce.removeClass('show');ce.addClass('collapsing');ce.setHeight(0);ce.on('transitionend',function(){ce.removeClass('collapsing');
-ce.addClass('show');ce.removeClass('collapse');ce.dom.style.height='';},this,{single:true});ce.setHeight(h);},collapse:function(){if(ce.hasClass('collapsing')){return;}var ce=this.el.select('.navbar-collapse',true).first();ce.removeClass('in');ce.setHeight(ce.getHeight());
+ce.addClass('show');ce.removeClass('collapse');ce.dom.style.height='';},this,{single:true});ce.setHeight(h);},collapse:function(){var ce=this.el.select('.navbar-collapse',true).first();if(ce.hasClass('collapsing')){return;}ce.removeClass('in');ce.setHeight(ce.getHeight());
 ce.removeClass('show');ce.addClass('collapsing');ce.on('transitionend',function(){ce.dom.style.height='';ce.removeClass('collapsing');ce.addClass('collapse');},this,{single:true});ce.setHeight(0);}});
 // Roo/bootstrap/NavSimplebar.js
 Roo.bootstrap.NavSimplebar=function(A){Roo.bootstrap.NavSimplebar.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.NavSimplebar,Roo.bootstrap.Navbar,{inverse:false,type:false,arrangement:'',align:false,weight:'light',main:false,tag:false,getAutoCreate:function(){var A={tag:this.tag||'div',cls:'navbar navbar-expand-lg roo-navbar-simple'}