Roo/bootstrap/panel/Grid.js
authorAlan Knowles <alan@roojs.com>
Fri, 7 Jul 2017 03:03:31 +0000 (11:03 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 7 Jul 2017 03:03:31 +0000 (11:03 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

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

index 2415cee..f78c950 100644 (file)
@@ -69,8 +69,11 @@ Roo.extend(Roo.bootstrap.panel.Grid, Roo.bootstrap.panel.Content, {
             grid.getGridEl().setSize(size.width, size.height);
             var thd = grid.getGridEl().select('thead',true).first();
             var tbd = grid.getGridEl().select('tbody', true).first();
-            var hsz = thb.getSize();
-            tbd.setSize(width, height - hsz.heigth);
+            if (tbd) {
+                var hsz = thb.getSize();
+                tbd.setSize(width, height - hsz.heigth);
+            }
+            
             grid.autoSize();
         }
     },
index df28ddc..2be78f7 100644 (file)
@@ -33741,8 +33741,11 @@ Roo.extend(Roo.bootstrap.panel.Grid, Roo.bootstrap.panel.Content, {
             grid.getGridEl().setSize(size.width, size.height);
             var thd = grid.getGridEl().select('thead',true).first();
             var tbd = grid.getGridEl().select('tbody', true).first();
-            var hsz = thb.getSize();
-            tbd.setSize(width, height - hsz.heigth);
+            if (tbd) {
+                var hsz = thb.getSize();
+                tbd.setSize(width, height - hsz.heigth);
+            }
+            
             grid.autoSize();
         }
     },
index 1bf2cab..2272311 100644 (file)
@@ -1421,7 +1421,7 @@ Roo.bootstrap.panel.Grid=function(A){this.wrapper=Roo.DomHelper.append(document.
 if(this.toolbar){this.toolbar.el.insertBefore(this.wrapper.dom.firstChild);}if(this.footer&&!this.footer.el&&this.footer.xtype){this.footer.container=this.grid.getView().getFooterPanel(true);this.footer.dataSource=this.grid.dataSource;this.footer=Roo.factory(this.footer,Roo);
 }A.grid.monitorWindowResize=false;A.grid.autoHeight=false;A.grid.autoWidth=false;this.grid=A.grid;this.grid.getGridEl().replaceClass("x-layout-inactive-content","x-layout-component-panel");};Roo.extend(Roo.bootstrap.panel.Grid,Roo.bootstrap.panel.Content,{getId:function(){return this.grid.id;
 },getGrid:function(){return this.grid;},setSize:function(A,B){if(!this.ignoreResize(A,B)){var C=this.grid;var D=this.adjustForComponents(A,B);C.getGridEl().setSize(D.width,D.height);var E=C.getGridEl().select('thead',true).first();var F=C.getGridEl().select('tbody',true).first();
-var G=thb.getSize();F.setSize(A,B-G.heigth);C.autoSize();}},beforeSlide:function(){this.grid.getView().scroller.clip();},afterSlide:function(){this.grid.getView().scroller.unclip();},destroy:function(){this.grid.destroy();delete this.grid;Roo.bootstrap.panel.Grid.superclass.destroy.call(this);
+if(F){var G=thb.getSize();F.setSize(A,B-G.heigth);}C.autoSize();}},beforeSlide:function(){this.grid.getView().scroller.clip();},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);