resize grids on browserwindow resize, see #10

This commit is contained in:
Sebastian Sdorra
2011-04-16 13:36:38 +02:00
parent 1b43ff2258
commit 5bff5bbd17
4 changed files with 80 additions and 4 deletions

View File

@@ -99,13 +99,30 @@ Sonia.user.Grid = Ext.extend(Sonia.rest.Grid, {
var config = {
store: userStore,
colModel: userColModel
colModel: userColModel,
listeners: {
fallBelowMinHeight: {
fn: this.onFallBelowMinHeight,
scope: this
}
}
};
Ext.apply(this, Ext.apply(this.initialConfig, config));
Sonia.user.Grid.superclass.initComponent.apply(this, arguments);
},
onFallBelowMinHeight: function(height, minHeight){
var p = Ext.getCmp('userEditPanel');
this.setHeight(minHeight);
var epHeight = p.getHeight();
p.setHeight(epHeight - (minHeight - height));
// rerender
this.doLayout();
p.doLayout();
this.ownerCt.doLayout();
},
selectItem: function(item){
if ( debug ){
console.debug( item.name + ' selected' );