annotate app/view/zusatzwerte/CreateForm.js @ 474:6f5a11dea7e2

Fixed HTML comment.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Fri, 17 Jan 2014 12:16:09 +0100
parents debfcc7713e3
children a07cf685606c
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 : [
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
15 'Lada.view.widgets.Probenzusatzwert'
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
16 ],
110
c4f97a5a9939 Added Forms to add Zusatzwerte
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
17 model: 'Lada.model.Zusatzwert',
c4f97a5a9939 Added Forms to add Zusatzwerte
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
18 initComponent: function() {
c4f97a5a9939 Added Forms to add Zusatzwerte
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
19 this.items = [
113
70f80c4ef90e Use new widgets in form for zusatzwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 110
diff changeset
20 {
122
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
21 xtype: 'probenzusatzwert',
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
22 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
23 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
24 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
25 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
26 '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
27 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
28 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
29 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
30 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
31 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
32 }
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 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
34 }
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 }
113
70f80c4ef90e Use new widgets in form for zusatzwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 110
diff changeset
36 },
70f80c4ef90e Use new widgets in form for zusatzwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 110
diff changeset
37 {
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
38 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
39 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
40 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
41 {
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
42 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
43 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
44 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
45 },
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 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
48 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
49 }
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 ]
113
70f80c4ef90e Use new widgets in form for zusatzwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 110
diff changeset
51 },
70f80c4ef90e Use new widgets in form for zusatzwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 110
diff changeset
52 {
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
53 xtype: 'numberfield',
113
70f80c4ef90e Use new widgets in form for zusatzwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 110
diff changeset
54 name: 'messfehler',
70f80c4ef90e Use new widgets in form for zusatzwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 110
diff changeset
55 fieldLabel: 'rel. Unsich.[%]'
70f80c4ef90e Use new widgets in form for zusatzwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 110
diff changeset
56 },
70f80c4ef90e Use new widgets in form for zusatzwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 110
diff changeset
57 {
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
58 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
59 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
60 fieldLabel: 'Nachweisgrenze'
113
70f80c4ef90e Use new widgets in form for zusatzwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 110
diff changeset
61 }
110
c4f97a5a9939 Added Forms to add Zusatzwerte
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
62 ];
c4f97a5a9939 Added Forms to add Zusatzwerte
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
63 this.callParent();
c4f97a5a9939 Added Forms to add Zusatzwerte
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
64 }
c4f97a5a9939 Added Forms to add Zusatzwerte
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
65 });
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
66

http://lada.wald.intevation.org