From 511897f4166c31467e7761c5e365e5fa4fcf1be1 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 29 Nov 2018 15:31:31 +0800 Subject: [PATCH] Roo/bootstrap/Navbar.js roojs-bootstrap.js roojs-bootstrap-debug.js --- Roo/bootstrap/Navbar.js | 4 ++-- roojs-bootstrap-debug.js | 4 ++-- roojs-bootstrap.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Roo/bootstrap/Navbar.js b/Roo/bootstrap/Navbar.js index 18b7cb6847..b4ec9c97e4 100644 --- a/Roo/bootstrap/Navbar.js +++ b/Roo/bootstrap/Navbar.js @@ -63,14 +63,14 @@ Roo.extend(Roo.bootstrap.Navbar, Roo.bootstrap.Component, { ce.addClass('collapsing'); ce.setHeight(0); // resize it ... - (function() { + ce.on('transitionend', function() { Roo.log('done transition'); ce.removeClass('collapsing'); ce.addClass('show'); ce.removeClass('collapse'); ce.dom.style.height = ''; - }).defer(500); + }, this, { single: true} ); ce.setHeight(h); } else { diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index de8bf396f7..60adca2806 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -3874,14 +3874,14 @@ Roo.extend(Roo.bootstrap.Navbar, Roo.bootstrap.Component, { ce.addClass('collapsing'); ce.setHeight(0); // resize it ... - (function() { + ce.on('transitionend', function() { Roo.log('done transition'); ce.removeClass('collapsing'); ce.addClass('show'); ce.removeClass('collapse'); ce.dom.style.height = ''; - }).defer(500); + }, this, { single: true} ); ce.setHeight(h); } else { diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index f736c07bdc..eef89acb5a 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -152,8 +152,8 @@ Roo.MessageBox=Roo.MessageBox||Roo.bootstrap.MessageBox;Roo.Msg=Roo.Msg||Roo.Mes // 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){var ce=this.el.select('.navbar-collapse',true).first();ce.toggleClass('in');if(ce.hasClass('collapse')){ce.removeClass('collapse'); -ce.addClass('show');var h=ce.getHeight();Roo.log(h);ce.removeClass('show');ce.addClass('collapsing');ce.setHeight(0);(function(){Roo.log('done transition');ce.removeClass('collapsing');ce.addClass('show');ce.removeClass('collapse');ce.dom.style.height=''; -}).defer(500);ce.setHeight(h);}else{ce.addClass('collapsing');ce.removeClass('show');(function(){ce.removeClass('collapsing');ce.addClass('collapse');}).defer(200);}}},this);var A={tag:"div",cls:"x-dlg-mask"};this.maskEl=Roo.DomHelper.append(this.el,A,true); +ce.addClass('show');var h=ce.getHeight();Roo.log(h);ce.removeClass('show');ce.addClass('collapsing');ce.setHeight(0);ce.on('transitionend',function(){Roo.log('done transition');ce.removeClass('collapsing');ce.addClass('show');ce.removeClass('collapse');ce.dom.style.height=''; +},this,{single:true});ce.setHeight(h);}else{ce.addClass('collapsing');ce.removeClass('show');(function(){ce.removeClass('collapsing');ce.addClass('collapse');}).defer(200);}}},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 -- 2.39.2