annotate app/view/form/Probe.js @ 1180:1ae5e4f0f2c8

Set allowBlank to false for mandatory fields to be filled by the user.
author Tom Gottfried <tom@intevation.de>
date Thu, 04 Aug 2016 17:15:57 +0200
parents 5e3d4136ecfb
children ec2b10d81343
rev   line source
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
2 * Software engineering by Intevation GmbH
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
3 *
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
4 * This file is Free Software under the GNU GPL (v>=3)
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
6 * the documentation coming with IMIS-Labordaten-Application for details.
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
7 */
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
8
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
9 /*
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
10 * Formular to edit a Probe
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
11 */
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
12 Ext.define('Lada.view.form.Probe', {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
13 extend: 'Ext.form.Panel',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
14 alias: 'widget.probeform',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
15 requires: [
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
16 'Lada.view.widget.Datenbasis',
1107
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents: 1068
diff changeset
17 'Lada.view.widget.DatensatzErzeuger',
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents: 1068
diff changeset
18 'Lada.view.widget.Probenehmer',
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents: 1068
diff changeset
19 'Lada.view.widget.MessprogrammLand',
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
20 'Lada.view.widget.base.CheckBox',
1066
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
21 'Lada.view.widget.MessstelleLabor',
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
22 'Lada.view.widget.Netzbetreiber',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
23 'Lada.view.widget.Betriebsart',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
24 'Lada.view.widget.Probenart',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
25 'Lada.view.widget.Umwelt',
771
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
26 'Lada.view.widget.Deskriptor',
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
27 'Lada.view.widget.base.TextField',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
28 'Lada.view.widget.base.Datetime',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
29 'Lada.view.widget.base.FieldSet',
646
d945cfeeebeb Im Probeform den Custom-Datetimepicker durch den Standard Datepicker ersetzt. So funktioniert die Lokalisierung besser
Dustin Demuth <dustin@intevation.de>
parents: 623
diff changeset
30 'Lada.view.widget.base.DateField',
771
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
31 'Lada.model.Probe'
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
32 ],
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
33
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
34 model: 'Lada.model.Probe',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
35 minWidth: 650,
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
36 margin: 5,
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
37 border: 0,
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
38
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
39 recordId: null,
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
40
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
41 trackResetOnLoad: true,
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
42
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
43 initComponent: function() {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
44 var me = this;
1155
1be581a403b5 Introduce i18n for Haupt- and Nebenprobennummer.
Tom Gottfried <tom@intevation.de>
parents: 1116
diff changeset
45 var i18n = Lada.getApplication().bundle;
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
46 this.items = [{
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
47 xtype: 'fieldset',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
48 title: 'Allgemein',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
49 items: [{
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
50 border: 0,
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
51 margin: '0, 0, 10, 0',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
52 dockedItems: [{
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
53 xtype: 'toolbar',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
54 dock: 'bottom',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
55 border: '0, 1, 1, 1',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
56 style: {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
57 borderBottom: '1px solid #b5b8c8 !important',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
58 borderLeft: '1px solid #b5b8c8 !important',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
59 borderRight: '1px solid #b5b8c8 !important'
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
60 },
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
61 items: ['->', {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
62 text: 'Speichern',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
63 qtip: 'Daten speichern',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
64 icon: 'resources/img/dialog-ok-apply.png',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
65 action: 'save',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
66 disabled: true
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
67 }, {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
68 text: 'Verwerfen',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
69 qtip: 'Änderungen verwerfen',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
70 icon: 'resources/img/dialog-cancel.png',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
71 action: 'discard',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
72 disabled: true
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
73 }]
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
74 }],
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
75 items: [{
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
76 layout: 'vbox',
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
77 border: 0,
1175
5e3d4136ecfb Changed title of Probe- and Messungs-mask/ added ProbeId as displayfield
Evi Huber <ehuber@bfs.de>
parents: 1155
diff changeset
78 items: [{
5e3d4136ecfb Changed title of Probe- and Messungs-mask/ added ProbeId as displayfield
Evi Huber <ehuber@bfs.de>
parents: 1155
diff changeset
79 xtype: 'displayfield',
5e3d4136ecfb Changed title of Probe- and Messungs-mask/ added ProbeId as displayfield
Evi Huber <ehuber@bfs.de>
parents: 1155
diff changeset
80 name: 'probeIdAlt',
5e3d4136ecfb Changed title of Probe- and Messungs-mask/ added ProbeId as displayfield
Evi Huber <ehuber@bfs.de>
parents: 1155
diff changeset
81 fieldLabel: i18n.getMsg('probeId'),
5e3d4136ecfb Changed title of Probe- and Messungs-mask/ added ProbeId as displayfield
Evi Huber <ehuber@bfs.de>
parents: 1155
diff changeset
82 margin: '0, 5, 5, 5',
5e3d4136ecfb Changed title of Probe- and Messungs-mask/ added ProbeId as displayfield
Evi Huber <ehuber@bfs.de>
parents: 1155
diff changeset
83 labelWidth: 95,
5e3d4136ecfb Changed title of Probe- and Messungs-mask/ added ProbeId as displayfield
Evi Huber <ehuber@bfs.de>
parents: 1155
diff changeset
84 maxLength: 20
5e3d4136ecfb Changed title of Probe- and Messungs-mask/ added ProbeId as displayfield
Evi Huber <ehuber@bfs.de>
parents: 1155
diff changeset
85 },{
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
86 layout: {
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
87 type: 'hbox',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
88 align: 'stretch'
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
89 },
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
90 border: 0,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
91 width: '100%',
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
92 items: [{
1066
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
93 xtype: 'messstellelabor',
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
94 name: 'mstlabor',
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
95 fieldLabel: 'Messstelle/Labor',
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
96 margin: '0, 5, 5, 5',
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
97 width: '35%',
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
98 labelWidth: 95,
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
99 allowBlank: false,
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
100 editable: true,
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
101 listeners: {
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
102 select: {
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
103 fn: function(combo, newValue) {
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
104 var mst = newValue[0].get('messStelle');
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
105 var labor = newValue[0].get('laborMst');
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
106 combo.up('fieldset').down('messstelle[name=mstId]').setValue(mst);
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
107 combo.up('fieldset').down('messstelle[name=laborMstId]').setValue(labor);
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
108 }
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
109 }
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
110 }
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
111 }, {
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
112 xtype: 'messstelle',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
113 name: 'mstId',
1066
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
114 fieldLabel: 'Messstelle/Labor',
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
115 margin: '0, 5, 5, 5',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
116 width: '35%',
1066
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
117 labelWidth: 95,
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
118 allowBlank: false,
1066
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
119 editable: true,
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
120 hidden: true
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
121 }, {
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
122 xtype: 'messstelle',
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
123 name: 'laborMstId',
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
124 fieldLabel: 'Messstelle/Labor',
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
125 margin: '0, 5, 5, 5',
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
126 width: '35%',
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
127 labelWidth: 95,
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
128 allowBlank: false,
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
129 editable: true,
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
130 hidden: true
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
131 }, {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
132 xtype: 'netzbetreiber',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
133 name: 'netzbetreiberId',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
134 editable: false,
847
95d40ca7bb70 Netbetreiber Combobox shall be readonly
Dustin Demuth <dustin@intevation.de>
parents: 838
diff changeset
135 readOnly: true,
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
136 fieldLabel: 'Netzbetreiber',
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
137 margin: '0, 5, 5, 5',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
138 width: '35%',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
139 labelWidth: 80,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
140 allowBlank: false
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
141 }, {
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
142 xtype: 'datenbasis',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
143 editable: false,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
144 name: 'datenbasisId',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
145 fieldLabel: 'Datenbasis',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
146 margin: '0, 5, 5, 5',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
147 width: '20%',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
148 labelWidth: 65
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
149 }, {
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
150 xtype: 'chkbox',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
151 name: 'test',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
152 fieldLabel: 'Test',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
153 margin: '0, 5, 5, 5',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
154 width: '10%',
623
19d81c9aa97f anchored all elements, to make them the same size, added a margin of 1px to the frame around the fieldset to prevent the cuttoff on the right side
Dustin Demuth <dustin@intevation.de>
parents: 611
diff changeset
155 anchor: '100%',
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
156 labelWidth: 30
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
157 }]
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
158 }, {
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
159 layout: {
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
160 type: 'hbox',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
161 align: 'stretch'
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
162 },
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
163 border: 0,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
164 width: '100%',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
165 items: [{
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
166 xtype: 'tfield',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
167 name: 'hauptprobenNr',
1155
1be581a403b5 Introduce i18n for Haupt- and Nebenprobennummer.
Tom Gottfried <tom@intevation.de>
parents: 1116
diff changeset
168 fieldLabel: i18n.getMsg('hauptprobenNr'),
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
169 margin: '0, 5, 5, 5',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
170 width: '35%',
1066
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
171 labelWidth: 95,
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
172 maxLength: 20,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
173 allowBlank: true
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
174 }, {
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
175 xtype: 'betriebsart',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
176 name: 'baId',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
177 fieldLabel: 'Messregime',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
178 margin: '0, 5, 5, 5',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
179 width: '35%',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
180 labelWidth: 80
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
181 }, {
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
182 xtype: 'probenart',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
183 editable: false,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
184 name: 'probenartId',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
185 fieldLabel: 'Probenart',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
186 margin: '0, 15, 5, 5',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
187 width: '20%',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
188 labelWidth: 65,
718
7f11b75e0188 Trailing Commas, editable: false for Umwelt und Messstelle widget
Dustin Demuth <dustin@intevation.de>
parents: 717
diff changeset
189 allowBlank: false
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
190 }]
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
191 }, {
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
192 layout: {
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
193 type: 'hbox',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
194 align: 'stretch'
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
195 },
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
196 border: 0,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
197 width: '100%',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
198 items: [{
1107
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents: 1068
diff changeset
199 xtype: 'probenehmer',
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
200 name: 'probeNehmerId',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
201 fieldLabel: 'Probennehmer',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
202 margin: '0, 5, 5, 5',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
203 width: '50%',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
204 minValue: 0,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
205 anchor: '100%',
1066
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
206 labelWidth: 95
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
207 }, {
1107
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents: 1068
diff changeset
208 xtype: 'datensatzerzeuger',
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents: 1068
diff changeset
209 name: 'erzeugerId',
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
210 fieldLabel: 'Datensatzerzeuger',
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
211 margin: '0, 5, 5, 5',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
212 width: '50%',
623
19d81c9aa97f anchored all elements, to make them the same size, added a margin of 1px to the frame around the fieldset to prevent the cuttoff on the right side
Dustin Demuth <dustin@intevation.de>
parents: 611
diff changeset
213 anchor: '100%',
928
e2a26f9733ee Minor UI styles.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 926
diff changeset
214 labelWidth: 110
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
215 }]
1107
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents: 1068
diff changeset
216 },{
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents: 1068
diff changeset
217 xtype: 'messprogrammland',
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents: 1068
diff changeset
218 name: 'mplId',
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents: 1068
diff changeset
219 fieldLabel: 'Messprogramm-Land',
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents: 1068
diff changeset
220 margin: '0, 5, 5, 5',
1116
92c0fa2f29b0 complete some comboboxes in probe form and messprogramm form
Michael Stanko <mstanko@bfs.de>
parents: 1107
diff changeset
221 width: '100%',
1107
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents: 1068
diff changeset
222 anchor: '100%',
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents: 1068
diff changeset
223 labelWidth: 110
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
224 }]
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
225 }, {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
226 // Zeit
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
227 xtype: 'fieldset',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
228 title: 'Zeit',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
229 layout: {
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
230 type: 'vbox',
646
d945cfeeebeb Im Probeform den Custom-Datetimepicker durch den Standard Datepicker ersetzt. So funktioniert die Lokalisierung besser
Dustin Demuth <dustin@intevation.de>
parents: 623
diff changeset
231 align: 'stretch'
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
232 },
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
233 items: [{
717
f124d24c8ade Datevalidation. When editing a timeperiod in a Probeform it is validated wheter begindate is before enddate. This only happens when the blur-event is fired. ToDo: Listen to Events from the Übernehmen Button of the DateTimePicker, ToDo: Somehow the ErrorMessages are not Cleared correctly when the form is restored.
Dustin Demuth <dustin@intevation.de>
parents: 685
diff changeset
234 xtype: 'fset',
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
235 name: 'sollzeitPeriod',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
236 width: '100%',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
237 border: 0,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
238 margin: 0,
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
239 layout: {
928
e2a26f9733ee Minor UI styles.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 926
diff changeset
240 type: 'hbox'
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
241 },
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
242 items: [{
931
746b429917a8 remove obsolate code from Probe-Form
Michael Stanko <mstanko@bfs.de>
parents: 930
diff changeset
243 xtype: 'datefield',
926
c75f13578315 Changed 'Solldatum' fields to readonly fields without default value.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 924
diff changeset
244 emptyText: ' ',
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
245 fieldLabel: 'Sollzeitraum von',
928
e2a26f9733ee Minor UI styles.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 926
diff changeset
246 labelWidth: 130,
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
247 margin: '0, 5, 5, 5',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
248 name: 'solldatumBeginn',
931
746b429917a8 remove obsolate code from Probe-Form
Michael Stanko <mstanko@bfs.de>
parents: 930
diff changeset
249 format: 'd.m.Y',
926
c75f13578315 Changed 'Solldatum' fields to readonly fields without default value.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 924
diff changeset
250 period: 'start',
c75f13578315 Changed 'Solldatum' fields to readonly fields without default value.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 924
diff changeset
251 readOnly: true
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
252 }, {
931
746b429917a8 remove obsolate code from Probe-Form
Michael Stanko <mstanko@bfs.de>
parents: 930
diff changeset
253 xtype: 'datefield',
926
c75f13578315 Changed 'Solldatum' fields to readonly fields without default value.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 924
diff changeset
254 emptyText: ' ',
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
255 fieldLabel: 'bis',
928
e2a26f9733ee Minor UI styles.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 926
diff changeset
256 labelWidth: 17,
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
257 margin: '0, 5, 5, 5',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
258 name: 'solldatumEnde',
931
746b429917a8 remove obsolate code from Probe-Form
Michael Stanko <mstanko@bfs.de>
parents: 930
diff changeset
259 format: 'd.m.Y',
926
c75f13578315 Changed 'Solldatum' fields to readonly fields without default value.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 924
diff changeset
260 period: 'end',
c75f13578315 Changed 'Solldatum' fields to readonly fields without default value.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 924
diff changeset
261 readOnly: true
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
262 }]
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
263 }, {
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
264 xtype: 'fset',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
265 name: 'entnahmePeriod',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
266 width: '100%',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
267 border: 0,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
268 margin: 0,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
269 layout: {
928
e2a26f9733ee Minor UI styles.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 926
diff changeset
270 type: 'hbox'
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
271 },
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
272 items: [{
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
273 xtype: 'datetime',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
274 fieldLabel: 'Probenentnahme von',
928
e2a26f9733ee Minor UI styles.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 926
diff changeset
275 labelWidth: 130,
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
276 margin: '0, 5, 5, 5',
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
277 name: 'probeentnahmeBeginn',
717
f124d24c8ade Datevalidation. When editing a timeperiod in a Probeform it is validated wheter begindate is before enddate. This only happens when the blur-event is fired. ToDo: Listen to Events from the Übernehmen Button of the DateTimePicker, ToDo: Somehow the ErrorMessages are not Cleared correctly when the form is restored.
Dustin Demuth <dustin@intevation.de>
parents: 685
diff changeset
278 format: 'd.m.Y H:i',
f124d24c8ade Datevalidation. When editing a timeperiod in a Probeform it is validated wheter begindate is before enddate. This only happens when the blur-event is fired. ToDo: Listen to Events from the Übernehmen Button of the DateTimePicker, ToDo: Somehow the ErrorMessages are not Cleared correctly when the form is restored.
Dustin Demuth <dustin@intevation.de>
parents: 685
diff changeset
279 period: 'start'
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
280 }, {
650
67963fcb7739 Removed old DateTimeField and replaced them with the new one.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 646
diff changeset
281 xtype: 'datetime',
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
282 fieldLabel: 'bis',
928
e2a26f9733ee Minor UI styles.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 926
diff changeset
283 labelWidth: 17,
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
284 margin: '0, 5, 5, 5',
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
285 name: 'probeentnahmeEnde',
717
f124d24c8ade Datevalidation. When editing a timeperiod in a Probeform it is validated wheter begindate is before enddate. This only happens when the blur-event is fired. ToDo: Listen to Events from the Übernehmen Button of the DateTimePicker, ToDo: Somehow the ErrorMessages are not Cleared correctly when the form is restored.
Dustin Demuth <dustin@intevation.de>
parents: 685
diff changeset
286 format: 'd.m.Y H:i',
f124d24c8ade Datevalidation. When editing a timeperiod in a Probeform it is validated wheter begindate is before enddate. This only happens when the blur-event is fired. ToDo: Listen to Events from the Übernehmen Button of the DateTimePicker, ToDo: Somehow the ErrorMessages are not Cleared correctly when the form is restored.
Dustin Demuth <dustin@intevation.de>
parents: 685
diff changeset
287 period: 'end'
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
288 }]
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
289 }]
838
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
290 }, {
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
291 // Medium
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
292 xtype: 'fieldset',
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
293 title: 'Medium',
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
294 width: '100%',
838
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
295 items: [{
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
296 border: 0,
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
297 layout: {
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
298 type: 'vbox',
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
299 align: 'stretch'
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
300 },
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
301 width: '100%',
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
302 items: [{
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
303 xtype: 'umwelt',
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
304 name: 'umwId',
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
305 fieldLabel: 'Umweltbereich',
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
306 labelWidth: 125,
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
307 allowBlank: false,
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
308 editable: true,
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
309 listeners: {
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
310 dirtychange: {
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
311 fn: this.updateOnChange,
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
312 scope: me
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
313 }
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
314 }
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
315 }, {
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
316 border: 0,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
317 layout: {
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
318 type: 'hbox',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
319 align: 'stretch'
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
320 },
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
321 width: '100%',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
322 items: [{
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
323 xtype: 'tfield',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
324 maxLength: 38,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
325 enforceMaxLength: true,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
326 name: 'mediaDesk',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
327 width: '60%',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
328 minWidth: 290,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
329 labelWidth: 125,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
330 fieldLabel: 'Deskriptoren',
930
efb8cf646771 Changed 'medie' and 'mediadesk' fields to readonly fields
Michael Stanko <mstanko@bfs.de>
parents: 928
diff changeset
331 editable: false,
efb8cf646771 Changed 'medie' and 'mediadesk' fields to readonly fields
Michael Stanko <mstanko@bfs.de>
parents: 928
diff changeset
332 readOnly: true,
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
333 listeners: {
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
334 dirtychange: {
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
335 fn: this.updateOnChange,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
336 scope: me
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
337 }
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
338 }
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
339 }, {
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
340 xtype: 'textfield',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
341 name: 'media',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
342 margin: '0, 10, 5, 10',
930
efb8cf646771 Changed 'medie' and 'mediadesk' fields to readonly fields
Michael Stanko <mstanko@bfs.de>
parents: 928
diff changeset
343 width: '40%',
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
344 enforceMaxLength: true,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
345 editable: false,
931
746b429917a8 remove obsolate code from Probe-Form
Michael Stanko <mstanko@bfs.de>
parents: 930
diff changeset
346 readOnly: true
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
347 }]
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
348 }, {
838
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
349 xtype: 'fieldset',
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
350 title: 'Details Deskriptoren',
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
351 collapsible: true,
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
352 collapsed: true,
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
353 layout: {
930
efb8cf646771 Changed 'medie' and 'mediadesk' fields to readonly fields
Michael Stanko <mstanko@bfs.de>
parents: 928
diff changeset
354 type: 'vbox',
efb8cf646771 Changed 'medie' and 'mediadesk' fields to readonly fields
Michael Stanko <mstanko@bfs.de>
parents: 928
diff changeset
355 align: 'stretch'
838
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
356 },
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
357 items: this.buildDescriptors()
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
358 }]
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
359 }]
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
360 }]
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
361 }]
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
362 }];
681
f373446325b4 a probe can not be edited when the readonly flag was sent by the server
Dustin Demuth <dustin@intevation.de>
parents: 671
diff changeset
363 this.callParent(arguments);
816
e25fcc9269df Removed a Bug where Datetimepickler errormessages where not reset on Form Discard
Dustin Demuth <dustin@intevation.de>
parents: 783
diff changeset
364 this.clearMessages();
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
365 },
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
366
1066
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
367 setRecord: function(probeRecord) {
717
f124d24c8ade Datevalidation. When editing a timeperiod in a Probeform it is validated wheter begindate is before enddate. This only happens when the blur-event is fired. ToDo: Listen to Events from the Übernehmen Button of the DateTimePicker, ToDo: Somehow the ErrorMessages are not Cleared correctly when the form is restored.
Dustin Demuth <dustin@intevation.de>
parents: 685
diff changeset
368 this.clearMessages();
1066
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
369 this.getForm().loadRecord(probeRecord);
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
370 if (!probeRecord.raw) {
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
371 return;
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
372 }
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
373 var mstStore = Ext.data.StoreManager.get('messstellen');
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
374 if (!probeRecord.get('owner')) {
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
375 var mstId = mstStore.getById(probeRecord.get('mstId'));
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
376 var laborMstId = mstStore.getById(probeRecord.get('laborMstId'));
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
377 if (laborMstId) {
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
378 laborMstId = laborMstId.get('messStelle');
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
379 }
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
380 else {
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
381 laborMstId = '';
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
382 }
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
383 var id = this.down('messstellelabor').store.count() + 1;
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
384 var newStore = Ext.create('Ext.data.Store', {
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
385 model: 'Lada.model.MessstelleLabor',
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
386 data: [{
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
387 id: id,
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
388 laborMst: probeRecord.get('laborMstId'),
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
389 messStelle: probeRecord.get('mstId'),
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
390 displayCombi: mstId.get('messStelle') +
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
391 '/' + laborMstId
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
392 }]
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
393 });
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
394 this.down('messstellelabor').down('combobox').store = newStore;
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
395 this.down('messstellelabor').setValue(id);
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
396 }
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
397 else {
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
398 var mstLaborStore = Ext.data.StoreManager.get('messstellelabor');
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
399 var items = mstLaborStore.queryBy(function(record) {
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
400 if (record.get('messStelle') === probeRecord.get('mstId') &&
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
401 record.get('laborMst') === probeRecord.get('laborMstId')) {
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
402 return true;
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
403 }
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
404 });
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
405 this.down('messstellelabor').setValue(items.getAt(0));
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
406 }
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
407 },
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
408
771
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
409 setMediaDesk: function(record) {
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
410 var media = record.get('mediaDesk').split(' ');
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
411 this.setMediaSN(0, media);
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
412 },
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
413
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
414 setMediaSN: function(ndx, media) {
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
415 if (ndx >= 12) {
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
416 return;
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
417 }
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
418 var me = this;
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
419 var current = this.down('deskriptor[layer=' + ndx + ']');
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
420 var cbox = current.down('combobox');
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
421 if (ndx === 0) {
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
422 cbox.store.proxy.extraParams = {
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
423 'layer': ndx
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
424 };
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
425 }
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
426 else {
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
427 var parents = current.getParents(current.down('combobox'));
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
428 if (parents.length === 0) {
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
429 return;
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
430 }
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
431 cbox.store.proxy.extraParams = {
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
432 'layer': ndx,
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
433 'parents': parents
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
434 };
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
435 }
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
436 cbox.store.load(function(records, op, success) {
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
437 if (!success) {
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
438 return;
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
439 }
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
440 cbox.select(cbox.store.findRecord('sn', parseInt(media[ndx + 1], 10)));
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
441 me.setMediaSN(++ndx, media);
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
442 });
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
443 },
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
444
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
445 setMessages: function(errors, warnings) {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
446 var key;
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
447 var element;
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
448 var content;
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
449 var i18n = Lada.getApplication().bundle;
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
450 if (warnings) {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
451 for (key in warnings) {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
452 element = this.down('component[name=' + key + ']');
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
453 if (!element) {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
454 continue;
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
455 }
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
456 content = warnings[key];
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
457 var warnText = '';
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
458 for (var i = 0; i < content.length; i++) {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
459 warnText += i18n.getMsg(content[i].toString()) + '\n';
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
460 }
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
461 element.showWarnings(warnText);
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
462 }
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
463 }
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
464 if (errors) {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
465 for (key in errors) {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
466 element = this.down('component[name=' + key + ']');
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
467 if (!element) {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
468 continue;
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
469 }
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
470 content = errors[key];
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
471 var errorText = '';
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
472 for (var i = 0; i < content.length; i++) {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
473 errorText += i18n.getMsg(content[i].toString()) + '\n';
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
474 }
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
475 element.showErrors(errorText);
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
476 }
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
477 }
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
478 },
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
479
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
480 clearMessages: function() {
1068
096d552508cd Set readonly state for messstelle-labor widget.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1066
diff changeset
481 this.down('cbox[name=mstlabor]').clearWarningOrError();
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
482 this.down('tfield[name=hauptprobenNr]').clearWarningOrError();
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
483 this.down('cbox[name=datenbasisId]').clearWarningOrError();
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
484 this.down('cbox[name=baId]').clearWarningOrError();
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
485 this.down('chkbox[name=test]').clearWarningOrError();
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
486 this.down('cbox[name=probenartId]').clearWarningOrError();
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
487 this.down('cbox[name=netzbetreiberId]').clearWarningOrError();
1107
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents: 1068
diff changeset
488 this.down('cbox[name=erzeugerId]').clearWarningOrError();
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
489 this.down('cbox[name=umwId]').clearWarningOrError();
652
05e4ad93d021 Fixed field names.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 650
diff changeset
490 this.down('datetime[name=probeentnahmeBeginn]').clearWarningOrError();
05e4ad93d021 Fixed field names.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 650
diff changeset
491 this.down('datetime[name=probeentnahmeEnde]').clearWarningOrError();
717
f124d24c8ade Datevalidation. When editing a timeperiod in a Probeform it is validated wheter begindate is before enddate. This only happens when the blur-event is fired. ToDo: Listen to Events from the Übernehmen Button of the DateTimePicker, ToDo: Somehow the ErrorMessages are not Cleared correctly when the form is restored.
Dustin Demuth <dustin@intevation.de>
parents: 685
diff changeset
492 this.down('fset[name=entnahmePeriod]').clearMessages();
f124d24c8ade Datevalidation. When editing a timeperiod in a Probeform it is validated wheter begindate is before enddate. This only happens when the blur-event is fired. ToDo: Listen to Events from the Übernehmen Button of the DateTimePicker, ToDo: Somehow the ErrorMessages are not Cleared correctly when the form is restored.
Dustin Demuth <dustin@intevation.de>
parents: 685
diff changeset
493 this.down('fset[name=sollzeitPeriod]').clearMessages();
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
494 },
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
495
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
496 setReadOnly: function(value) {
1068
096d552508cd Set readonly state for messstelle-labor widget.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1066
diff changeset
497 this.down('cbox[name=mstlabor]').setReadOnly(value);
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
498 this.down('tfield[name=hauptprobenNr]').setReadOnly(value);
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
499 this.down('cbox[name=datenbasisId]').setReadOnly(value);
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
500 this.down('cbox[name=baId]').setReadOnly(value);
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
501 this.down('chkbox[name=test]').setReadOnly(value);
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
502 this.down('cbox[name=probenartId]').setReadOnly(value);
1107
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents: 1068
diff changeset
503 this.down('cbox[name=erzeugerId]').setReadOnly(value);
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
504 this.down('cbox[name=umwId]').setReadOnly(value);
652
05e4ad93d021 Fixed field names.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 650
diff changeset
505 this.down('datetime[name=probeentnahmeBeginn]').setReadOnly(value);
05e4ad93d021 Fixed field names.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 650
diff changeset
506 this.down('datetime[name=probeentnahmeEnde]').setReadOnly(value);
1107
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents: 1068
diff changeset
507 this.down('cbox[name=probeNehmerId]').setReadOnly(value);
1116
92c0fa2f29b0 complete some comboboxes in probe form and messprogramm form
Michael Stanko <mstanko@bfs.de>
parents: 1107
diff changeset
508 this.down('cbox[name=mplId]').setReadOnly(value);
685
0391425689ed Also Deskriptoren must be set to readonly
Dustin Demuth <dustin@intevation.de>
parents: 684
diff changeset
509
0391425689ed Also Deskriptoren must be set to readonly
Dustin Demuth <dustin@intevation.de>
parents: 684
diff changeset
510 //Deskriptoren
0391425689ed Also Deskriptoren must be set to readonly
Dustin Demuth <dustin@intevation.de>
parents: 684
diff changeset
511 for (var i = 0; i < 12; i++) {
783
afdbe3770b99 Exclude deskriptor fields from form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 771
diff changeset
512 this.down('deskriptor[layer='+i+']').setReadOnly(value);
685
0391425689ed Also Deskriptoren must be set to readonly
Dustin Demuth <dustin@intevation.de>
parents: 684
diff changeset
513 }
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
514 },
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
515
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
516 buildDescriptors: function() {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
517 var fields = [];
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
518 for (var i = 0; i < 12; i++) {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
519 fields[i] = {
771
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
520 xtype: 'deskriptor',
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
521 fieldLabel: 'S' + i,
783
afdbe3770b99 Exclude deskriptor fields from form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 771
diff changeset
522 //name: 's' + i,
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
523 labelWidth: 25,
771
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
524 width: 190,
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
525 layer: i,
718
7f11b75e0188 Trailing Commas, editable: false for Umwelt und Messstelle widget
Dustin Demuth <dustin@intevation.de>
parents: 717
diff changeset
526 margin: '0, 10, 5, 0'
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
527 };
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
528 }
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
529 return fields;
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
530 }
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
531 });

http://lada.wald.intevation.org