Mercurial > lada > lada-client
comparison app/view/Viewport.js @ 184:cfa4ed3b62b5
Show search on app startup.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Fri, 05 Jul 2013 11:18:43 +0200 |
parents | 133df8f75a12 |
children | 38e84783785f |
comparison
equal
deleted
inserted
replaced
183:ceb04286152a | 184:cfa4ed3b62b5 |
---|---|
7 'Lada.view.proben.List' | 7 'Lada.view.proben.List' |
8 ], | 8 ], |
9 | 9 |
10 initComponent: function() { | 10 initComponent: function() { |
11 console.log('Setting up Viewport'); | 11 console.log('Setting up Viewport'); |
12 //this.initSearch(); | 12 this.initSearch(); |
13 | 13 |
14 // Development related: | 14 // Development related: |
15 // Disable "initSearch" call and enable one of the following init | 15 // Disable "initSearch" call and enable one of the following init |
16 // methods to get a dialog directly without the need to click through | 16 // methods to get a dialog directly without the need to click through |
17 // the whole application. | 17 // the whole application. |
18 this.initMessung(); | |
19 //this.initOrt(); | 18 //this.initOrt(); |
19 //this.initMessung(); | |
20 //this.initMesswert(); | |
20 | 21 |
21 this.callParent(arguments); | 22 this.callParent(arguments); |
22 }, | 23 }, |
23 initMesswert: function() { | 24 initMesswert: function() { |
24 var store = Ext.getStore('Messwerte'); | 25 var store = Ext.getStore('Messwerte'); |
25 store.load({ | 26 store.load({ |
26 params: { | 27 params: { |
27 probeId: "000007575853X", | 28 probeId: "000007575853X", |
28 messungsId: "1" | 29 messungsId: "1" |
30 }, | |
31 callback: function() { | |
32 var model = store.data.items[0]; | |
33 var win = Ext.create('Lada.view.messwerte.Create', {model: model}); | |
29 } | 34 } |
30 }); | 35 }); |
31 }, | 36 }, |
32 initOrt: function() { | 37 initOrt: function() { |
33 var ort = Ext.create('Lada.model.Ort'); | 38 var ort = Ext.create('Lada.model.Ort'); |
34 var win = Ext.create('Lada.view.orte.Create', {model: ort}); | 39 var win = Ext.create('Lada.view.orte.Create', {model: ort}); |
35 }, | 40 }, |
36 initMessung: function() { | 41 initMessung: function() { |
37 var store = Ext.getStore('Messungen'); | 42 var store = Ext.getStore('Messungen'); |
38 var kstore = Ext.getStore('MKommentare'); | 43 var kstore = Ext.getStore('MKommentare'); |
44 var mstore = Ext.getStore('Messwerte'); | |
45 var sstore = Ext.getStore('Status'); | |
39 probeId = "000007578314X"; | 46 probeId = "000007578314X"; |
40 store.load({ | 47 store.load({ |
41 params: { | 48 params: { |
42 probeId: probeId | 49 probeId: probeId |
43 }, | 50 }, |
47 console.log(store.data.items[0]); | 54 console.log(store.data.items[0]); |
48 kstore.load({ | 55 kstore.load({ |
49 params: { | 56 params: { |
50 probeId: probeId, | 57 probeId: probeId, |
51 messungsId: messung.get('messungsId') | 58 messungsId: messung.get('messungsId') |
52 }, | |
53 callback: function() { | |
54 console.log('Creating Messung window'); | |
55 //var messung = Ext.create('Lada.model.Messung'); | |
56 var win = Ext.create('Lada.view.messungen.Create', {model: messung}); | |
57 } | 59 } |
58 }); | 60 }); |
61 sstore.load({ | |
62 params: { | |
63 probeId: probeId, | |
64 messungsId: messung.get('messungsId') | |
65 } | |
66 }); | |
67 mstore.load({ | |
68 params: { | |
69 probeId: probeId, | |
70 messungsId: messung.get('messungsId') | |
71 } | |
72 }); | |
73 console.log('Creating Messung window'); | |
74 //var messung = Ext.create('Lada.model.Messung'); | |
75 var win = Ext.create('Lada.view.messungen.Create', {model: messung}); | |
59 } | 76 } |
60 }); | 77 }); |
61 }, | 78 }, |
62 initSearch: function() { | 79 initSearch: function() { |
63 this.items = { | 80 this.items = { |