diff app/view/panel/Ort.js @ 1364:b58868c47f02

reintroduced filtered display of Stammdaten panel
author Maximilian Krambach <mkrambach@intevation.de>
date Wed, 08 Feb 2017 12:53:24 +0100
parents 5c2d6812d85a
children 48c9c7b0ceef
line wrap: on
line diff
--- a/app/view/panel/Ort.js	Wed Feb 08 12:06:52 2017 +0100
+++ b/app/view/panel/Ort.js	Wed Feb 08 12:53:24 2017 +0100
@@ -90,11 +90,6 @@
             }
         }];
         this.callParent(arguments);
-        var map = this.down('map');
-        var osg = this.down('ortstammdatengrid');
-        osg.setLoading(true);
-        map.setLoading(true);
-        this.setStore();
     },
 
     afterRender: function() {
@@ -108,30 +103,20 @@
         var map = this.down('map');
         osg.setLoading(true);
         map.setLoading(true);
-
-        if (!store) {
-            this.ortstore = Ext.data.StoreManager.get('orte');
-            //this.ortstore.clearFilter(true);
-        } else {
-            this.ortstore = store;
+        var ortstore = store;
+        if (!ortstore) {
+            ortstore = Ext.data.StoreManager.get('orte');
         }
-        // store.clearFilter(true);
-        this.ortstore.load({
-            callback: function() {
-                osg.setStore(me.ortstore);
-                map.addLocations(me.ortstore);
-                osg.setLoading(false);
-                map.setLoading(false);
-            }
-        });
-        //enable buttons
-        this.down('toolbar button[action=add]').enable();
-        this.down('toolbar button[action=addMap]').enable();
-        this.connectListeners();
+        ortstore.clearFilter(true);
+        osg.setStore(ortstore);
+        map.addLocations(ortstore);
+        me.down('toolbar button[action=add]').enable();
+        me.down('toolbar button[action=addMap]').enable();
+        me.connectListeners();
     },
 
     getStore: function() {
-        return this.ortstore;
+        return this.down('grid').getStore();
     },
 
     connectListeners: function() {

http://lada.wald.intevation.org