[Lada-commits] [PATCH] Do not load Ortszuordnung for messprogramm in "new messprogramm" dialog

Wald Commits scm-commit at wald.intevation.org
Thu Mar 9 15:37:31 CET 2017


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1489070239 -3600
# Node ID 76ff6d0841674969d42523ed91bc26dfb9c1bf67
# Parent  7cf7a8dc7818c7b44ebfb92973ae274d091af4be
Do not load Ortszuordnung for messprogramm in "new messprogramm" dialog

diff -r 7cf7a8dc7818 -r 76ff6d084167 app/view/grid/Ortszuordnung.js
--- a/app/view/grid/Ortszuordnung.js	Wed Mar 08 16:00:48 2017 +0100
+++ b/app/view/grid/Ortszuordnung.js	Thu Mar 09 15:37:19 2017 +0100
@@ -184,12 +184,18 @@
         var modelname;
         if (this.isMessprogramm) {
             this.store = Ext.create('Lada.store.OrtszuordnungMp');
-            this.store.load({
-                params: {
-                    messprogrammId: this.recordId
-                }});
-            modelname = 'Lada.model.Messprogramm';
-        } else {
+            if (this.recordId) {
+                this.store.load({
+                    params: {
+                        messprogrammId: this.recordId
+                    }});
+                modelname = 'Lada.model.Messprogramm';
+            }
+            else {
+                return;
+            }
+        }
+        else {
             modelname = 'Lada.model.Probe';
             this.store = Ext.create('Lada.store.Ortszuordnung');
             this.store.load({


More information about the Lada-commits mailing list