[Lada-commits] [PATCH 1 of 3] Show search on app startup

Wald Commits scm-commit at wald.intevation.org
Fri Jul 5 11:20:21 CEST 2013


# HG changeset patch
# User Torsten Irländer <torsten.irlaender at intevation.de>
# Date 1373015923 -7200
# Node ID cfa4ed3b62b5e7a4344bdb730ffdd90b223e4d07
# Parent  ceb04286152a0fd5b1ff670f2b73381aa95f0fad
Show search on app startup.

diff -r ceb04286152a -r cfa4ed3b62b5 app/view/Viewport.js
--- a/app/view/Viewport.js	Fri Jul 05 09:36:23 2013 +0200
+++ b/app/view/Viewport.js	Fri Jul 05 11:18:43 2013 +0200
@@ -9,14 +9,15 @@
 
     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.initOrt();
+        //this.initMessung();
+        //this.initMesswert();
 
         this.callParent(arguments);
     },
@@ -26,6 +27,10 @@
             params: {
                 probeId: "000007575853X",
                 messungsId: "1"
+            },
+            callback: function() {
+                var model = store.data.items[0];
+                var win = Ext.create('Lada.view.messwerte.Create', {model: model});
             }
         });
     },
@@ -36,6 +41,8 @@
     initMessung: function() {
         var store = Ext.getStore('Messungen');
         var kstore = Ext.getStore('MKommentare');
+        var mstore = Ext.getStore('Messwerte');
+        var sstore = Ext.getStore('Status');
         probeId = "000007578314X";
         store.load({
             params: {
@@ -49,13 +56,23 @@
                     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});
                     }
                 });
+                sstore.load({
+                    params: {
+                        probeId: probeId,
+                        messungsId: messung.get('messungsId')
+                    }
+                });
+                mstore.load({
+                    params: {
+                        probeId: probeId,
+                        messungsId: messung.get('messungsId')
+                    }
+                });
+                console.log('Creating Messung window');
+                //var messung = Ext.create('Lada.model.Messung');
+                var win = Ext.create('Lada.view.messungen.Create', {model: messung});
             }
         });
     },


More information about the Lada-commits mailing list