diff app/view/grid/Ortszuordnung.js @ 1289:bfdc00c24baf

Ortszuordnung for messprogramm and probe using same form
author Maximilian Krambach <mkrambach@intevation.de>
date Wed, 01 Feb 2017 14:52:51 +0100
parents a792eecf1614
children 394c722e5402
line wrap: on
line diff
--- a/app/view/grid/Ortszuordnung.js	Fri Jan 27 13:25:14 2017 +0100
+++ b/app/view/grid/Ortszuordnung.js	Wed Feb 01 14:52:51 2017 +0100
@@ -25,6 +25,8 @@
 
     recordId: null,
 
+    isMessprogramm: false,
+
     warnings: null,
     errors: null,
     readOnly: true,
@@ -164,25 +166,29 @@
     },
 
     initData: function() {
-        this.store = Ext.create('Lada.store.Ortszuordnung');
-        this.store.load({
-            params: {
-                probeId: this.recordId
-            }
-        });
-        Ext.ClassManager.get('Lada.model.Probe').load(this.recordId, {
-            failure: function(record, action) {
-                // TODO
-            },
-            success: function(record, response) {
-                var json = Ext.decode(response.response.responseText);
-                if (json) {
-                    this.warnings = json.warnings;
-                    this.errors = json.errors;
+        if (this.isMessprogramm) {
+            //TODO
+        } else {
+            this.store = Ext.create('Lada.store.Ortszuordnung');
+            this.store.load({
+                params: {
+                    probeId: this.recordId
                 }
-            },
-            scope: this
-        });
+            });
+            Ext.ClassManager.get('Lada.model.Probe').load(this.recordId, {
+                failure: function(record, action) {
+                    // TODO
+                },
+                success: function(record, response) {
+                    var json = Ext.decode(response.response.responseText);
+                    if (json) {
+                        this.warnings = json.warnings;
+                        this.errors = json.errors;
+                    }
+                },
+                scope: this
+            });
+        }
     },
 
     setReadOnly: function(b) {

http://lada.wald.intevation.org