annotate app/view/zusatzwerte/CreateForm.js @ 377:132c7b086fd5

merged.
author Raimund Renkert <rrenkert@intevation.de>
date Fri, 23 Aug 2013 12:58:52 +0200
parents 8cb393ffe844
children debfcc7713e3
rev   line source
351
8cb393ffe844 Added documenation
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 278
diff changeset
1 /*
8cb393ffe844 Added documenation
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 278
diff changeset
2 * Formular to create and edit a Probenzusatzwert
8cb393ffe844 Added documenation
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 278
diff changeset
3 */
110
c4f97a5a9939 Added Forms to add Zusatzwerte
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
4 Ext.define('Lada.view.zusatzwerte.CreateForm', {
c4f97a5a9939 Added Forms to add Zusatzwerte
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
5 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
6 requires : [
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
7 '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
8 ],
110
c4f97a5a9939 Added Forms to add Zusatzwerte
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
9 model: 'Lada.model.Zusatzwert',
c4f97a5a9939 Added Forms to add Zusatzwerte
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
10 initComponent: function() {
c4f97a5a9939 Added Forms to add Zusatzwerte
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
11 this.items = [
113
70f80c4ef90e Use new widgets in form for zusatzwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 110
diff changeset
12 {
122
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
13 xtype: 'probenzusatzwert',
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 114
diff changeset
14 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
15 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
16 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
17 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
18 '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
19 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
20 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
21 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
22 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
23 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
24 }
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 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
26 }
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 }
113
70f80c4ef90e Use new widgets in form for zusatzwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 110
diff changeset
28 },
70f80c4ef90e Use new widgets in form for zusatzwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 110
diff changeset
29 {
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
30 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
31 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
32 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
33 {
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
34 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
35 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
36 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
37 },
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 {
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 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
40 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
41 }
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 ]
113
70f80c4ef90e Use new widgets in form for zusatzwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 110
diff changeset
43 },
70f80c4ef90e Use new widgets in form for zusatzwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 110
diff changeset
44 {
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
45 xtype: 'numberfield',
113
70f80c4ef90e Use new widgets in form for zusatzwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 110
diff changeset
46 name: 'messfehler',
70f80c4ef90e Use new widgets in form for zusatzwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 110
diff changeset
47 fieldLabel: 'rel. Unsich.[%]'
70f80c4ef90e Use new widgets in form for zusatzwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 110
diff changeset
48 },
70f80c4ef90e Use new widgets in form for zusatzwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 110
diff changeset
49 {
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
50 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
51 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
52 fieldLabel: 'Nachweisgrenze'
113
70f80c4ef90e Use new widgets in form for zusatzwerte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 110
diff changeset
53 }
110
c4f97a5a9939 Added Forms to add Zusatzwerte
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
54 ];
c4f97a5a9939 Added Forms to add Zusatzwerte
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
55 this.callParent();
c4f97a5a9939 Added Forms to add Zusatzwerte
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
56 }
c4f97a5a9939 Added Forms to add Zusatzwerte
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
57 });
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
58

http://lada.wald.intevation.org