Mercurial > lada > lada-client
diff app/controller/FilterResult.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 | 3bc19188fc3a |
children | 5cdfe0ff1df3 |
line wrap: on
line diff
--- a/app/controller/FilterResult.js Fri May 22 16:14:14 2015 +0200 +++ b/app/controller/FilterResult.js Wed May 27 16:01:59 2015 +0200 @@ -17,13 +17,17 @@ ], /** - * Initialize the Controller with 4 listeners + * Initialize the Controller with listeners */ init: function() { this.control({ 'filterresultgrid': { itemdblclick: this.editItem }, + 'store': { + beforeload: this.loadingAnimationOn, + load: this.loadingAnimationOff + }, 'filterresultgrid toolbar button[action=addProbe]': { click: this.addProbeItem }, @@ -39,6 +43,19 @@ }); this.callParent(arguments); }, + /** + * Enable the Loading Animation of the Grid. + */ + loadingAnimationOn: function(store, operation) { + store.up('grid').setLoading(true); + }, + + /** + * Disable the Loading Animation of the Grid. + */ + loadingAnimationOff: function(store, operation) { + store.up('grid').setLoading(false); + }, /** * This function is called after a Row in the