annotate app/view/zusatzwerte/CreateForm.js @ 496:d07e5086a64b

Moved stammdaten stores to app.js and load them via storemanager.
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 06 Nov 2014 10:35:35 +0100
parents 850ccfe5f3c4
children 7c0653e8d9f7
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 ],
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
18
110
c4f97a5a9939 Added Forms to add Zusatzwerte
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
19 model: 'Lada.model.Zusatzwert',
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
20
110
c4f97a5a9939 Added Forms to add Zusatzwerte
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
21 initComponent: function() {
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
22 this.items = [{
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
23 xtype: 'probenzusatzwert',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
24 name: 'pzsId',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
25 fieldLabel: 'PZW-Größe',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
26 listeners: {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
27 scope: this,
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
28 'change': function (field, newv, oldv, opts) {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
29 console.log(field, oldv, newv, opts);
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
30 var ffield = this.getForm().findField("messeinheit");
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
31 pzsId = newv;
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
32 if (pzsId == undefined) {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
33 pzsId = oldv;
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
34 }
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
35 ffield.setValue(this.model.getMesseinheit(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
36 }
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
37 }
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
38 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
39 layout: "column",
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
40 border: 0,
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
41 items: [{
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',
491
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
43 name: 'messwertPzs',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
44 fieldLabel: 'Messwert'
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
45 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
46 xtype: 'displayfield',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
47 name: 'messeinheit'
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
48 }]
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
49 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
50 xtype: 'numberfield',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
51 name: 'messfehler',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
52 fieldLabel: 'rel. Unsich.[%]'
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
53 }, {
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
54 xtype: 'numberfield',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
55 name: 'nwgZuMesswert',
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
56 fieldLabel: 'Nachweisgrenze'
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
57 }];
850ccfe5f3c4 Code style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 478
diff changeset
58 this.callParent(arguments);
110
c4f97a5a9939 Added Forms to add Zusatzwerte
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
59 }
c4f97a5a9939 Added Forms to add Zusatzwerte
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
60 });
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
61

http://lada.wald.intevation.org