diff app/controller/Proben.js @ 490:446e99cfd425

Updated views and controllers using the new model and stores.
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 31 Oct 2014 21:28:31 +0100
parents debfcc7713e3
children 850ccfe5f3c4
line wrap: on
line diff
--- a/app/controller/Proben.js	Fri Oct 31 21:11:25 2014 +0100
+++ b/app/controller/Proben.js	Fri Oct 31 21:28:31 2014 +0100
@@ -88,7 +88,7 @@
         'Proben',
         'Zusatzwerte',
         'Probenzusatzwerte',
-        'Kommentare',
+        'KommentareP',
         'Orte',
         'Messungen'
     ],
@@ -200,7 +200,8 @@
     },
     editItem: function(grid, record) {
         console.log('Editing Probe');
-        var id = record.get('probeId');
+        var id = record.get('id');
+        console.log('id is: ' + id);
         // Load Zusatzwerte
         var pstore = this.getProbenzusatzwerteStore();
         pstore.load();
@@ -211,7 +212,7 @@
             }
         });
         // Load Kommentare
-        var kstore = this.getKommentareStore();
+        var kstore = this.getKommentarePStore();
         kstore.load({
             params: {
                 probeId: id
@@ -232,6 +233,7 @@
             }
         });
         var view = Ext.widget('probenedit', {modelId: id});
+        view.show();
         console.log("Loaded Probe with ID " + record.getId()); //outputs ID
     },
     createSuccess: function(form, record, response) {

http://lada.wald.intevation.org