diff app/controller/Filter.js @ 976:3c770fc7cf19 stammdatengrids

Added a variable which makes it possible to detect if a grid is dynamic
author Dustin Demuth <dustin@intevation.de>
date Wed, 02 Dec 2015 17:53:20 +0100
parents fb99332bb48e
children c6ae0aadb634
line wrap: on
line diff
--- a/app/controller/Filter.js	Wed Dec 02 17:39:04 2015 +0100
+++ b/app/controller/Filter.js	Wed Dec 02 17:53:20 2015 +0100
@@ -292,12 +292,19 @@
         if (!store) {
             store = Ext.create(sname);
         }
-        console.log(store);
         if (store) {
             store.addListener('beforeload', this.loadingAnimationOn, resultGrid);
             store.addListener('load', this.loadingAnimationOff, resultGrid);
+
             resultGrid.setStore(store);
-            resultGrid.setupColumns(this.displayFields);
+            //TODO: Check if this is still necessary, as a Grid exists
+            // for each Type.
+
+            if (resultGrid.isDynamic) {
+               //only the dynamic resultgrid can and needs to do the following:
+               resultGrid.setupColumns(this.displayFields);
+            }
+
             resultGrid.getStore().proxy.extraParams = searchParams;
             resultGrid.getStore().load();
             resultGrid.show();

http://lada.wald.intevation.org