diff app/view/Viewport.js @ 180:133df8f75a12

Added missing file.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Thu, 04 Jul 2013 12:21:51 +0200
parents 1a11ae666f11
children cfa4ed3b62b5
line wrap: on
line diff
--- a/app/view/Viewport.js	Thu Jul 04 12:21:25 2013 +0200
+++ b/app/view/Viewport.js	Thu Jul 04 12:21:51 2013 +0200
@@ -9,19 +9,55 @@
 
     initComponent: function() {
         console.log('Setting up Viewport');
-        this.initSearch();
+        //this.initSearch();
 
         // Development related: 
         // Disable "initSearch" call and enable one of the following init
         // methods to get a dialog directly without the need to click through
         // the whole application.
-        //this.initMessung();
+        this.initMessung();
+        //this.initOrt();
 
         this.callParent(arguments);
     },
+    initMesswert: function() {
+        var store = Ext.getStore('Messwerte');
+        store.load({
+            params: {
+                probeId: "000007575853X",
+                messungsId: "1"
+            }
+        });
+    },
+    initOrt: function() {
+        var ort = Ext.create('Lada.model.Ort');
+        var win = Ext.create('Lada.view.orte.Create', {model: ort});
+    },
     initMessung: function() {
-        var messung = Ext.create('Lada.model.Messung');
-        var win = Ext.create('Lada.view.messungen.Create', {model: messung});
+        var store = Ext.getStore('Messungen');
+        var kstore = Ext.getStore('MKommentare');
+        probeId = "000007578314X";
+        store.load({
+            params: {
+                probeId: probeId
+            },
+            callback: function () {
+                console.log(store);
+                var messung = store.data.items[0];
+                console.log(store.data.items[0]);
+                kstore.load({
+                    params: {
+                        probeId: probeId,
+                        messungsId: messung.get('messungsId')
+                    },
+                    callback: function() {
+                        console.log('Creating Messung window');
+                        //var messung = Ext.create('Lada.model.Messung');
+                        var win = Ext.create('Lada.view.messungen.Create', {model: messung});
+                    }
+                });
+            }
+        });
     },
     initSearch: function() {
         this.items = {

http://lada.wald.intevation.org