* @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
*/
this.on('activate', function(gp) {
if (!gp.grid.rendered) {
gp.grid.render(this.wrapper);
- gp.grid.getGridEl().replaceClass("roo-layout-inactive-content", "roo-layout-component-panel");
-
+ gp.grid.getGridEl().replaceClass("roo-layout-inactive-content", "roo-layout-component-panel");
}
});
};
-Roo.extend(Roo.bootstrap.panel.Grid, Roo.bootstrap.panel.Content, {
+Roo.extend(Roo.bootstrap.panel.Grid, Roo.bootstrap.panel.Content,
+{
+ // private
+ is_resizing : false,
+
getId : function(){
return this.grid.id;
},
return this.grid;
},
- setSize : function(width, height){
+ setSize : function(width, height)
+ {
+ if (this.is_resizing) {
+ return;
+
+ }
+ this.is_resizing = true;
if(!this.ignoreResize(width, height)){
var grid = this.grid;
var size = this.adjustForComponents(width, height);
+ // 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();
}
+ this.is_resizing = false;
},