annotate app/view/Viewport.js @ 214:38e84783785f

Fix getting messerte, status and kommentare in debug mode
author Torsten Irländer <torsten.irlaender@intevation.de>
date Fri, 12 Jul 2013 15:58:02 +0200
parents cfa4ed3b62b5
children 7bea6974fb5b
rev   line source
12
cdcaf38eab45 Added Viewport class which should be used to setup the viewport. Currently not
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
1 Ext.define('Lada.view.Viewport' ,{
cdcaf38eab45 Added Viewport class which should be used to setup the viewport. Currently not
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
2 extend: 'Ext.container.Viewport',
cdcaf38eab45 Added Viewport class which should be used to setup the viewport. Currently not
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
3 requires: [
28
4d60b9ebce15 Renamed sql modul into search. Further display The query selection as Combobox
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 25
diff changeset
4 'Lada.view.search.List',
31
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
5 'Lada.view.search.Query1',
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
6 'Lada.view.search.Query2',
120
19eab475bbe5 Clean up part one. Reduced application to the search page. Moved some stores for comoboboxes right to the combobox
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 39
diff changeset
7 'Lada.view.proben.List'
12
cdcaf38eab45 Added Viewport class which should be used to setup the viewport. Currently not
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
8 ],
173
1a11ae666f11 Added options to open dialogs directly without the need to click through the
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 148
diff changeset
9
12
cdcaf38eab45 Added Viewport class which should be used to setup the viewport. Currently not
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
10 initComponent: function() {
cdcaf38eab45 Added Viewport class which should be used to setup the viewport. Currently not
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
11 console.log('Setting up Viewport');
184
cfa4ed3b62b5 Show search on app startup.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
12 this.initSearch();
173
1a11ae666f11 Added options to open dialogs directly without the need to click through the
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 148
diff changeset
13
1a11ae666f11 Added options to open dialogs directly without the need to click through the
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 148
diff changeset
14 // Development related:
1a11ae666f11 Added options to open dialogs directly without the need to click through the
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 148
diff changeset
15 // Disable "initSearch" call and enable one of the following init
1a11ae666f11 Added options to open dialogs directly without the need to click through the
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 148
diff changeset
16 // methods to get a dialog directly without the need to click through
1a11ae666f11 Added options to open dialogs directly without the need to click through the
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 148
diff changeset
17 // the whole application.
180
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
18 //this.initOrt();
184
cfa4ed3b62b5 Show search on app startup.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
19 //this.initMessung();
cfa4ed3b62b5 Show search on app startup.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
20 //this.initMesswert();
173
1a11ae666f11 Added options to open dialogs directly without the need to click through the
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 148
diff changeset
21
1a11ae666f11 Added options to open dialogs directly without the need to click through the
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 148
diff changeset
22 this.callParent(arguments);
1a11ae666f11 Added options to open dialogs directly without the need to click through the
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 148
diff changeset
23 },
180
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
24 initMesswert: function() {
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
25 var store = Ext.getStore('Messwerte');
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
26 store.load({
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
27 params: {
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
28 probeId: "000007575853X",
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
29 messungsId: "1"
184
cfa4ed3b62b5 Show search on app startup.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
30 },
cfa4ed3b62b5 Show search on app startup.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
31 callback: function() {
cfa4ed3b62b5 Show search on app startup.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
32 var model = store.data.items[0];
cfa4ed3b62b5 Show search on app startup.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
33 var win = Ext.create('Lada.view.messwerte.Create', {model: model});
180
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
34 }
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
35 });
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
36 },
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
37 initOrt: function() {
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
38 var ort = Ext.create('Lada.model.Ort');
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
39 var win = Ext.create('Lada.view.orte.Create', {model: ort});
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
40 },
173
1a11ae666f11 Added options to open dialogs directly without the need to click through the
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 148
diff changeset
41 initMessung: function() {
180
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
42 var store = Ext.getStore('Messungen');
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
43 var kstore = Ext.getStore('MKommentare');
184
cfa4ed3b62b5 Show search on app startup.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
44 var mstore = Ext.getStore('Messwerte');
cfa4ed3b62b5 Show search on app startup.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
45 var sstore = Ext.getStore('Status');
180
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
46 probeId = "000007578314X";
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
47 store.load({
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
48 params: {
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
49 probeId: probeId
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
50 },
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
51 callback: function () {
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
52 console.log(store);
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
53 var messung = store.data.items[0];
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
54 console.log(store.data.items[0]);
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
55 kstore.load({
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
56 params: {
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
57 probeId: probeId,
214
38e84783785f Fix getting messerte, status and kommentare in debug mode
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 184
diff changeset
58 messungsId: messung.get('id').messungsId
180
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
59 }
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
60 });
184
cfa4ed3b62b5 Show search on app startup.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
61 sstore.load({
cfa4ed3b62b5 Show search on app startup.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
62 params: {
cfa4ed3b62b5 Show search on app startup.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
63 probeId: probeId,
214
38e84783785f Fix getting messerte, status and kommentare in debug mode
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 184
diff changeset
64 messungsId: messung.get('id').messungsId
184
cfa4ed3b62b5 Show search on app startup.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
65 }
cfa4ed3b62b5 Show search on app startup.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
66 });
cfa4ed3b62b5 Show search on app startup.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
67 mstore.load({
cfa4ed3b62b5 Show search on app startup.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
68 params: {
cfa4ed3b62b5 Show search on app startup.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
69 probeId: probeId,
214
38e84783785f Fix getting messerte, status and kommentare in debug mode
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 184
diff changeset
70 messungsId: messung.get('id').messungsId
184
cfa4ed3b62b5 Show search on app startup.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
71 }
cfa4ed3b62b5 Show search on app startup.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
72 });
cfa4ed3b62b5 Show search on app startup.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
73 console.log('Creating Messung window');
cfa4ed3b62b5 Show search on app startup.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
74 //var messung = Ext.create('Lada.model.Messung');
cfa4ed3b62b5 Show search on app startup.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 180
diff changeset
75 var win = Ext.create('Lada.view.messungen.Create', {model: messung});
180
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
76 }
133df8f75a12 Added missing file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 173
diff changeset
77 });
173
1a11ae666f11 Added options to open dialogs directly without the need to click through the
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 148
diff changeset
78 },
1a11ae666f11 Added options to open dialogs directly without the need to click through the
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 148
diff changeset
79 initSearch: function() {
12
cdcaf38eab45 Added Viewport class which should be used to setup the viewport. Currently not
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
80 this.items = {
25
f964a50bfe57 Restructured the application. Fixed layouts etc.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 12
diff changeset
81 xtype: 'panel',
f964a50bfe57 Restructured the application. Fixed layouts etc.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 12
diff changeset
82 title: '<center>Probenauswahlmaske</center>',
f964a50bfe57 Restructured the application. Fixed layouts etc.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 12
diff changeset
83 bodyPadding: '10 10',
f964a50bfe57 Restructured the application. Fixed layouts etc.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 12
diff changeset
84 items: [
31
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
85 // Auswahl einer Abfrage.
25
f964a50bfe57 Restructured the application. Fixed layouts etc.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 12
diff changeset
86 {
28
4d60b9ebce15 Renamed sql modul into search. Further display The query selection as Combobox
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 25
diff changeset
87 xtype: 'queryselector',
25
f964a50bfe57 Restructured the application. Fixed layouts etc.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 12
diff changeset
88 margin: '0 0 10 0'
f964a50bfe57 Restructured the application. Fixed layouts etc.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 12
diff changeset
89 },
f964a50bfe57 Restructured the application. Fixed layouts etc.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 12
diff changeset
90 // Variables settings for the current selected sql statement.
31
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
91 {
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
92 id: 'query1',
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
93 xtype: 'query1',
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
94 hidden: true
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
95 },
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
96 {
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
97 id: 'query2',
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
98 xtype: 'query2',
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
99 hidden: true
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
100
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
101 },
120
19eab475bbe5 Clean up part one. Reduced application to the search page. Moved some stores for comoboboxes right to the combobox
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 39
diff changeset
102 // Buttons to trigger the search.
31
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
103 {
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
104 id: 'SearchBtnPanel',
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
105 xtype: 'panel',
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
106 border: false,
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
107 margin: '0 0 10 0',
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
108 items: [
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
109 {
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
110 id: 'SearchBtn',
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
111 text: 'Suchen',
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
112 xtype: 'button',
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
113 margin: '0 10 0 0'
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
114 },
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
115 {
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
116 id: 'ResetBtn',
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
117 text: 'Zurücksetzen',
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
118 xtype: 'button'
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
119 }
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
120 ],
148
ed7fb4fa32dc Do not hide search buttons and the resultlist on initial load.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 120
diff changeset
121 hidden: false
31
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
122
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
123 },
25
f964a50bfe57 Restructured the application. Fixed layouts etc.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 12
diff changeset
124 // Resultlist for the query.
f964a50bfe57 Restructured the application. Fixed layouts etc.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 12
diff changeset
125 {
f964a50bfe57 Restructured the application. Fixed layouts etc.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 12
diff changeset
126 id: 'result',
31
897e3100c6da Changed logic of the Probenauswahl. Now logic works like the BFS version.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 28
diff changeset
127 xtype: 'probenlist',
148
ed7fb4fa32dc Do not hide search buttons and the resultlist on initial load.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 120
diff changeset
128 hidden: false
25
f964a50bfe57 Restructured the application. Fixed layouts etc.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 12
diff changeset
129 }
f964a50bfe57 Restructured the application. Fixed layouts etc.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 12
diff changeset
130 ]
12
cdcaf38eab45 Added Viewport class which should be used to setup the viewport. Currently not
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
131 };
cdcaf38eab45 Added Viewport class which should be used to setup the viewport. Currently not
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
132 }
cdcaf38eab45 Added Viewport class which should be used to setup the viewport. Currently not
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
133 });

http://lada.wald.intevation.org