sync
[roojs1] / Roo / bootstrap / panel / Grid.js
index 4736ed3..be5c735 100644 (file)
@@ -5,6 +5,7 @@
  * @constructor
  * Create a new GridPanel.
  * @cfg {Roo.bootstrap.Table} grid The grid for this panel
+ * @cfg {Roo.bootstrap.nav.Simplebar} toolbar the toolbar at the top of the grid.
  * @param {Object} config A the config object
   
  */
@@ -109,26 +110,33 @@ Roo.extend(Roo.bootstrap.panel.Grid, Roo.bootstrap.panel.Content, {
     },
     
     setSize : function(width, height){
-        if(this.title == 'Log Grid'){
-            Roo.log(this);
-            Roo.log(this.lastSize);
-        }
-        
         if(!this.ignoreResize(width, height)){
-            Roo.log('Run grid resize!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!');
-            Roo.log([width, height]);
             var grid = this.grid;
             var size = this.adjustForComponents(width, height);
-            Roo.log(size);
+            // tfoot is not a footer?
+          
+            
             var gridel = grid.getGridEl();
             gridel.setSize(size.width, size.height);
-            /*
-            var thd = grid.getGridEl().select('thead',true).first();
+            
             var tbd = grid.getGridEl().select('tbody', true).first();
-            if (tbd) {
-                tbd.setSize(width, height - thd.getHeight());
+            var thd = grid.getGridEl().select('thead',true).first();
+            var tbf= grid.getGridEl().select('tfoot', true).first();
+
+            if (tbf) {
+                size.height -= tbf.getHeight();
+            }
+            if (thd) {
+                size.height -= thd.getHeight();
             }
-            */
+            
+            tbd.setSize(size.width, size.height );
+            // this is for the account management tab -seems to work there.
+            var thd = grid.getGridEl().select('thead',true).first();
+            //if (tbd) {
+            //    tbd.setSize(size.width, size.height - thd.getHeight());
+            //}
+             
             grid.autoSize();
         }
     },