diff app/controller/grid/Messwert.js @ 740:2e8da590ea0c

made Comboboces editable and filterable for; Messungenform: Messstelle,Datenbasis,Betriebsarts,Testdatensatz,Preobenart,Netzbetreiber Messungform: Messmethode Messwertegrid: Messgroesse,Messeinheit
author Dustin Demuth <dustin@intevation.de>
date Mon, 20 Apr 2015 16:07:40 +0200
parents efb1369a8cac
children 6e28ebbe1a73
line wrap: on
line diff
--- a/app/controller/grid/Messwert.js	Mon Apr 20 14:11:39 2015 +0200
+++ b/app/controller/grid/Messwert.js	Mon Apr 20 16:07:40 2015 +0200
@@ -27,9 +27,15 @@
     gridSave: function(editor, context) {
         context.record.save({
             success: function(request, response) {
-                Ext.data.StoreManager.get('messgroessen').clearFilters();
-                Ext.data.StoreManager.get('messgroessen').reload();
-                // If you don't do the reset above, the grid will only contain
+                if (Ext.data.StoreManager.get('messeinheiten')) {
+                    Ext.data.StoreManager.get('messeinheiten').clearFilter();
+                    Ext.data.StoreManager.get('messeinheiten').reload();
+                }
+                if (Ext.data.StoreManager.get('messeinheiten')) {
+                    Ext.data.StoreManager.get('messgroessen').clearFilter();
+                    Ext.data.StoreManager.get('messgroessen').reload();
+                }
+                // If you don't do the resets above, the grid will only contain
                 // one row in cases in when autocompletion was used!
                 context.grid.store.reload();
                 context.grid.up('window').initData();

http://lada.wald.intevation.org