diff app.js @ 1075:d23427c68285

Use filtered set of netzbetreiber for stammdatengrids.
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 07 Apr 2016 14:49:24 +0200
parents 78ef9b52510e
children 2a5d42045c63
line wrap: on
line diff
--- 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');
     },
 

http://lada.wald.intevation.org