From ec173d5c890db5b8544e819d84a9d5cd202d24f8 Mon Sep 17 00:00:00 2001 From: Renaud Le Gac <renaud.legac@free.fr> Date: Sun, 12 Dec 2010 21:31:12 +0000 Subject: [PATCH] Handle the paging. --- static/plugin_dbui/lib/appgridfilter.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/static/plugin_dbui/lib/appgridfilter.js b/static/plugin_dbui/lib/appgridfilter.js index 238c29dc..7678ad61 100644 --- a/static/plugin_dbui/lib/appgridfilter.js +++ b/static/plugin_dbui/lib/appgridfilter.js @@ -12,8 +12,9 @@ App.grid.GridFilter = Ext.extend(Object, { /** * Private - * a reference to the grid store + * a reference to the grid and to its store */ + grid: null, store: null, /** @@ -34,7 +35,8 @@ App.grid.GridFilter = Ext.extend(Object, { */ init: function(grid){ - // link the grid store + // link the grid and its store + this.grid = grid; this.store = grid.getStore(); // Keep track of the initial filter conditions @@ -102,7 +104,15 @@ App.grid.GridFilter = Ext.extend(Object, { // update the store this.store.baseParams.where = conditions; - this.store.load(); + + // update the store dealing with paging + if (this.grid.pagingInitialized) { + var bbar = this.grid.getBottomToolbar(); + bbar.doRefresh(); + } else { + this.store.load(); + } + } }); -- GitLab