Mercurial > lada > lada-client
comparison app/view/proben/EditForm.js @ 71:db26aeebe521
Added new Form for editing proben. Use this form in the edit window.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Wed, 05 Jun 2013 16:20:54 +0200 |
parents | |
children | ee1d1305dcff |
comparison
equal
deleted
inserted
replaced
70:1a943947a7d2 | 71:db26aeebe521 |
---|---|
1 Ext.define('Lada.view.proben.EditForm', { | |
2 extend: 'Lada.view.widgets.LadaForm', | |
3 model: 'Lada.model.Probe', | |
4 | |
5 initComponent: function() { | |
6 this.items = [ | |
7 { | |
8 xtype: 'fieldset', | |
9 title: 'Probenangaben', | |
10 defaults: { | |
11 labelWidth: 150 | |
12 }, | |
13 items: [ | |
14 { | |
15 xtype: 'textfield', | |
16 name: 'mstId', | |
17 fieldLabel: 'Messstelle' | |
18 }, | |
19 { | |
20 xtype: 'textfield', | |
21 name: 'hauptprobenNr', | |
22 fieldLabel: 'Hauptprobennr.' | |
23 }, | |
24 { | |
25 xtype: 'textfield', | |
26 name: 'probeId', | |
27 fieldLabel: 'Probe-ID' | |
28 }, | |
29 { | |
30 xtype: 'fieldset', | |
31 title: 'Erweiterte Probenangaben', | |
32 collapsible: true, | |
33 collapsed: true, | |
34 items: [ | |
35 { | |
36 xtype: 'datenbasis', | |
37 id: 'datenbasis', | |
38 editable: false, | |
39 name: 'datenbasisId', | |
40 fieldLabel: 'Datenbasis' | |
41 }, | |
42 { | |
43 xtype: 'betriebsart', | |
44 name: 'baId', | |
45 fieldLabel: 'Betriebsart' | |
46 }, | |
47 { | |
48 xtype: 'testdatensatz', | |
49 name: 'test', | |
50 fieldLabel: 'Testdatensatz' | |
51 }, | |
52 // TODO: Fix Probenart, Is sent as list which | |
53 // causes an error on server side. | |
54 //{ | |
55 // xtype: 'probenart', | |
56 // id: 'probenart', | |
57 // editable: false, | |
58 // name: 'probenartId', | |
59 // fieldLabel: 'Probenart' | |
60 //}, | |
61 { | |
62 xtype: 'textfield', | |
63 name: 'probenartId', | |
64 fieldLabel: 'Probennehmer' | |
65 }, | |
66 { | |
67 xtype: 'textfield', | |
68 name: 'x11', | |
69 fieldLabel: 'Datensatzerzeuger' | |
70 } | |
71 ] | |
72 } | |
73 ] | |
74 }, | |
75 // Medium | |
76 { | |
77 xtype: 'fieldset', | |
78 title: 'Medium', | |
79 defaults: { | |
80 labelWidth: 150 | |
81 }, | |
82 items: [ | |
83 { | |
84 xtype: 'uwb', | |
85 name: 'umwId', | |
86 fieldLabel: 'Umweltbereich' | |
87 }, | |
88 { | |
89 xtype: 'textfield', | |
90 name: 'media', | |
91 fieldLabel: 'Medienbezeichnung' | |
92 }, | |
93 { | |
94 xtype: 'textfield', | |
95 name: 'mediaDesk', | |
96 fieldLabel: 'Deskriptoren' | |
97 }, | |
98 { | |
99 xtype: 'fieldset', | |
100 title: 'Details Deskriptoren', | |
101 collapsible: true, | |
102 collapsed: true, | |
103 defaultType: 'textfield', | |
104 items: this.buildDescriptors() | |
105 } | |
106 ] | |
107 }, | |
108 // Zeit | |
109 { | |
110 xtype: 'fieldset', | |
111 title: 'Zeit', | |
112 defaultType: 'datefield', | |
113 defaults: { | |
114 labelWidth: 150 | |
115 }, | |
116 items: [ | |
117 { | |
118 fieldLabel: 'Probennahme Beginn', | |
119 name: 'probeentnahmeBeginn' | |
120 }, | |
121 { | |
122 fieldLabel: 'Probennahme Ende', | |
123 name: 'probeentnahmeEnde' | |
124 }, | |
125 { | |
126 fieldLabel: 'Sollzeit Von', | |
127 name: 'solldatumBeginn' | |
128 }, | |
129 { | |
130 fieldLabel: 'Sollzeit Bis', | |
131 name: 'solldatumEnde' | |
132 }, | |
133 { | |
134 fieldLabel: 'Ursprungszeit', | |
135 name: 'z5' | |
136 } | |
137 ] | |
138 }, | |
139 // Ortsangaben | |
140 { | |
141 xtype: 'fieldset', | |
142 title: 'Ortsangaben', | |
143 padding: '10 10', | |
144 items: [ | |
145 { | |
146 xtype: 'grid', | |
147 dockedItems: [ | |
148 { | |
149 xtype: 'toolbar', | |
150 dock: 'top', | |
151 items: [ | |
152 { | |
153 text: 'Hinzufügen', | |
154 icon: 'gfx/plus.gif' | |
155 }, | |
156 { | |
157 text: 'Löschen', | |
158 icon: 'gfx/minus.gif' | |
159 } | |
160 ] | |
161 } | |
162 ], | |
163 columns: [ | |
164 { | |
165 text: 'Typ' | |
166 }, | |
167 { | |
168 text: 'Staat' | |
169 }, | |
170 { | |
171 text: 'Gem-ID' | |
172 }, | |
173 { | |
174 text: 'Gemeindebezeichnung', | |
175 flex: 1 | |
176 }, | |
177 { | |
178 text: 'Messpunkt', | |
179 flex: 1 | |
180 } | |
181 ] | |
182 } | |
183 ] | |
184 }, | |
185 // Probenzusatzwerte | |
186 { | |
187 xtype: 'fieldset', | |
188 title: 'Probenzusatzwerte', | |
189 collapsible: true, | |
190 collapsed: true, | |
191 padding: '10 10', | |
192 items: [ | |
193 { | |
194 xtype: 'grid', | |
195 dockedItems: [ | |
196 { | |
197 xtype: 'toolbar', | |
198 dock: 'top', | |
199 items: [ | |
200 { | |
201 text: 'Hinzufügen', | |
202 icon: 'gfx/plus.gif' | |
203 }, | |
204 { | |
205 text: 'Löschen', | |
206 icon: 'gfx/minus.gif' | |
207 } | |
208 ] | |
209 } | |
210 ], | |
211 columns: [ | |
212 { | |
213 text: 'PZW-ID' | |
214 }, | |
215 { | |
216 text: 'PZW-Größe' | |
217 }, | |
218 { | |
219 text: '< NWG' | |
220 }, | |
221 { | |
222 text: '< PZW' | |
223 }, | |
224 { | |
225 text: 'rel. Unsich.[%]' | |
226 }, | |
227 { | |
228 text: 'Maßeinheit', | |
229 flex: 1 | |
230 } | |
231 ] | |
232 } | |
233 ] | |
234 }, | |
235 // Probenkommentar | |
236 { | |
237 xtype: 'fieldset', | |
238 title: 'Probenkommentare', | |
239 collapsible: true, | |
240 collapsed: true, | |
241 padding: '10 10', | |
242 items: [ | |
243 { | |
244 xtype: 'kommentarelist' | |
245 } | |
246 ] | |
247 }, | |
248 // Messungsangaben | |
249 { | |
250 xtype: 'fieldset', | |
251 title: 'Messungsangaben', | |
252 padding: '10 10', | |
253 items: [ | |
254 { | |
255 xtype: 'grid', | |
256 dockedItems: [ | |
257 { | |
258 xtype: 'toolbar', | |
259 dock: 'top', | |
260 items: [ | |
261 { | |
262 text: 'Hinzufügen', | |
263 icon: 'gfx/plus.gif' | |
264 }, | |
265 { | |
266 text: 'Löschen', | |
267 icon: 'gfx/minus.gif' | |
268 } | |
269 ] | |
270 } | |
271 ], | |
272 columns: [ | |
273 { | |
274 text: 'Mess.ID', | |
275 width: 50 | |
276 }, | |
277 { | |
278 text: 'NPR-Nr.', | |
279 width: 50 | |
280 }, | |
281 { | |
282 text: 'MMT', | |
283 width: 50 | |
284 }, | |
285 { | |
286 text: 'Messzeit' | |
287 }, | |
288 { | |
289 text: 'Status' | |
290 }, | |
291 { | |
292 text: 'OK-Flag' | |
293 }, | |
294 { | |
295 text: 'Anzahl Nuklide' | |
296 }, | |
297 { | |
298 text: 'Anzahl Kommentare', | |
299 flex: 1 | |
300 } | |
301 ] | |
302 } | |
303 ] | |
304 } | |
305 | |
306 ]; | |
307 this.callParent(); | |
308 }, | |
309 buildDescriptors: function() { | |
310 var fields = new Array(); | |
311 for ($i=0; $i<12; $i++) { | |
312 fields[$i] = {fieldLabel: 'S'+$i, name: 's'+$i}; | |
313 } | |
314 return fields; | |
315 } | |
316 }); |