Mercurial > lada > lada-client
diff app/controller/Filter.js @ 810:a5373ee662e2
Created a loading Animation for the Filterresultgrid
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Wed, 27 May 2015 16:01:59 +0200 |
parents | 4b9b1d3ad9f1 |
children | 1449d58d6f58 |
line wrap: on
line diff
--- a/app/controller/Filter.js Fri May 22 16:14:14 2015 +0200 +++ b/app/controller/Filter.js Wed May 27 16:01:59 2015 +0200 @@ -219,6 +219,8 @@ store = Ext.create(sname); } if (store) { + store.addListener('beforeload', this.loadingAnimationOn, resultGrid); + store.addListener('load', this.loadingAnimationOff, resultGrid); resultGrid.setStore(store); resultGrid.setupColumns(this.displayFields); resultGrid.getStore().proxy.extraParams = searchParams; @@ -226,6 +228,23 @@ resultGrid.show(); } }, + + /** + * Enable the Loading Animation of the Grid. + */ + loadingAnimationOn: function(store, operation) { + // this = resultgrid because of the scope which was set in addListener + this.setLoading(true); + }, + + /** + * Disable the Loading Animation of the Grid. + */ + loadingAnimationOff: function(store, operation) { + // this = resultgrid because of the scope which was set in addListener + this.setLoading(false); + }, + /** * This function resets the filters */