changeset 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 56470a075e6e
files app.js app/controller/Filter.js app/view/widget/DynamicGrid.js
diffstat 3 files changed, 13 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/app.js	Wed Dec 02 17:39:04 2015 +0100
+++ b/app.js	Wed Dec 02 17:53:20 2015 +0100
@@ -63,7 +63,7 @@
         Lada.userroles = '';
         Lada.logintime = '';
         Lada.mst = [];
-        Lada.clientVersion = '2.1.2';
+        Lada.clientVersion = '2.2-STAMMDATEN';
         Lada.serverVersion = '';
 
         var queryString = document.location.href.split('?')[1];
--- 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();
--- a/app/view/widget/DynamicGrid.js	Wed Dec 02 17:39:04 2015 +0100
+++ b/app/view/widget/DynamicGrid.js	Wed Dec 02 17:53:20 2015 +0100
@@ -15,6 +15,9 @@
     store: null,
 
     multiSelect: true,
+    allowDeselect: true,
+
+    isDynamic: true,
 
     viewConfig: {
         deferEmptyText: false

http://lada.wald.intevation.org