From: edward Date: Thu, 18 May 2017 06:09:34 +0000 (+0800) Subject: Roo/LayoutRegion.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=a8248622b3c15aa12f8537e5bfa81aaac15c4f39 Roo/LayoutRegion.js roojs-ui.js roojs-ui-debug.js roojs-all.js roojs-debug.js --- diff --git a/Roo/LayoutRegion.js b/Roo/LayoutRegion.js index 38cc0aaef9..816679eb58 100644 --- a/Roo/LayoutRegion.js +++ b/Roo/LayoutRegion.js @@ -307,7 +307,7 @@ Roo.extend(Roo.LayoutRegion, Roo.BasicLayoutRegion, { return; } - if(this.fireEvent("beforecollapse", this) != false){ + if(this.fireEvent("beforecollapse", this) != false || skipCheck){ this.collapsed = true; if(this.split){ diff --git a/roojs-all.js b/roojs-all.js index c6cceffe5c..742553c923 100644 --- a/roojs-all.js +++ b/roojs-all.js @@ -2134,7 +2134,7 @@ this.collapsedEl.dom.style.top=A.y+"px";this.collapsedEl.setSize(A.width,A.heigh }}if(this.panelSize){w=w!==null?w:this.panelSize.width;h=h!==null?h:this.panelSize.height;}if(this.activePanel){var el=this.activePanel.getEl();w=w!==null?w:el.getWidth();h=h!==null?h:el.getHeight();this.panelSize={width:w,height:h};this.activePanel.setSize(w,h); }if(Roo.isIE&&this.tabs){this.tabs.el.repaint();}},getEl:function(){return this.el;},hide:function(){if(!this.collapsed){this.el.dom.style.left="-2000px";this.el.hide();}else{this.collapsedEl.dom.style.left="-2000px";this.collapsedEl.hide();}this.visible=false; this.fireEvent("visibilitychange",this,false);},show:function(){if(!this.collapsed){this.el.show();}else{this.collapsedEl.show();}this.visible=true;this.fireEvent("visibilitychange",this,true);},closeClicked:function(){if(this.activePanel){this.remove(this.activePanel); -}},collapseClick:function(e){if(this.isSlid){e.stopPropagation();this.slideIn();}else{e.stopPropagation();this.slideOut();}},collapse:function(A){if(this.collapsed){return;}if(this.fireEvent("beforecollapse",this)!=false){this.collapsed=true;if(this.split){this.split.el.hide(); +}},collapseClick:function(e){if(this.isSlid){e.stopPropagation();this.slideIn();}else{e.stopPropagation();this.slideOut();}},collapse:function(A,B=false){if(this.collapsed){return;}if(this.fireEvent("beforecollapse",this)!=false||B){this.collapsed=true;if(this.split){this.split.el.hide(); }if(this.config.animate&&A!==true){this.fireEvent("invalidated",this);this.animateCollapse();}else{this.el.setLocation(-20000,-20000);this.el.hide();this.collapsedEl.show();this.fireEvent("collapsed",this);this.fireEvent("invalidated",this);}}},animateCollapse:function(){} ,expand:function(e,A){if(e){e.stopPropagation();}if(!this.collapsed||this.el.hasActiveFx()){return;}if(this.isSlid){this.afterSlideIn();A=true;}this.collapsed=false;if(this.config.animate&&A!==true){this.animateExpand();}else{this.el.show();if(this.split){this.split.el.show(); }this.collapsedEl.setLocation(-2000,-2000);this.collapsedEl.hide();this.fireEvent("invalidated",this);this.fireEvent("expanded",this);}},animateExpand:function(){},initTabs:function(){this.bodyEl.setStyle("overflow","hidden");var ts=new Roo.TabPanel(this.bodyEl.dom,{tabPosition:this.bottomTabs?'bottom':'top',disableTooltips:this.config.disableTabTips,toolbar:this.config.toolbar} diff --git a/roojs-debug.js b/roojs-debug.js index bfaa8f3a47..f4aca34a38 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -51984,12 +51984,12 @@ Roo.extend(Roo.LayoutRegion, Roo.BasicLayoutRegion, { * Collapses this region. * @param {Boolean} skipAnim (optional) true to collapse the element without animation (if animate is true) */ - collapse : function(skipAnim){ + collapse : function(skipAnim, skipCheck = false){ if(this.collapsed) { return; } - if(this.fireEvent("beforecollapse", this) != false){ + if(this.fireEvent("beforecollapse", this) != false || skipCheck){ this.collapsed = true; if(this.split){ diff --git a/roojs-ui-debug.js b/roojs-ui-debug.js index 0e1008976c..44bcac7ddc 100644 --- a/roojs-ui-debug.js +++ b/roojs-ui-debug.js @@ -34177,12 +34177,12 @@ Roo.extend(Roo.LayoutRegion, Roo.BasicLayoutRegion, { * Collapses this region. * @param {Boolean} skipAnim (optional) true to collapse the element without animation (if animate is true) */ - collapse : function(skipAnim){ + collapse : function(skipAnim, skipCheck = false){ if(this.collapsed) { return; } - if(this.fireEvent("beforecollapse", this) != false){ + if(this.fireEvent("beforecollapse", this) != false || skipCheck){ this.collapsed = true; if(this.split){ diff --git a/roojs-ui.js b/roojs-ui.js index ff4340b1d8..ec2631580f 100644 --- a/roojs-ui.js +++ b/roojs-ui.js @@ -1406,7 +1406,7 @@ this.collapsedEl.dom.style.top=A.y+"px";this.collapsedEl.setSize(A.width,A.heigh }}if(this.panelSize){w=w!==null?w:this.panelSize.width;h=h!==null?h:this.panelSize.height;}if(this.activePanel){var el=this.activePanel.getEl();w=w!==null?w:el.getWidth();h=h!==null?h:el.getHeight();this.panelSize={width:w,height:h};this.activePanel.setSize(w,h); }if(Roo.isIE&&this.tabs){this.tabs.el.repaint();}},getEl:function(){return this.el;},hide:function(){if(!this.collapsed){this.el.dom.style.left="-2000px";this.el.hide();}else{this.collapsedEl.dom.style.left="-2000px";this.collapsedEl.hide();}this.visible=false; this.fireEvent("visibilitychange",this,false);},show:function(){if(!this.collapsed){this.el.show();}else{this.collapsedEl.show();}this.visible=true;this.fireEvent("visibilitychange",this,true);},closeClicked:function(){if(this.activePanel){this.remove(this.activePanel); -}},collapseClick:function(e){if(this.isSlid){e.stopPropagation();this.slideIn();}else{e.stopPropagation();this.slideOut();}},collapse:function(A){if(this.collapsed){return;}if(this.fireEvent("beforecollapse",this)!=false){this.collapsed=true;if(this.split){this.split.el.hide(); +}},collapseClick:function(e){if(this.isSlid){e.stopPropagation();this.slideIn();}else{e.stopPropagation();this.slideOut();}},collapse:function(A,B=false){if(this.collapsed){return;}if(this.fireEvent("beforecollapse",this)!=false||B){this.collapsed=true;if(this.split){this.split.el.hide(); }if(this.config.animate&&A!==true){this.fireEvent("invalidated",this);this.animateCollapse();}else{this.el.setLocation(-20000,-20000);this.el.hide();this.collapsedEl.show();this.fireEvent("collapsed",this);this.fireEvent("invalidated",this);}}},animateCollapse:function(){} ,expand:function(e,A){if(e){e.stopPropagation();}if(!this.collapsed||this.el.hasActiveFx()){return;}if(this.isSlid){this.afterSlideIn();A=true;}this.collapsed=false;if(this.config.animate&&A!==true){this.animateExpand();}else{this.el.show();if(this.split){this.split.el.show(); }this.collapsedEl.setLocation(-2000,-2000);this.collapsedEl.hide();this.fireEvent("invalidated",this);this.fireEvent("expanded",this);}},animateExpand:function(){},initTabs:function(){this.bodyEl.setStyle("overflow","hidden");var ts=new Roo.TabPanel(this.bodyEl.dom,{tabPosition:this.bottomTabs?'bottom':'top',disableTooltips:this.config.disableTabTips,toolbar:this.config.toolbar}