Roo/bootstrap/panel/Nest.js
authorAlan Knowles <alan@roojs.com>
Wed, 30 Aug 2017 04:30:48 +0000 (12:30 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 30 Aug 2017 04:30:48 +0000 (12:30 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

Roo/bootstrap/panel/Nest.js
roojs-bootstrap-debug.js
roojs-bootstrap.js

index c916b37..7ce4422 100644 (file)
@@ -43,7 +43,11 @@ Roo.extend(Roo.bootstrap.panel.Nest, Roo.bootstrap.panel.Content, {
         if(!this.ignoreResize(width, height)){
             var size = this.adjustForComponents(width, height);
             var el = this.layout.getEl();
-            el.setSize(size.width, size.height || null);
+            if (size.height < 1) {
+                el.setWidth(size.width);   
+            } else {
+                el.setSize(size.width, size.height);
+            }
             var touch = el.dom.offsetWidth;
             this.layout.layout();
             // ie requires a double layout on the first pass
index 744a159..aeda5db 100644 (file)
@@ -32864,7 +32864,7 @@ Roo.extend(Roo.bootstrap.layout.Region, Roo.bootstrap.layout.Basic, {
                 w += this.config.adjustments[0];
             }
         }
-        if(h !== null){
+        if(h !== null && h > 0){
             this.el.setHeight(h);
             h = this.titleEl && this.titleEl.isDisplayed() ? h - (this.titleEl.getHeight()||0) : h;
             h -= this.el.getBorderWidth("tb");
@@ -34579,7 +34579,11 @@ Roo.extend(Roo.bootstrap.panel.Nest, Roo.bootstrap.panel.Content, {
         if(!this.ignoreResize(width, height)){
             var size = this.adjustForComponents(width, height);
             var el = this.layout.getEl();
-            el.setSize(size.width, size.height);
+            if (size.height < 1) {
+                el.setWidth(size.width);   
+            } else {
+                el.setSize(size.width, size.height);
+            }
             var touch = el.dom.offsetWidth;
             this.layout.layout();
             // ie requires a double layout on the first pass
index 9cc3022..24374bc 100644 (file)
@@ -1368,7 +1368,7 @@ this.on("paneladded",this.validateVisibility,this);this.on("panelremoved",this.v
 i++){this.add(this.unrendered_panels[i]);}this.unrendered_panels=null;}},applyConfig:function(c){this.margins=c.margins||this.margins||{top:0,left:0,right:0,bottom:0};this.bottomTabs=c.tabPosition!="top";this.autoScroll=c.autoScroll||false;this.duration=c.duration||.30;
 this.slideDuration=c.slideDuration||.45;this.config=c;},isVisible:function(){return this.visible;},getBox:function(){var b;b=this.el.getBox(false,true);return b;},getMargins:function(){return this.margins;},updateBox:function(A){if(!this.bodyEl){return;}this.box=A;
 if(!this.collapsed){this.el.dom.style.left=A.x+"px";this.el.dom.style.top=A.y+"px";this.updateBody(A.width,A.height);}else{this.collapsedEl.dom.style.left=A.x+"px";this.collapsedEl.dom.style.top=A.y+"px";this.collapsedEl.setSize(A.width,A.height);}if(this.tabs){this.tabs.autoSizeTabs();
-}},updateBody:function(w,h){if(w!==null){this.el.setWidth(w);w-=this.el.getBorderWidth("rl");if(this.config.adjustments){w+=this.config.adjustments[0];}}if(h!==null){this.el.setHeight(h);h=this.titleEl&&this.titleEl.isDisplayed()?h-(this.titleEl.getHeight()||0):h;
+}},updateBody:function(w,h){if(w!==null){this.el.setWidth(w);w-=this.el.getBorderWidth("rl");if(this.config.adjustments){w+=this.config.adjustments[0];}}if(h!==null&&h>0){this.el.setHeight(h);h=this.titleEl&&this.titleEl.isDisplayed()?h-(this.titleEl.getHeight()||0):h;
 h-=this.el.getBorderWidth("tb");if(this.config.adjustments){h+=this.config.adjustments[1];}this.bodyEl.setHeight(h);if(this.tabs){h=this.tabs.syncHeight(h);}}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(){this.el.dom.style.left="-2000px";this.el.hide();
 this.visible=false;this.fireEvent("visibilitychange",this,false);},show:function(){this.el.show();this.visible=true;this.fireEvent("visibilitychange",this,true);},animateCollapse:function(){},animateExpand:function(){},initTabs:function(){var ts=new Roo.bootstrap.panel.Tabs({el:this.bodyEl.dom,tabPosition:this.bottomTabs?'bottom':'top',disableTooltips:this.config.disableTabTips,toolbar:this.config.toolbar}
@@ -1452,9 +1452,9 @@ if(A.background){this.on('activate',function(gp){if(!gp.grid.rendered){gp.grid.r
 },afterSlide:function(){this.grid.getView().scroller.unclip();},destroy:function(){this.grid.destroy();delete this.grid;Roo.bootstrap.panel.Grid.superclass.destroy.call(this);}});
 // Roo/bootstrap/panel/Nest.js
 Roo.bootstrap.panel.Nest=function(A){A.el=A.layout.getEl();Roo.bootstrap.panel.Nest.superclass.constructor.call(this,A);A.layout.monitorWindowResize=false;this.layout=A.layout;this.layout.getEl().addClass("roo-layout-nested-layout");};Roo.extend(Roo.bootstrap.panel.Nest,Roo.bootstrap.panel.Content,{setSize:function(A,B){if(!this.ignoreResize(A,B)){var C=this.adjustForComponents(A,B);
-var el=this.layout.getEl();el.setSize(C.width,C.height);var D=el.dom.offsetWidth;this.layout.layout();if(Roo.isIE&&!this.initialized){this.initialized=true;this.layout.layout();}}},setActiveState:function(A){this.active=A;if(!A){this.fireEvent("deactivate",this);
-return;}this.fireEvent("activate",this);if(!this.layout){return;}var B=false;for(var r in this.layout.regions){B=this.layout.getRegion(r);if(B.getActivePanel()){B.setActivePanel(B.getActivePanel());continue;}if(!B.panels.length){continue;}B.showPanel(B.getPanel(0));
-}},getLayout:function(){return this.layout;},addxtype:function(A){return this.layout.addxtype(A);}});
+var el=this.layout.getEl();if(C.height<1){el.setWidth(C.width);}else{el.setSize(C.width,C.height);}var D=el.dom.offsetWidth;this.layout.layout();if(Roo.isIE&&!this.initialized){this.initialized=true;this.layout.layout();}}},setActiveState:function(A){this.active=A;
+if(!A){this.fireEvent("deactivate",this);return;}this.fireEvent("activate",this);if(!this.layout){return;}var B=false;for(var r in this.layout.regions){B=this.layout.getRegion(r);if(B.getActivePanel()){B.setActivePanel(B.getActivePanel());continue;}if(!B.panels.length){continue;
+}B.showPanel(B.getPanel(0));}},getLayout:function(){return this.layout;},addxtype:function(A){return this.layout.addxtype(A);}});
 // Roo/bootstrap/panel/Tabs.js
 Roo.bootstrap.panel.Tabs=function(A){this.el=Roo.get(A.el);delete A.el;if(A){if(typeof A=="boolean"){this.tabPosition=A?"bottom":"top";}else{Roo.apply(this,A);}}if(this.tabPosition=="bottom"){this.bodyEl=Roo.get(this.createBody(this.el.dom));this.el.addClass("roo-tabs-bottom");
 }this.stripWrap=Roo.get(this.createStrip(this.el.dom),true);this.stripEl=Roo.get(this.createStripList(this.stripWrap.dom),true);this.stripBody=Roo.get(this.stripWrap.dom.firstChild.firstChild,true);if(Roo.isIE){Roo.fly(this.stripWrap.dom.firstChild).setStyle("overflow-x","hidden");