diff app/controller/Messungen.js @ 224:5e056c5edf9a

Fixed loading stores when editing Messung.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Tue, 16 Jul 2013 13:56:38 +0200
parents 1b5a0cb4fa6c
children 80df1451b4a9
line wrap: on
line diff
--- a/app/controller/Messungen.js	Tue Jul 16 11:36:38 2013 +0200
+++ b/app/controller/Messungen.js	Tue Jul 16 13:56:38 2013 +0200
@@ -50,30 +50,29 @@
     },
     editMessung: function(grid, record) {
         console.log('Editing Messung');
-        var view = Ext.widget('messungencreate', {model: record});
-        console.log("Loaded Messung with ID " + record.getId()); //outputs ID
-
         var kstore = this.getMKommentareStore();
         kstore.load({
             params: {
-                probeId: probeId,
+                probeId: record.get('probeId'),
                 messungsId: record.get('messungsId')
             }
         });
         var sstore = this.getStatusStore();
         sstore.load({
             params: {
-                probeId: probeId,
+                probeId: record.get('probeId'),
                 messungsId: record.get('messungsId')
             }
         });
-        var mstore = this.getMessungwerteStore();
+        var mstore = this.getMesswerteStore();
         mstore.load({
             params: {
-                probeId: probeId,
+                probeId: record.get('probeId'),
                 messungsId: record.get('messungsId')
             }
         });
+        var view = Ext.widget('messungencreate', {model: record});
+        console.log("Loaded Messung with ID " + record.getId()); //outputs ID
     },
     deleteMessung: function(button) {
         // Get selected item in grid

http://lada.wald.intevation.org