From 6dca79442ec1579c90628f2603704594a257b95a Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 29 Nov 2018 12:37:26 +0800 Subject: [PATCH] Roo/bootstrap/Navbar.js roojs-bootstrap.js roojs-bootstrap-debug.js --- Roo/bootstrap/Navbar.js | 3 ++- roojs-bootstrap-debug.js | 3 ++- roojs-bootstrap.js | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Roo/bootstrap/Navbar.js b/Roo/bootstrap/Navbar.js index 6bad67d921..b210502910 100644 --- a/Roo/bootstrap/Navbar.js +++ b/Roo/bootstrap/Navbar.js @@ -50,7 +50,8 @@ Roo.extend(Roo.bootstrap.Navbar, Roo.bootstrap.Component, { //Roo.log(this.el.select('.navbar-toggle',true)); this.el.select('.navbar-toggle',true).on('click', function() { if(this.fireEvent('beforetoggle', this) !== false){ - this.el.select('.navbar-collapse',true).toggleClass('in collapse'); + this.el.select('.navbar-collapse',true).toggleClass('in'); + this.el.select('.navbar-collapse',true).toggleClass('collapse'); } }, this); diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 0548572120..2ac19c8edd 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -3861,7 +3861,8 @@ Roo.extend(Roo.bootstrap.Navbar, Roo.bootstrap.Component, { //Roo.log(this.el.select('.navbar-toggle',true)); this.el.select('.navbar-toggle',true).on('click', function() { if(this.fireEvent('beforetoggle', this) !== false){ - this.el.select('.navbar-collapse',true).toggleClass('in collapse'); + this.el.select('.navbar-collapse',true).toggleClass('in'); + this.el.select('.navbar-collapse',true).toggleClass('collapse'); } }, this); diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index f4c6e4015b..da50192f33 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -151,8 +151,8 @@ this.updateText(B.msg);if(B.cls){d.el.addClass(B.cls);}d.proxyDrag=B.proxyDrag== Roo.MessageBox=Roo.MessageBox||Roo.bootstrap.MessageBox;Roo.Msg=Roo.Msg||Roo.MessageBox; // Roo/bootstrap/Navbar.js Roo.bootstrap.Navbar=function(A){Roo.bootstrap.Navbar.superclass.constructor.call(this,A);this.addEvents({"beforetoggle":true});};Roo.extend(Roo.bootstrap.Navbar,Roo.bootstrap.Component,{navItems:false,loadMask:false,getAutoCreate:function(){throw {message:"nav bar is now a abstract base class - use NavSimplebar / NavHeaderbar / NavSidebar etc..."} -;},initEvents:function(){this.el.select('.navbar-toggle',true).on('click',function(){if(this.fireEvent('beforetoggle',this)!==false){this.el.select('.navbar-collapse',true).toggleClass('in collapse');}},this);var A={tag:"div",cls:"x-dlg-mask"};this.maskEl=Roo.DomHelper.append(this.el,A,true); -var B=this.el.getSize();this.maskEl.setSize(B.width,B.height);this.maskEl.enableDisplayMode("block");this.maskEl.hide();if(this.loadMask){this.maskEl.show();}},getChildContainer:function(){if(this.el.select('.collapse').getCount()){return this.el.select('.collapse',true).first(); +;},initEvents:function(){this.el.select('.navbar-toggle',true).on('click',function(){if(this.fireEvent('beforetoggle',this)!==false){this.el.select('.navbar-collapse',true).toggleClass('in');this.el.select('.navbar-collapse',true).toggleClass('collapse'); +}},this);var A={tag:"div",cls:"x-dlg-mask"};this.maskEl=Roo.DomHelper.append(this.el,A,true);var B=this.el.getSize();this.maskEl.setSize(B.width,B.height);this.maskEl.enableDisplayMode("block");this.maskEl.hide();if(this.loadMask){this.maskEl.show();}},getChildContainer:function(){if(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();}}); // 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'} -- 2.39.2