Mercurial > lada > lada-client
annotate app/view/zusatzwerte/CreateForm.js @ 478:a07cf685606c
Added dependency to colum layout.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Tue, 21 Jan 2014 15:08:08 +0100 |
parents | debfcc7713e3 |
children | 850ccfe5f3c4 |
rev | line source |
---|---|
472
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
351
diff
changeset
|
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
351
diff
changeset
|
2 * Software engineering by Intevation GmbH |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
351
diff
changeset
|
3 * |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
351
diff
changeset
|
4 * This file is Free Software under the GNU GPL (v>=3) |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
351
diff
changeset
|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
351
diff
changeset
|
6 * the documentation coming with IMIS-Labordaten-Application for details. |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
351
diff
changeset
|
7 */ |
debfcc7713e3
Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
351
diff
changeset
|
8 |
351
8cb393ffe844
Added documenation
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
278
diff
changeset
|
9 /* |
8cb393ffe844
Added documenation
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
278
diff
changeset
|
10 * Formular to create and edit a Probenzusatzwert |
8cb393ffe844
Added documenation
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
278
diff
changeset
|
11 */ |
110
c4f97a5a9939
Added Forms to add Zusatzwerte
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
12 Ext.define('Lada.view.zusatzwerte.CreateForm', { |
c4f97a5a9939
Added Forms to add Zusatzwerte
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
13 extend: 'Lada.view.widgets.LadaForm', |
122
a7bfaeb1655d
Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
114
diff
changeset
|
14 requires : [ |
478
a07cf685606c
Added dependency to colum layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
472
diff
changeset
|
15 'Lada.view.widgets.Probenzusatzwert', |
a07cf685606c
Added dependency to colum layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
472
diff
changeset
|
16 'Ext.layout.container.Column' |
122
a7bfaeb1655d
Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
114
diff
changeset
|
17 ], |
110
c4f97a5a9939
Added Forms to add Zusatzwerte
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
18 model: 'Lada.model.Zusatzwert', |
c4f97a5a9939
Added Forms to add Zusatzwerte
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
19 initComponent: function() { |
c4f97a5a9939
Added Forms to add Zusatzwerte
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
20 this.items = [ |
113
70f80c4ef90e
Use new widgets in form for zusatzwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
110
diff
changeset
|
21 { |
122
a7bfaeb1655d
Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
114
diff
changeset
|
22 xtype: 'probenzusatzwert', |
a7bfaeb1655d
Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
114
diff
changeset
|
23 name: 'pzsId', |
143
62b757ccdd8f
Show Messeinheit next to the Messwert field and change the value if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
122
diff
changeset
|
24 fieldLabel: 'PZW-Größe', |
62b757ccdd8f
Show Messeinheit next to the Messwert field and change the value if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
122
diff
changeset
|
25 listeners: { |
62b757ccdd8f
Show Messeinheit next to the Messwert field and change the value if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
122
diff
changeset
|
26 scope: this, |
62b757ccdd8f
Show Messeinheit next to the Messwert field and change the value if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
122
diff
changeset
|
27 'change': function (field, newv, oldv, opts) { |
62b757ccdd8f
Show Messeinheit next to the Messwert field and change the value if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
122
diff
changeset
|
28 console.log(field, oldv, newv, opts); |
62b757ccdd8f
Show Messeinheit next to the Messwert field and change the value if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
122
diff
changeset
|
29 var ffield = this.getForm().findField("messeinheit"); |
62b757ccdd8f
Show Messeinheit next to the Messwert field and change the value if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
122
diff
changeset
|
30 pzsId = newv; |
62b757ccdd8f
Show Messeinheit next to the Messwert field and change the value if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
122
diff
changeset
|
31 if (pzsId == undefined) { |
62b757ccdd8f
Show Messeinheit next to the Messwert field and change the value if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
122
diff
changeset
|
32 pzsId = oldv; |
62b757ccdd8f
Show Messeinheit next to the Messwert field and change the value if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
122
diff
changeset
|
33 } |
62b757ccdd8f
Show Messeinheit next to the Messwert field and change the value if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
122
diff
changeset
|
34 ffield.setValue(this.model.getMesseinheit(pzsId)); |
62b757ccdd8f
Show Messeinheit next to the Messwert field and change the value if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
122
diff
changeset
|
35 } |
62b757ccdd8f
Show Messeinheit next to the Messwert field and change the value if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
122
diff
changeset
|
36 } |
113
70f80c4ef90e
Use new widgets in form for zusatzwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
110
diff
changeset
|
37 }, |
70f80c4ef90e
Use new widgets in form for zusatzwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
110
diff
changeset
|
38 { |
143
62b757ccdd8f
Show Messeinheit next to the Messwert field and change the value if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
122
diff
changeset
|
39 layout: "column", |
62b757ccdd8f
Show Messeinheit next to the Messwert field and change the value if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
122
diff
changeset
|
40 border: 0, |
62b757ccdd8f
Show Messeinheit next to the Messwert field and change the value if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
122
diff
changeset
|
41 items: [ |
62b757ccdd8f
Show Messeinheit next to the Messwert field and change the value if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
122
diff
changeset
|
42 { |
278
d6d74718a102
Clientseitige Überprüfung der Datenfelder hinzugefügt: Nutzung von "numberfields" bei Zahlenwerten, maxLength, min/maxValue
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
143
diff
changeset
|
43 xtype: 'numberfield', |
143
62b757ccdd8f
Show Messeinheit next to the Messwert field and change the value if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
122
diff
changeset
|
44 name: 'messwertPzs', |
62b757ccdd8f
Show Messeinheit next to the Messwert field and change the value if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
122
diff
changeset
|
45 fieldLabel: 'Messwert' |
62b757ccdd8f
Show Messeinheit next to the Messwert field and change the value if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
122
diff
changeset
|
46 }, |
62b757ccdd8f
Show Messeinheit next to the Messwert field and change the value if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
122
diff
changeset
|
47 { |
62b757ccdd8f
Show Messeinheit next to the Messwert field and change the value if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
122
diff
changeset
|
48 xtype: 'displayfield', |
62b757ccdd8f
Show Messeinheit next to the Messwert field and change the value if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
122
diff
changeset
|
49 name: 'messeinheit' |
62b757ccdd8f
Show Messeinheit next to the Messwert field and change the value if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
122
diff
changeset
|
50 } |
62b757ccdd8f
Show Messeinheit next to the Messwert field and change the value if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
122
diff
changeset
|
51 ] |
113
70f80c4ef90e
Use new widgets in form for zusatzwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
110
diff
changeset
|
52 }, |
70f80c4ef90e
Use new widgets in form for zusatzwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
110
diff
changeset
|
53 { |
278
d6d74718a102
Clientseitige Überprüfung der Datenfelder hinzugefügt: Nutzung von "numberfields" bei Zahlenwerten, maxLength, min/maxValue
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
143
diff
changeset
|
54 xtype: 'numberfield', |
113
70f80c4ef90e
Use new widgets in form for zusatzwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
110
diff
changeset
|
55 name: 'messfehler', |
70f80c4ef90e
Use new widgets in form for zusatzwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
110
diff
changeset
|
56 fieldLabel: 'rel. Unsich.[%]' |
70f80c4ef90e
Use new widgets in form for zusatzwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
110
diff
changeset
|
57 }, |
70f80c4ef90e
Use new widgets in form for zusatzwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
110
diff
changeset
|
58 { |
278
d6d74718a102
Clientseitige Überprüfung der Datenfelder hinzugefügt: Nutzung von "numberfields" bei Zahlenwerten, maxLength, min/maxValue
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
143
diff
changeset
|
59 xtype: 'numberfield', |
114
189a93e31be9
Worked on Zusatzwerte. No all values are displayed correct in the List and
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
113
diff
changeset
|
60 name: 'nwgZuMesswert', |
189a93e31be9
Worked on Zusatzwerte. No all values are displayed correct in the List and
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
113
diff
changeset
|
61 fieldLabel: 'Nachweisgrenze' |
113
70f80c4ef90e
Use new widgets in form for zusatzwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
110
diff
changeset
|
62 } |
110
c4f97a5a9939
Added Forms to add Zusatzwerte
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
63 ]; |
c4f97a5a9939
Added Forms to add Zusatzwerte
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
64 this.callParent(); |
c4f97a5a9939
Added Forms to add Zusatzwerte
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
65 } |
c4f97a5a9939
Added Forms to add Zusatzwerte
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
66 }); |
143
62b757ccdd8f
Show Messeinheit next to the Messwert field and change the value if the
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
122
diff
changeset
|
67 |