reducing number of http requests per #182

git-svn-id: https://beef.googlecode.com/svn/trunk@609 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
mosse.benjamin
2010-12-16 07:02:17 +00:00
parent 1d76c0cc83
commit 0a5946ba39
2 changed files with 11 additions and 3 deletions

View File

@@ -7,10 +7,11 @@ DataGrid = function(url, page, base) {
this.store = new Ext.data.JsonStore({
root: 'logs',
autoDestroy: true,
autoLoad: false,
url: this.url,
storeId: 'myStore',
baseParams: this.base,
autoLoad: {params:{start:0, limit:this.page, sort:"date", dir:"DESC"}},
//autoLoad: {params:{start:0, limit:this.page, sort:"date", dir:"DESC"}},
idProperty: 'id',
fields: ['id','type','event','date'],
totalProperty: 'count',
@@ -68,7 +69,13 @@ DataGrid = function(url, page, base) {
viewConfig: {
forceFit:true
}
},
listeners: {
afterrender: function(datagrid) {
datagrid.store.reload({params:{start:0, limit:datagrid.page, sort:"date", dir:"DESC"}});
}
}
});
};

View File

@@ -6,7 +6,8 @@ Ext.onReady(function() {
Ext.QuickTips.init();
zombiesTreeLists = {
'basic' : new zombiesTreeList('basic')
'basic' : new zombiesTreeList('basic'),
'requester' : new zombiesTreeList('requester')
};
zombieTabs = new ZombieTabs(zombiesTreeLists);