Mercurial > lada > lada-client
comparison app/view/proben/Edit.js @ 19:a05625ae08b1
Added more fields to the Edit-Dialog.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Tue, 07 May 2013 12:50:50 +0200 |
parents | 9e1a40312bbe |
children | 0a4674f17bcb |
comparison
equal
deleted
inserted
replaced
18:9e1a40312bbe | 19:a05625ae08b1 |
---|---|
1 Ext.define('Lada.view.proben.Edit', { | 1 Ext.define('Lada.view.proben.Edit', { |
2 extend: 'Ext.window.Window', | 2 extend: 'Ext.window.Window', |
3 alias: 'widget.probenedit', | 3 alias: 'widget.probenedit', |
4 | 4 |
5 title: 'Maske für §3-Proben', | 5 title: 'Maske für §3-Proben', |
6 width: 800, | |
6 layout: 'fit', | 7 layout: 'fit', |
7 autoShow: true, | 8 autoShow: true, |
8 | 9 |
9 initComponent: function() { | 10 initComponent: function() { |
10 this.items = [ | 11 this.items = [ |
11 { | 12 { |
13 //Define the form | |
12 xtype: 'form', | 14 xtype: 'form', |
13 items: [ | 15 items: [ |
14 { | 16 // Probenangaben |
15 xtype: 'textfield', | 17 { |
16 name : 'probeId', | 18 xtype: 'fieldset', |
17 fieldLabel: 'ID' | 19 title: 'Probenangaben', |
18 }, | 20 defaults: { |
19 { | 21 labelWidth: 150 |
20 xtype: 'textfield', | 22 }, |
21 name : 'datenbasisId', | 23 items: [ |
22 fieldLabel: 'Datenbasis' | 24 { |
25 xtype: 'textfield', | |
26 name: 'x1', | |
27 fieldLabel: 'Messstelle' | |
28 }, | |
29 { | |
30 xtype: 'textfield', | |
31 name: 'x2', | |
32 fieldLabel: 'Hauptprobennr.' | |
33 }, | |
34 { | |
35 xtype: 'textfield', | |
36 name: 'x3', | |
37 fieldLabel: 'Probe-ID' | |
38 }, | |
39 { | |
40 xtype: 'fieldset', | |
41 title: 'Erweiterte Probenangaben', | |
42 collapsible: true, | |
43 collapsed: true, | |
44 items: [ | |
45 { | |
46 xtype: 'textfield', | |
47 name: 'x4', | |
48 fieldLabel: 'Datebasis' | |
49 }, | |
50 { | |
51 xtype: 'textfield', | |
52 name: 'x5', | |
53 fieldLabel: 'RB/IB' | |
54 }, | |
55 { | |
56 xtype: 'textfield', | |
57 name: 'x6', | |
58 fieldLabel: 'Testdatensatz' | |
59 }, | |
60 { | |
61 xtype: 'textfield', | |
62 name: 'x7', | |
63 fieldLabel: 'Probenart' | |
64 }, | |
65 { | |
66 xtype: 'textfield', | |
67 name: 'x8', | |
68 fieldLabel: 'Phase' | |
69 }, | |
70 { | |
71 xtype: 'textfield', | |
72 name: 'x9', | |
73 fieldLabel: 'Szenario' | |
74 }, | |
75 { | |
76 xtype: 'textfield', | |
77 name: 'x10', | |
78 fieldLabel: 'Probennehmer' | |
79 }, | |
80 { | |
81 xtype: 'textfield', | |
82 name: 'x11', | |
83 fieldLabel: 'Datensatzerzeuger' | |
84 } | |
85 ] | |
86 } | |
87 ] | |
88 }, | |
89 // Medium | |
90 { | |
91 xtype: 'fieldset', | |
92 title: 'Medium', | |
93 defaults: { | |
94 labelWidth: 150 | |
95 }, | |
96 items: [ | |
97 { | |
98 xtype: 'textfield', | |
99 name: 'x12', | |
100 fieldLabel: 'Umweltbereich' | |
101 }, | |
102 { | |
103 xtype: 'textfield', | |
104 name: 'x13', | |
105 fieldLabel: 'Medienbezeichnung' | |
106 }, | |
107 { | |
108 xtype: 'textfield', | |
109 name: 'x14', | |
110 fieldLabel: 'Deskriptoren' | |
111 }, | |
112 { | |
113 xtype: 'fieldset', | |
114 title: 'Details Deskriptoren', | |
115 collapsible: true, | |
116 collapsed: true, | |
117 defaultType: 'textfield', | |
118 items: this.buildDescriptors() | |
119 } | |
120 ] | |
121 }, | |
122 // Zeit | |
123 { | |
124 xtype: 'fieldset', | |
125 title: 'Zeit', | |
126 defaultType: 'datefield', | |
127 defaults: { | |
128 labelWidth: 150 | |
129 }, | |
130 items: [ | |
131 { | |
132 fieldLabel: 'Probennahme Beginn', | |
133 name: 'z1' | |
134 }, | |
135 { | |
136 fieldLabel: 'Probennahme Ende', | |
137 name: 'z2' | |
138 }, | |
139 { | |
140 fieldLabel: 'Sollzeit Von', | |
141 name: 'z3' | |
142 }, | |
143 { | |
144 fieldLabel: 'Sollzeit Bis', | |
145 name: 'z4' | |
146 }, | |
147 { | |
148 fieldLabel: 'Ursprungszeit', | |
149 name: 'z5' | |
150 } | |
151 ] | |
152 }, | |
153 // Ortsangaben | |
154 { | |
155 xtype: 'fieldset', | |
156 title: 'Ortsangaben', | |
157 padding: '10 10', | |
158 items: [ | |
159 { | |
160 xtype: 'grid', | |
161 dockedItems: [ | |
162 { | |
163 xtype: 'toolbar', | |
164 dock: 'top', | |
165 items: [ | |
166 { | |
167 text: 'Hinzufügen', | |
168 icon: 'gfx/plus.gif' | |
169 }, | |
170 { | |
171 text: 'Löschen', | |
172 icon: 'gfx/minus.gif' | |
173 } | |
174 ] | |
175 } | |
176 ], | |
177 columns: [ | |
178 { | |
179 text: 'Typ' | |
180 }, | |
181 { | |
182 text: 'Staat' | |
183 }, | |
184 { | |
185 text: 'Gem-ID' | |
186 }, | |
187 { | |
188 text: 'Gemeindebezeichnung', | |
189 flex: 1 | |
190 }, | |
191 { | |
192 text: 'Messpunkt', | |
193 flex: 1 | |
194 } | |
195 ] | |
196 } | |
197 ] | |
198 }, | |
199 // Probenzusatzwerte | |
200 { | |
201 xtype: 'fieldset', | |
202 title: 'Probenzusatzwerte', | |
203 collapsible: true, | |
204 collapsed: true, | |
205 padding: '10 10', | |
206 items: [ | |
207 { | |
208 xtype: 'grid', | |
209 dockedItems: [ | |
210 { | |
211 xtype: 'toolbar', | |
212 dock: 'top', | |
213 items: [ | |
214 { | |
215 text: 'Hinzufügen', | |
216 icon: 'gfx/plus.gif' | |
217 }, | |
218 { | |
219 text: 'Löschen', | |
220 icon: 'gfx/minus.gif' | |
221 } | |
222 ] | |
223 } | |
224 ], | |
225 columns: [ | |
226 { | |
227 text: 'PZW-ID' | |
228 }, | |
229 { | |
230 text: 'PZW-Größe' | |
231 }, | |
232 { | |
233 text: '< NWG' | |
234 }, | |
235 { | |
236 text: '< PZW' | |
237 }, | |
238 { | |
239 text: 'rel. Unsich.[%]' | |
240 }, | |
241 { | |
242 text: 'Maßeinheit', | |
243 flex: 1 | |
244 } | |
245 ] | |
246 } | |
247 ] | |
248 }, | |
249 // Probenkommentar | |
250 { | |
251 xtype: 'fieldset', | |
252 title: 'Probenkommentare', | |
253 collapsible: true, | |
254 collapsed: true, | |
255 padding: '10 10', | |
256 items: [ | |
257 { | |
258 xtype: 'grid', | |
259 dockedItems: [ | |
260 { | |
261 xtype: 'toolbar', | |
262 dock: 'top', | |
263 items: [ | |
264 { | |
265 text: 'Hinzufügen', | |
266 icon: 'gfx/plus.gif' | |
267 }, | |
268 { | |
269 text: 'Löschen', | |
270 icon: 'gfx/minus.gif' | |
271 } | |
272 ] | |
273 } | |
274 ], | |
275 columns: [ | |
276 { | |
277 text: 'Erzeuger' | |
278 }, | |
279 { | |
280 text: 'Datum' | |
281 }, | |
282 { | |
283 text: 'Text', | |
284 flex: 1 | |
285 } | |
286 ] | |
287 } | |
288 ] | |
289 }, | |
290 // Messungsangaben | |
291 { | |
292 xtype: 'fieldset', | |
293 title: 'Messungsangaben', | |
294 padding: '10 10', | |
295 items: [ | |
296 { | |
297 xtype: 'grid', | |
298 dockedItems: [ | |
299 { | |
300 xtype: 'toolbar', | |
301 dock: 'top', | |
302 items: [ | |
303 { | |
304 text: 'Hinzufügen', | |
305 icon: 'gfx/plus.gif' | |
306 }, | |
307 { | |
308 text: 'Löschen', | |
309 icon: 'gfx/minus.gif' | |
310 } | |
311 ] | |
312 } | |
313 ], | |
314 columns: [ | |
315 { | |
316 text: 'Mess.ID', | |
317 width: 50 | |
318 }, | |
319 { | |
320 text: 'NPR-Nr.', | |
321 width: 50 | |
322 }, | |
323 { | |
324 text: 'MMT', | |
325 width: 50 | |
326 }, | |
327 { | |
328 text: 'Messzeit' | |
329 }, | |
330 { | |
331 text: 'Status' | |
332 }, | |
333 { | |
334 text: 'OK-Flag' | |
335 }, | |
336 { | |
337 text: 'Anzahl Nuklide' | |
338 }, | |
339 { | |
340 text: 'Anzahl Kommentare', | |
341 flex: 1 | |
342 } | |
343 ] | |
344 } | |
345 ] | |
23 } | 346 } |
24 ] | 347 ] |
25 } | 348 } |
26 ]; | 349 ]; |
27 | 350 |
35 scope: this, | 358 scope: this, |
36 handler: this.close | 359 handler: this.close |
37 } | 360 } |
38 ]; | 361 ]; |
39 this.callParent(arguments); | 362 this.callParent(arguments); |
363 }, | |
364 buildDescriptors: function() { | |
365 var fields = new Array(); | |
366 for ($i=0; $i<12; $i++) { | |
367 fields[$i] = {fieldLabel: 'S'+$i, name: 's'+$i}; | |
368 } | |
369 return fields; | |
40 } | 370 } |
41 }); | 371 }); |