[Lada-commits] [PATCH] Use filtered set of netzbetreiber for stammdatengrids

Wald Commits scm-commit at wald.intevation.org
Thu Apr 7 14:49:18 CEST 2016


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1460033364 -7200
# Node ID d23427c68285117c01d7dc0f2a60b538c1047795
# Parent  ca204e91012fbedda40973702b63aa63e863b81b
Use filtered set of netzbetreiber for stammdatengrids.

diff -r ca204e91012f -r d23427c68285 app.js
--- a/app.js	Thu Apr 07 14:02:51 2016 +0200
+++ b/app.js	Thu Apr 07 14:49:24 2016 +0200
@@ -72,6 +72,7 @@
         Lada.userroles = '';
         Lada.logintime = '';
         Lada.mst = [];
+        Lada.netzbetreiber = [];
         Lada.clientVersion = '2.2-STAMMDATEN';
         Lada.serverVersion = '';
 
@@ -122,6 +123,7 @@
         Lada.logintime = json.data.servertime;
         Lada.mst = []; //Store Messstellen this user may select
         Lada.funktionen = json.data.funktionen;
+        Lada.netzbetreiber= json.data.netzbetreiber;
         //Lada.serverVersion
         this.getServerVersion();
         var mstLabor = json.data.messstelleLabor;
@@ -224,6 +226,15 @@
                 return false;
             }
         });
+        Ext.create('Lada.store.Netzbetreiber', {
+            storeId: 'netzbetreiberFiltered',
+            filters: function(item) {
+                if (Ext.Array.contains(Lada.netzbetreiber, item.get('id'))) {
+                    return true;
+                }
+                return false;
+            }
+        });
         Ext.create('Lada.view.Viewport');
     },
 
diff -r ca204e91012f -r d23427c68285 app/view/grid/DatensatzErzeuger.js
--- a/app/view/grid/DatensatzErzeuger.js	Thu Apr 07 14:02:51 2016 +0200
+++ b/app/view/grid/DatensatzErzeuger.js	Thu Apr 07 14:49:24 2016 +0200
@@ -79,7 +79,7 @@
             },
             editor: {
                 xtype: 'combobox',
-                store: Ext.data.StoreManager.get('netzbetreiber'),
+                store: Ext.data.StoreManager.get('netzbetreiberFiltered'),
                 displayField: 'netzbetreiber',
                 valueField: 'id',
                 allowBlank: false
diff -r ca204e91012f -r d23427c68285 app/view/grid/MessprogrammKategorie.js
--- a/app/view/grid/MessprogrammKategorie.js	Thu Apr 07 14:02:51 2016 +0200
+++ b/app/view/grid/MessprogrammKategorie.js	Thu Apr 07 14:49:24 2016 +0200
@@ -80,7 +80,7 @@
             },
             editor: {
                 xtype: 'combobox',
-                store: Ext.data.StoreManager.get('netzbetreiber'),
+                store: Ext.data.StoreManager.get('netzbetreiberFiltered'),
                 displayField: 'netzbetreiber',
                 valueField: 'id',
                 allowBlank: false
diff -r ca204e91012f -r d23427c68285 app/view/grid/Probenehmer.js
--- a/app/view/grid/Probenehmer.js	Thu Apr 07 14:02:51 2016 +0200
+++ b/app/view/grid/Probenehmer.js	Thu Apr 07 14:49:24 2016 +0200
@@ -80,7 +80,7 @@
             },
             editor: {
                 xtype: 'combobox',
-                store: Ext.data.StoreManager.get('netzbetreiber'),
+                store: Ext.data.StoreManager.get('netzbetreiberFiltered'),
                 displayField: 'netzbetreiber',
                 valueField: 'id',
                 allowBlank: false


More information about the Lada-commits mailing list