annotate app/view/form/Probe.js @ 1425:68e579063a47

Improve readability.
author Tom Gottfried <tom@intevation.de>
date Thu, 06 Apr 2017 12:17:59 +0200
parents ee21d0e1b998
children
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',
1189
ec2b10d81343 Add missing requirements.
Tom Gottfried <tom@intevation.de>
parents: 1175
diff changeset
31 'Lada.view.window.MessungCreate',
771
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
32 'Lada.model.Probe'
548
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
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
35 model: 'Lada.model.Probe',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
36 minWidth: 650,
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
37 margin: 5,
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
38 border: 0,
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
39
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
40 recordId: null,
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
41
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
42 trackResetOnLoad: true,
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
43
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
44 initComponent: function() {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
45 var me = this;
1155
1be581a403b5 Introduce i18n for Haupt- and Nebenprobennummer.
Tom Gottfried <tom@intevation.de>
parents: 1116
diff changeset
46 var i18n = Lada.getApplication().bundle;
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
47 this.items = [{
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
48 xtype: 'fieldset',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
49 title: 'Allgemein',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
50 items: [{
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
51 border: 0,
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
52 margin: '0, 0, 10, 0',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
53 dockedItems: [{
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
54 xtype: 'toolbar',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
55 dock: 'bottom',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
56 border: '0, 1, 1, 1',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
57 style: {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
58 borderBottom: '1px solid #b5b8c8 !important',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
59 borderLeft: '1px solid #b5b8c8 !important',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
60 borderRight: '1px solid #b5b8c8 !important'
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
61 },
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
62 items: ['->', {
1386
7e9a6f0e55b3 Added UI for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1384
diff changeset
63 text: i18n.getMsg('audittrail'),
7e9a6f0e55b3 Added UI for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1384
diff changeset
64 qtip: i18n.getMsg('qtip.audit'),
7e9a6f0e55b3 Added UI for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1384
diff changeset
65 icon: 'resources/img/distribute-vertical-center.png',
7e9a6f0e55b3 Added UI for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1384
diff changeset
66 action: 'audit',
7e9a6f0e55b3 Added UI for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1384
diff changeset
67 disabled: this.recordId === null
7e9a6f0e55b3 Added UI for audit trail.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1384
diff changeset
68 }, {
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
69 text: 'Speichern',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
70 qtip: 'Daten speichern',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
71 icon: 'resources/img/dialog-ok-apply.png',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
72 action: 'save',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
73 disabled: true
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 text: 'Verwerfen',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
76 qtip: 'Änderungen verwerfen',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
77 icon: 'resources/img/dialog-cancel.png',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
78 action: 'discard',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
79 disabled: true
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
80 }]
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
81 }],
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
82 items: [{
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
83 layout: 'vbox',
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
84 border: 0,
1175
5e3d4136ecfb Changed title of Probe- and Messungs-mask/ added ProbeId as displayfield
Evi Huber <ehuber@bfs.de>
parents: 1155
diff changeset
85 items: [{
5e3d4136ecfb Changed title of Probe- and Messungs-mask/ added ProbeId as displayfield
Evi Huber <ehuber@bfs.de>
parents: 1155
diff changeset
86 xtype: 'displayfield',
1243
03826fba90bb Changed probeIdAlt to idAlt
Evi Huber <ehuber@bfs.de>
parents: 1235
diff changeset
87 name: 'idAlt',
1175
5e3d4136ecfb Changed title of Probe- and Messungs-mask/ added ProbeId as displayfield
Evi Huber <ehuber@bfs.de>
parents: 1155
diff changeset
88 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
89 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
90 labelWidth: 95,
5e3d4136ecfb Changed title of Probe- and Messungs-mask/ added ProbeId as displayfield
Evi Huber <ehuber@bfs.de>
parents: 1155
diff changeset
91 maxLength: 20
5e3d4136ecfb Changed title of Probe- and Messungs-mask/ added ProbeId as displayfield
Evi Huber <ehuber@bfs.de>
parents: 1155
diff changeset
92 },{
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
93 layout: {
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
94 type: 'hbox',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
95 align: 'stretch'
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
96 },
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
97 border: 0,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
98 width: '100%',
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
99 items: [{
1066
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
100 xtype: 'messstellelabor',
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
101 name: 'mstlabor',
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
102 fieldLabel: 'Messstelle/Labor',
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
103 margin: '0, 5, 5, 5',
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
104 width: '35%',
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
105 labelWidth: 95,
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
106 allowBlank: false,
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
107 editable: true,
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
108 listeners: {
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
109 select: {
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
110 fn: function(combo, newValue) {
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
111 var mst = newValue[0].get('messStelle');
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
112 var labor = newValue[0].get('laborMst');
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
113 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
114 combo.up('fieldset').down('messstelle[name=laborMstId]').setValue(labor);
1396
418b9afee700 changed MessprogrammKategorie pageSize and added filter for combo dependent on selected messstelle in probeform and messprogrammform
Evi Huber <ehuber@bfs.de>
parents: 1384
diff changeset
115 combo.up('fieldset').down('messprogrammland[name=mplId]').setValue();
1066
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
116 }
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
117 }
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
118 }
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
119 }, {
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
120 xtype: 'messstelle',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
121 name: 'mstId',
1066
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
122 fieldLabel: 'Messstelle/Labor',
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
123 margin: '0, 5, 5, 5',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
124 width: '35%',
1066
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
125 labelWidth: 95,
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
126 allowBlank: false,
1066
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
127 editable: true,
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
128 hidden: true
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
129 }, {
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
130 xtype: 'messstelle',
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
131 name: 'laborMstId',
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
132 fieldLabel: 'Messstelle/Labor',
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
133 margin: '0, 5, 5, 5',
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
134 width: '35%',
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
135 labelWidth: 95,
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
136 allowBlank: false,
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
137 editable: true,
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
138 hidden: true
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
139 }, {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
140 xtype: 'netzbetreiber',
1396
418b9afee700 changed MessprogrammKategorie pageSize and added filter for combo dependent on selected messstelle in probeform and messprogrammform
Evi Huber <ehuber@bfs.de>
parents: 1384
diff changeset
141 name: 'netzbetreiber',
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
142 editable: false,
847
95d40ca7bb70 Netbetreiber Combobox shall be readonly
Dustin Demuth <dustin@intevation.de>
parents: 838
diff changeset
143 readOnly: true,
1217
4270da0f7d3b Merged branch schema-update into default.
Tom Gottfried <tom@intevation.de>
parents: 1189
diff changeset
144 isFormField: false,
4270da0f7d3b Merged branch schema-update into default.
Tom Gottfried <tom@intevation.de>
parents: 1189
diff changeset
145 submitValue: false,
1235
d1f43f1e7e84 Fix setting Netzbetreiber in Messprogramm.
Tom Gottfried <tom@intevation.de>
parents: 1234
diff changeset
146 fieldLabel: i18n.getMsg('netzbetreiberId'),
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
147 margin: '0, 5, 5, 5',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
148 width: '35%',
1235
d1f43f1e7e84 Fix setting Netzbetreiber in Messprogramm.
Tom Gottfried <tom@intevation.de>
parents: 1234
diff changeset
149 labelWidth: 80
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
150 }, {
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
151 xtype: 'datenbasis',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
152 editable: false,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
153 name: 'datenbasisId',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
154 fieldLabel: 'Datenbasis',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
155 margin: '0, 5, 5, 5',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
156 width: '20%',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
157 labelWidth: 65
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 xtype: 'chkbox',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
160 name: 'test',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
161 fieldLabel: 'Test',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
162 margin: '0, 5, 5, 5',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
163 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
164 anchor: '100%',
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
165 labelWidth: 30
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
166 }]
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
167 }, {
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
168 layout: {
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
169 type: 'hbox',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
170 align: 'stretch'
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
171 },
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
172 border: 0,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
173 width: '100%',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
174 items: [{
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
175 xtype: 'tfield',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
176 name: 'hauptprobenNr',
1155
1be581a403b5 Introduce i18n for Haupt- and Nebenprobennummer.
Tom Gottfried <tom@intevation.de>
parents: 1116
diff changeset
177 fieldLabel: i18n.getMsg('hauptprobenNr'),
924
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%',
1066
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
180 labelWidth: 95,
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
181 maxLength: 20,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
182 allowBlank: true
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
183 }, {
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
184 xtype: 'betriebsart',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
185 name: 'baId',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
186 fieldLabel: 'Messregime',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
187 margin: '0, 5, 5, 5',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
188 width: '35%',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
189 labelWidth: 80
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 xtype: 'probenart',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
192 editable: false,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
193 name: 'probenartId',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
194 fieldLabel: 'Probenart',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
195 margin: '0, 15, 5, 5',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
196 width: '20%',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
197 labelWidth: 65,
718
7f11b75e0188 Trailing Commas, editable: false for Umwelt und Messstelle widget
Dustin Demuth <dustin@intevation.de>
parents: 717
diff changeset
198 allowBlank: false
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
199 }]
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
200 }, {
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
201 layout: {
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
202 type: 'hbox',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
203 align: 'stretch'
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
204 },
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
205 border: 0,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
206 width: '100%',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
207 items: [{
1107
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents: 1068
diff changeset
208 xtype: 'probenehmer',
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
209 name: 'probeNehmerId',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
210 fieldLabel: 'Probennehmer',
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%',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
213 minValue: 0,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
214 anchor: '100%',
1066
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
215 labelWidth: 95
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
216 }, {
1107
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents: 1068
diff changeset
217 xtype: 'datensatzerzeuger',
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents: 1068
diff changeset
218 name: 'erzeugerId',
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
219 fieldLabel: 'Datensatzerzeuger',
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
220 margin: '0, 5, 5, 5',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
221 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
222 anchor: '100%',
928
e2a26f9733ee Minor UI styles.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 926
diff changeset
223 labelWidth: 110
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
224 }]
1107
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents: 1068
diff changeset
225 },{
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents: 1068
diff changeset
226 xtype: 'messprogrammland',
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents: 1068
diff changeset
227 name: 'mplId',
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents: 1068
diff changeset
228 fieldLabel: 'Messprogramm-Land',
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents: 1068
diff changeset
229 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
230 width: '100%',
1107
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents: 1068
diff changeset
231 anchor: '100%',
1396
418b9afee700 changed MessprogrammKategorie pageSize and added filter for combo dependent on selected messstelle in probeform and messprogrammform
Evi Huber <ehuber@bfs.de>
parents: 1384
diff changeset
232 labelWidth: 110,
418b9afee700 changed MessprogrammKategorie pageSize and added filter for combo dependent on selected messstelle in probeform and messprogrammform
Evi Huber <ehuber@bfs.de>
parents: 1384
diff changeset
233 listeners: {
418b9afee700 changed MessprogrammKategorie pageSize and added filter for combo dependent on selected messstelle in probeform and messprogrammform
Evi Huber <ehuber@bfs.de>
parents: 1384
diff changeset
234 expand : {
418b9afee700 changed MessprogrammKategorie pageSize and added filter for combo dependent on selected messstelle in probeform and messprogrammform
Evi Huber <ehuber@bfs.de>
parents: 1384
diff changeset
235 fn: function(combo) {
418b9afee700 changed MessprogrammKategorie pageSize and added filter for combo dependent on selected messstelle in probeform and messprogrammform
Evi Huber <ehuber@bfs.de>
parents: 1384
diff changeset
236 Ext.StoreManager.get('messprogrammkategorie').clearFilter();
418b9afee700 changed MessprogrammKategorie pageSize and added filter for combo dependent on selected messstelle in probeform and messprogrammform
Evi Huber <ehuber@bfs.de>
parents: 1384
diff changeset
237 Ext.StoreManager.get('messprogrammkategorie').filter('netzbetreiberId', combo.up('fieldset').down('netzbetreiber[name=netzbetreiber]').getValue());
418b9afee700 changed MessprogrammKategorie pageSize and added filter for combo dependent on selected messstelle in probeform and messprogrammform
Evi Huber <ehuber@bfs.de>
parents: 1384
diff changeset
238 }
418b9afee700 changed MessprogrammKategorie pageSize and added filter for combo dependent on selected messstelle in probeform and messprogrammform
Evi Huber <ehuber@bfs.de>
parents: 1384
diff changeset
239 }
418b9afee700 changed MessprogrammKategorie pageSize and added filter for combo dependent on selected messstelle in probeform and messprogrammform
Evi Huber <ehuber@bfs.de>
parents: 1384
diff changeset
240 }
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 }, {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
243 // Zeit
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
244 xtype: 'fieldset',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
245 title: 'Zeit',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
246 layout: {
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
247 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
248 align: 'stretch'
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
249 },
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
250 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
251 xtype: 'fset',
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
252 name: 'sollzeitPeriod',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
253 width: '100%',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
254 border: 0,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
255 margin: 0,
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
256 layout: {
928
e2a26f9733ee Minor UI styles.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 926
diff changeset
257 type: 'hbox'
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
258 },
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
259 items: [{
931
746b429917a8 remove obsolate code from Probe-Form
Michael Stanko <mstanko@bfs.de>
parents: 930
diff changeset
260 xtype: 'datefield',
926
c75f13578315 Changed 'Solldatum' fields to readonly fields without default value.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 924
diff changeset
261 emptyText: ' ',
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
262 fieldLabel: 'Sollzeitraum von',
928
e2a26f9733ee Minor UI styles.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 926
diff changeset
263 labelWidth: 130,
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
264 margin: '0, 5, 5, 5',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
265 name: 'solldatumBeginn',
931
746b429917a8 remove obsolate code from Probe-Form
Michael Stanko <mstanko@bfs.de>
parents: 930
diff changeset
266 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
267 period: 'start',
c75f13578315 Changed 'Solldatum' fields to readonly fields without default value.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 924
diff changeset
268 readOnly: true
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
269 }, {
931
746b429917a8 remove obsolate code from Probe-Form
Michael Stanko <mstanko@bfs.de>
parents: 930
diff changeset
270 xtype: 'datefield',
926
c75f13578315 Changed 'Solldatum' fields to readonly fields without default value.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 924
diff changeset
271 emptyText: ' ',
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
272 fieldLabel: 'bis',
928
e2a26f9733ee Minor UI styles.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 926
diff changeset
273 labelWidth: 17,
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
274 margin: '0, 5, 5, 5',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
275 name: 'solldatumEnde',
931
746b429917a8 remove obsolate code from Probe-Form
Michael Stanko <mstanko@bfs.de>
parents: 930
diff changeset
276 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
277 period: 'end',
c75f13578315 Changed 'Solldatum' fields to readonly fields without default value.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 924
diff changeset
278 readOnly: true
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
279 }]
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
280 }, {
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
281 xtype: 'fset',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
282 name: 'entnahmePeriod',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
283 width: '100%',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
284 border: 0,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
285 margin: 0,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
286 layout: {
928
e2a26f9733ee Minor UI styles.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 926
diff changeset
287 type: 'hbox'
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
288 },
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
289 items: [{
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
290 xtype: 'datetime',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
291 fieldLabel: 'Probenentnahme von',
928
e2a26f9733ee Minor UI styles.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 926
diff changeset
292 labelWidth: 130,
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
293 margin: '0, 5, 5, 5',
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
294 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
295 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
296 period: 'start'
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
297 }, {
650
67963fcb7739 Removed old DateTimeField and replaced them with the new one.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 646
diff changeset
298 xtype: 'datetime',
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
299 fieldLabel: 'bis',
928
e2a26f9733ee Minor UI styles.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 926
diff changeset
300 labelWidth: 17,
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
301 margin: '0, 5, 5, 5',
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
302 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
303 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
304 period: 'end'
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
305 }]
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
306 }]
838
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
307 }, {
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
308 // Medium
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
309 xtype: 'fieldset',
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
310 title: 'Medium',
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
311 width: '100%',
838
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
312 items: [{
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
313 border: 0,
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
314 layout: {
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
315 type: 'vbox',
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
316 align: 'stretch'
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
317 },
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
318 width: '100%',
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
319 items: [{
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
320 xtype: 'umwelt',
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
321 name: 'umwId',
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
322 fieldLabel: 'Umweltbereich',
1383
197ba385bc31 Changed layout to show all Deskriptoren
Evi Huber <ehuber@bfs.de>
parents: 1276
diff changeset
323 labelWidth: 100,
838
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
324 allowBlank: false,
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
325 editable: true,
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
326 listeners: {
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
327 dirtychange: {
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
328 fn: this.updateOnChange,
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
329 scope: me
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
330 }
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
331 }
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
332 }, {
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
333 border: 0,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
334 layout: {
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
335 type: 'hbox',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
336 align: 'stretch'
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 width: '100%',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
339 items: [{
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
340 xtype: 'tfield',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
341 maxLength: 38,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
342 enforceMaxLength: true,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
343 name: 'mediaDesk',
1383
197ba385bc31 Changed layout to show all Deskriptoren
Evi Huber <ehuber@bfs.de>
parents: 1276
diff changeset
344 width: '58%',
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
345 minWidth: 290,
1383
197ba385bc31 Changed layout to show all Deskriptoren
Evi Huber <ehuber@bfs.de>
parents: 1276
diff changeset
346 labelWidth: 100,
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
347 fieldLabel: 'Deskriptoren',
930
efb8cf646771 Changed 'medie' and 'mediadesk' fields to readonly fields
Michael Stanko <mstanko@bfs.de>
parents: 928
diff changeset
348 editable: false,
efb8cf646771 Changed 'medie' and 'mediadesk' fields to readonly fields
Michael Stanko <mstanko@bfs.de>
parents: 928
diff changeset
349 readOnly: true,
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
350 listeners: {
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
351 dirtychange: {
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
352 fn: this.updateOnChange,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
353 scope: me
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
354 }
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
355 }
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
356 }, {
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
357 xtype: 'textfield',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
358 name: 'media',
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
359 margin: '0, 10, 5, 10',
1383
197ba385bc31 Changed layout to show all Deskriptoren
Evi Huber <ehuber@bfs.de>
parents: 1276
diff changeset
360 width: '42%',
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
361 enforceMaxLength: true,
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
362 editable: false,
931
746b429917a8 remove obsolate code from Probe-Form
Michael Stanko <mstanko@bfs.de>
parents: 930
diff changeset
363 readOnly: true
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
364 }]
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
365 }, {
838
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
366 xtype: 'fieldset',
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
367 title: 'Details Deskriptoren',
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
368 collapsible: true,
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
369 collapsed: true,
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
370 layout: {
930
efb8cf646771 Changed 'medie' and 'mediadesk' fields to readonly fields
Michael Stanko <mstanko@bfs.de>
parents: 928
diff changeset
371 type: 'vbox',
efb8cf646771 Changed 'medie' and 'mediadesk' fields to readonly fields
Michael Stanko <mstanko@bfs.de>
parents: 928
diff changeset
372 align: 'stretch'
838
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
373 },
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
374 items: this.buildDescriptors()
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
375 }]
bbbccdb103cf Display Time in Proben over Medium
Dustin Demuth <dustin@intevation.de>
parents: 817
diff changeset
376 }]
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
377 }]
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
378 }]
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
379 }];
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
380 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
381 this.clearMessages();
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
382 },
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
383
1066
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
384 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
385 this.clearMessages();
1066
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
386 this.getForm().loadRecord(probeRecord);
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
387 if (!probeRecord.raw) {
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
388 return;
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
389 }
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
390 var mstStore = Ext.data.StoreManager.get('messstellen');
1217
4270da0f7d3b Merged branch schema-update into default.
Tom Gottfried <tom@intevation.de>
parents: 1189
diff changeset
391 var mstId = mstStore.getById(probeRecord.get('mstId'));
1066
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
392 if (!probeRecord.get('owner')) {
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
393 var laborMstId = mstStore.getById(probeRecord.get('laborMstId'));
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
394 if (laborMstId) {
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
395 laborMstId = laborMstId.get('messStelle');
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 laborMstId = '';
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
399 }
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
400 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
401 var newStore = Ext.create('Ext.data.Store', {
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
402 model: 'Lada.model.MessstelleLabor',
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
403 data: [{
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
404 id: id,
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
405 laborMst: probeRecord.get('laborMstId'),
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
406 messStelle: probeRecord.get('mstId'),
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
407 displayCombi: mstId.get('messStelle') +
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
408 '/' + laborMstId
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
409 }]
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
410 });
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
411 this.down('messstellelabor').down('combobox').store = newStore;
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
412 this.down('messstellelabor').setValue(id);
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
413 }
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
414 else {
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
415 var mstLaborStore = Ext.data.StoreManager.get('messstellelabor');
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
416 var items = mstLaborStore.queryBy(function(record) {
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
417 if (record.get('messStelle') === probeRecord.get('mstId') &&
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
418 record.get('laborMst') === probeRecord.get('laborMstId')) {
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
419 return true;
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
420 }
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
421 });
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
422 this.down('messstellelabor').setValue(items.getAt(0));
d198946e5540 Introduced laborMstId as new probe field.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 931
diff changeset
423 }
1217
4270da0f7d3b Merged branch schema-update into default.
Tom Gottfried <tom@intevation.de>
parents: 1189
diff changeset
424 this.down('netzbetreiber').setValue(mstId.get('netzbetreiberId'));
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
425 },
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
426
771
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
427 setMediaDesk: function(record) {
1234
390dabbf27ed Empty string for media descriptor is disallowed.
Tom Gottfried <tom@intevation.de>
parents: 1217
diff changeset
428 var media = record.get('mediaDesk');
390dabbf27ed Empty string for media descriptor is disallowed.
Tom Gottfried <tom@intevation.de>
parents: 1217
diff changeset
429 if (media) {
390dabbf27ed Empty string for media descriptor is disallowed.
Tom Gottfried <tom@intevation.de>
parents: 1217
diff changeset
430 var mediaParts = media.split(' ');
390dabbf27ed Empty string for media descriptor is disallowed.
Tom Gottfried <tom@intevation.de>
parents: 1217
diff changeset
431 this.setMediaSN(0, mediaParts);
390dabbf27ed Empty string for media descriptor is disallowed.
Tom Gottfried <tom@intevation.de>
parents: 1217
diff changeset
432 }
771
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
433 },
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
434
1276
8f37f8832c4a fix mediadescription in probe form
Michael Stanko <mstanko@bfs.de>
parents: 1243
diff changeset
435 setMediaSN: function(ndx, media, beschreibung) {
1384
59c1f162fe8f fix mediabeschreibung in /view/form/Probe.js
Evi Huber <ehuber@bfs.de>
parents: 1383
diff changeset
436 var mediabeschreibung = this.getForm().findField('media');
771
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
437 if (ndx >= 12) {
1276
8f37f8832c4a fix mediadescription in probe form
Michael Stanko <mstanko@bfs.de>
parents: 1243
diff changeset
438 mediabeschreibung.setValue(beschreibung);
771
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
439 return;
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
440 }
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
441 var me = this;
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
442 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
443 var cbox = current.down('combobox');
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
444 if (ndx === 0) {
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
445 cbox.store.proxy.extraParams = {
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
446 'layer': ndx
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
447 };
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
448 }
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
449 else {
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
450 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
451 if (parents.length === 0) {
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
452 return;
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
453 }
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
454 cbox.store.proxy.extraParams = {
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
455 'layer': ndx,
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
456 'parents': parents
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
457 };
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
458 }
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
459 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
460 if (!success) {
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
461 return;
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
462 }
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
463 cbox.select(cbox.store.findRecord('sn', parseInt(media[ndx + 1], 10)));
1276
8f37f8832c4a fix mediadescription in probe form
Michael Stanko <mstanko@bfs.de>
parents: 1243
diff changeset
464 var mediatext = cbox.store.findRecord('sn', parseInt(media[ndx + 1], 10));
8f37f8832c4a fix mediadescription in probe form
Michael Stanko <mstanko@bfs.de>
parents: 1243
diff changeset
465 if (mediatext !== null) {
8f37f8832c4a fix mediadescription in probe form
Michael Stanko <mstanko@bfs.de>
parents: 1243
diff changeset
466 if ( (ndx <= 3) && (media[1] === '01') && (mediatext.data.beschreibung !== "leer") ) {
8f37f8832c4a fix mediadescription in probe form
Michael Stanko <mstanko@bfs.de>
parents: 1243
diff changeset
467 beschreibung = mediatext.data.beschreibung;
8f37f8832c4a fix mediadescription in probe form
Michael Stanko <mstanko@bfs.de>
parents: 1243
diff changeset
468 } else if ( (media[1] !== '01') && (mediatext.data.beschreibung !== "leer") && (ndx <= 1) ) {
8f37f8832c4a fix mediadescription in probe form
Michael Stanko <mstanko@bfs.de>
parents: 1243
diff changeset
469 beschreibung = mediatext.data.beschreibung;
8f37f8832c4a fix mediadescription in probe form
Michael Stanko <mstanko@bfs.de>
parents: 1243
diff changeset
470 }
8f37f8832c4a fix mediadescription in probe form
Michael Stanko <mstanko@bfs.de>
parents: 1243
diff changeset
471 }
8f37f8832c4a fix mediadescription in probe form
Michael Stanko <mstanko@bfs.de>
parents: 1243
diff changeset
472 me.setMediaSN(++ndx, media, beschreibung);
771
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
473 });
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
474 },
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
475
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
476 setMessages: function(errors, warnings) {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
477 var key;
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
478 var element;
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
479 var content;
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
480 var i18n = Lada.getApplication().bundle;
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
481 if (warnings) {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
482 for (key in warnings) {
1423
ee21d0e1b998 Pipe out more information in import report.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1412
diff changeset
483 var tmp = key;
ee21d0e1b998 Pipe out more information in import report.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1412
diff changeset
484 if (tmp.indexOf('#') > 0) {
ee21d0e1b998 Pipe out more information in import report.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1412
diff changeset
485 tmp = tmp.split('#')[0];
ee21d0e1b998 Pipe out more information in import report.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1412
diff changeset
486 }
ee21d0e1b998 Pipe out more information in import report.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1412
diff changeset
487 element = this.down('component[name=' + tmp + ']');
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
488 if (!element) {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
489 continue;
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
490 }
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
491 content = warnings[key];
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
492 var warnText = '';
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
493 for (var i = 0; i < content.length; i++) {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
494 warnText += i18n.getMsg(content[i].toString()) + '\n';
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 element.showWarnings(warnText);
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
497 }
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
498 }
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
499 if (errors) {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
500 for (key in errors) {
1423
ee21d0e1b998 Pipe out more information in import report.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1412
diff changeset
501 var tmp = key;
ee21d0e1b998 Pipe out more information in import report.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1412
diff changeset
502 if (tmp.indexOf('#') > 0) {
ee21d0e1b998 Pipe out more information in import report.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1412
diff changeset
503 tmp = tmp.split('#')[0];
ee21d0e1b998 Pipe out more information in import report.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1412
diff changeset
504 }
ee21d0e1b998 Pipe out more information in import report.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1412
diff changeset
505 element = this.down('component[name=' + tmp + ']');
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
506 if (!element) {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
507 continue;
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
508 }
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
509 content = errors[key];
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
510 var errorText = '';
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
511 for (var i = 0; i < content.length; i++) {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
512 errorText += i18n.getMsg(content[i].toString()) + '\n';
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
513 }
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
514 element.showErrors(errorText);
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 }
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
517 },
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
518
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
519 clearMessages: function() {
1068
096d552508cd Set readonly state for messstelle-labor widget.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1066
diff changeset
520 this.down('cbox[name=mstlabor]').clearWarningOrError();
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
521 this.down('tfield[name=hauptprobenNr]').clearWarningOrError();
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
522 this.down('cbox[name=datenbasisId]').clearWarningOrError();
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
523 this.down('cbox[name=baId]').clearWarningOrError();
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
524 this.down('chkbox[name=test]').clearWarningOrError();
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
525 this.down('cbox[name=probenartId]').clearWarningOrError();
1217
4270da0f7d3b Merged branch schema-update into default.
Tom Gottfried <tom@intevation.de>
parents: 1189
diff changeset
526 this.down('netzbetreiber').clearWarningOrError();
1107
9bcd17f7a0ae change some fields in probeform to combobox
Michael Stanko <mstanko@bfs.de>
parents: 1068
diff changeset
527 this.down('cbox[name=erzeugerId]').clearWarningOrError();
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
528 this.down('cbox[name=umwId]').clearWarningOrError();
652
05e4ad93d021 Fixed field names.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 650
diff changeset
529 this.down('datetime[name=probeentnahmeBeginn]').clearWarningOrError();
05e4ad93d021 Fixed field names.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 650
diff changeset
530 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
531 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
532 this.down('fset[name=sollzeitPeriod]').clearMessages();
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
533 },
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
534
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
535 setReadOnly: function(value) {
1068
096d552508cd Set readonly state for messstelle-labor widget.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1066
diff changeset
536 this.down('cbox[name=mstlabor]').setReadOnly(value);
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
537 this.down('tfield[name=hauptprobenNr]').setReadOnly(value);
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
538 this.down('cbox[name=datenbasisId]').setReadOnly(value);
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
539 this.down('cbox[name=baId]').setReadOnly(value);
924
9265637fe6c0 changed layout of Probe form
Michael Stanko <mstanko@bfs.de>
parents: 894
diff changeset
540 this.down('chkbox[name=test]').setReadOnly(value);
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
541 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
542 this.down('cbox[name=erzeugerId]').setReadOnly(value);
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
543 this.down('cbox[name=umwId]').setReadOnly(value);
652
05e4ad93d021 Fixed field names.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 650
diff changeset
544 this.down('datetime[name=probeentnahmeBeginn]').setReadOnly(value);
05e4ad93d021 Fixed field names.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 650
diff changeset
545 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
546 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
547 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
548
0391425689ed Also Deskriptoren must be set to readonly
Dustin Demuth <dustin@intevation.de>
parents: 684
diff changeset
549 //Deskriptoren
0391425689ed Also Deskriptoren must be set to readonly
Dustin Demuth <dustin@intevation.de>
parents: 684
diff changeset
550 for (var i = 0; i < 12; i++) {
783
afdbe3770b99 Exclude deskriptor fields from form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 771
diff changeset
551 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
552 }
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
553 },
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
554
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
555 buildDescriptors: function() {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
556 var fields = [];
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
557 for (var i = 0; i < 12; i++) {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
558 fields[i] = {
771
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
559 xtype: 'deskriptor',
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
560 fieldLabel: 'S' + i,
783
afdbe3770b99 Exclude deskriptor fields from form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 771
diff changeset
561 //name: 's' + i,
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
562 labelWidth: 25,
771
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
563 width: 190,
dd6925ef6028 Load, set and parse deskriptoren in probe form.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 740
diff changeset
564 layer: i,
718
7f11b75e0188 Trailing Commas, editable: false for Umwelt und Messstelle widget
Dustin Demuth <dustin@intevation.de>
parents: 717
diff changeset
565 margin: '0, 10, 5, 0'
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
566 };
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
567 }
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
568 return fields;
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
569 }
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
570 });

http://lada.wald.intevation.org