annotate app/view/form/Messprogramm.js @ 1189:ec2b10d81343

Add missing requirements.
author Tom Gottfried <tom@intevation.de>
date Wed, 07 Sep 2016 15:36:29 +0200
parents 1ae5e4f0f2c8
children 0a7f0a09151c
rev   line source
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
2 * Software engineering by Intevation GmbH
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
3 *
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
4 * This file is Free Software under the GNU GPL (v>=3)
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
6 * the documentation coming with IMIS-Labordaten-Application for details.
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
7 */
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
8
894
a1d72228af00 jsduck for forms
Dustin Demuth <dustin@intevation.de>
parents: 847
diff changeset
9 /**
a1d72228af00 jsduck for forms
Dustin Demuth <dustin@intevation.de>
parents: 847
diff changeset
10 * Form to edit a Messprogramm
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
11 */
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
12 Ext.define('Lada.view.form.Messprogramm', {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
13 extend: 'Ext.form.Panel',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
14 alias: 'widget.messprogrammform',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
15 requires: [
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
16 'Lada.view.widget.Datenbasis',
1086
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
17 'Lada.view.widget.base.CheckBox',
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
18 'Lada.view.widget.Messstelle',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
19 'Lada.view.widget.Netzbetreiber',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
20 'Lada.view.widget.Betriebsart',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
21 'Lada.view.widget.Probenart',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
22 'Lada.view.widget.Umwelt',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
23 'Lada.view.widget.base.TextField',
1168
40a07eb873bf Add numberfield with error/warning functionality and use for Messprogramm form.
Tom Gottfried <tom@intevation.de>
parents: 1167
diff changeset
24 'Lada.view.widget.base.NumberField',
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
25 'Lada.view.widget.base.FieldSet',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
26 'Lada.model.Messprogramm',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
27 'Lada.model.MmtMessprogramm',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
28 'Lada.view.widget.Probenintervall',
797
b8fd43021c29 Added a Window to alter Orte of a Messprogramm
Dustin Demuth <dustin@intevation.de>
parents: 793
diff changeset
29 'Lada.view.widget.Location',
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
30 'Lada.view.widget.ProbenintervallSlider',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
31 'Lada.view.widget.base.Datetime',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
32 'Lada.view.widget.base.DateField'
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
33 ],
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
34
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
35 model: 'Lada.model.Messprogramm',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
36 minWidth: 650,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
37 margin: 5,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
38 border: 0,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
39
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
40 recordId: null,
797
b8fd43021c29 Added a Window to alter Orte of a Messprogramm
Dustin Demuth <dustin@intevation.de>
parents: 793
diff changeset
41 ortWindow: null,
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
42
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
43 trackResetOnLoad: true,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
44
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
45 initComponent: function() {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
46 var me = this;
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
47 var i18n = Lada.getApplication().bundle;
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
48 this.items = [{
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
49 xtype: 'fieldset',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
50 title: i18n.getMsg('messprogramm.form.fieldset.title'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
51 items: [{
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
52 border: 0,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
53 margin: '0, 0, 10, 0',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
54 dockedItems: [{
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
55 xtype: 'toolbar',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
56 dock: 'bottom',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
57 border: '0, 1, 1, 1',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
58 style: {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
59 borderBottom: '1px solid #b5b8c8 !important',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
60 borderLeft: '1px solid #b5b8c8 !important',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
61 borderRight: '1px solid #b5b8c8 !important'
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
62 },
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
63 items: ['->', {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
64 text: i18n.getMsg('save'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
65 qtip: i18n.getMsg('save.qtip'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
66 icon: 'resources/img/dialog-ok-apply.png',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
67 action: 'save',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
68 disabled: true
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
69 }, {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
70 text: i18n.getMsg('discard'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
71 qtip: i18n.getMsg('discard.qtip'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
72 icon: 'resources/img/dialog-cancel.png',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
73 action: 'discard',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
74 disabled: true
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
75 }]
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
76 }],
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
77 items: [{
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
78 border: 0,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
79 minWidth: 290,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
80 layout: {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
81 type: 'vbox',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
82 align: 'stretch'
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
83 },
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
84 margin: '0, 10, 0, 0',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
85 items: [{
1086
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
86 layout: {
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
87 type: 'hbox',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
88 align: 'stretch'
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
89 },
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
90 border: 0,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
91 items: [{
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
92 xtype: 'messstellelabor',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
93 name: 'mstlabor',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
94 fieldLabel: 'Messstelle/Labor',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
95 margin: '0, 5, 5, 5',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
96 width: '35%',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
97 labelWidth: 95,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
98 allowBlank: false,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
99 editable: true,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
100 listeners: {
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
101 select: {
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
102 fn: function(combo, newValue) {
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
103 var mst = newValue[0].get('messStelle');
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
104 var labor = newValue[0].get('laborMst');
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
105 combo.up('fieldset').down('messstelle[name=mstId]').setValue(mst);
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
106 combo.up('fieldset').down('messstelle[name=laborMstId]').setValue(labor);
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
107 }
1067
3da8e8b973ad Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
108 }
3da8e8b973ad Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
109 }
1086
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
110 }, {
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
111 xtype: 'messstelle',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
112 name: 'mstId',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
113 fieldLabel: 'Messstelle/Labor',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
114 margin: '0, 5, 5, 5',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
115 width: '35%',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
116 labelWidth: 95,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
117 allowBlank: false,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
118 editable: true,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
119 hidden: true
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
120 }, {
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
121 xtype: 'messstelle',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
122 name: 'laborMstId',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
123 fieldLabel: 'Messstelle/Labor',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
124 margin: '0, 5, 5, 5',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
125 width: '35%',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
126 labelWidth: 95,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
127 allowBlank: false,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
128 editable: true,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
129 hidden: true
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
130 }, {
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
131 xtype: 'netzbetreiber',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
132 name: 'netzbetreiberId',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
133 editable: false,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
134 readOnly: true,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
135 fieldLabel: i18n.getMsg('netzbetreiberId'),
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
136 margin : '0, 5, 5, 5',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
137 width : '35%',
797
b8fd43021c29 Added a Window to alter Orte of a Messprogramm
Dustin Demuth <dustin@intevation.de>
parents: 793
diff changeset
138 labelWidth: 80,
b8fd43021c29 Added a Window to alter Orte of a Messprogramm
Dustin Demuth <dustin@intevation.de>
parents: 793
diff changeset
139 }, {
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
140 xtype: 'datenbasis',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
141 editable: false,
1180
1ae5e4f0f2c8 Set allowBlank to false for mandatory fields to be filled by the user.
Tom Gottfried <tom@intevation.de>
parents: 1169
diff changeset
142 allowBlank: false,
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
143 name: 'datenbasisId',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
144 fieldLabel: i18n.getMsg('datenbasisId'),
1086
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
145 margin : '0, 5, 5, 5',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
146 width : '20%',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
147 labelWidth: 65
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
148 }, {
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
149 xtype: 'chkbox',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
150 name: 'test',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
151 fieldLabel: i18n.getMsg('test'),
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
152 anchor: '100%',
1086
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
153 margin : '0, 5, 5, 5',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
154 width : '10%',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
155 labelWidth: 30,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
156 allowBlank: false
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
157 }]
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
158 }, {
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
159 layout: {
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
160 type: 'hbox',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
161 align: 'stretch'
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
162 },
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
163 border: 0,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
164 items: [{
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
165 xtype: 'tfield',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
166 name: 'name',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
167 fieldLabel: i18n.getMsg('mprId'),
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
168 margin: '0, 5, 5, 5',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
169 width: '35%',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
170 labelWidth: 95,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
171 maxLength: 20,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
172 editable: true
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
173 }, {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
174 xtype: 'betriebsart',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
175 name: 'baId',
1108
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
176 margin: '0, 5, 5, 5',
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
177 fieldLabel: i18n.getMsg('baId'),
1108
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
178 //anchor: '100%',
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
179 width: '35%',
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
180 labelWidth: 80
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
181 }, {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
182 xtype: 'probenart',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
183 editable: false,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
184 name: 'probenartId',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
185 fieldLabel: i18n.getMsg('probenartId'),
1108
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
186 margin: '0, 5, 5, 5',
1086
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
187 width: '20%',
1108
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
188 labelWidth: 70,
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
189 allowBlank: false
1086
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
190 }]
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
191 }]
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
192 }, {
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
193 // Zeit
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
194 xtype: 'fieldset',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
195 title: i18n.getMsg('probenintervall'),
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
196 layout: {
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
197 type: 'vbox',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
198 align: 'stretch'
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
199 },
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
200 items: [{
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
201 xtype: 'fset',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
202 name: 'probenIntervallFieldset',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
203 layout: {
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
204 type: 'hbox',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
205 align: 'stretch'
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
206 },
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
207 border: 0,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
208 margin: '0, 0, 0, 0',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
209 items: [{
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
210 xtype: 'probenintervall',
1180
1ae5e4f0f2c8 Set allowBlank to false for mandatory fields to be filled by the user.
Tom Gottfried <tom@intevation.de>
parents: 1169
diff changeset
211 allowBlank: false,
1086
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
212 fieldLabel: i18n.getMsg('probenintervall'),
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
213 margin: '0, 10, 5, 5',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
214 labelWidth: 50,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
215 width: '40%',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
216 name: 'probenintervall'
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
217 }, {
1168
40a07eb873bf Add numberfield with error/warning functionality and use for Messprogramm form.
Tom Gottfried <tom@intevation.de>
parents: 1167
diff changeset
218 xtype: 'numfield',
1169
e552e82ceb8a Teilintervall and offset must be integer.
Tom Gottfried <tom@intevation.de>
parents: 1168
diff changeset
219 allowDecimals: false,
1180
1ae5e4f0f2c8 Set allowBlank to false for mandatory fields to be filled by the user.
Tom Gottfried <tom@intevation.de>
parents: 1169
diff changeset
220 allowBlank: false,
1086
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
221 fieldLabel: i18n.getMsg('teilintervallVon'),
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
222 margin: '0, 10, 5, 10',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
223 labelWidth: 90,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
224 width: '28%',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
225 name: 'teilintervallVon',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
226 period: 'start'
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
227 }, {
1168
40a07eb873bf Add numberfield with error/warning functionality and use for Messprogramm form.
Tom Gottfried <tom@intevation.de>
parents: 1167
diff changeset
228 xtype: 'numfield',
1169
e552e82ceb8a Teilintervall and offset must be integer.
Tom Gottfried <tom@intevation.de>
parents: 1168
diff changeset
229 allowDecimals: false,
1180
1ae5e4f0f2c8 Set allowBlank to false for mandatory fields to be filled by the user.
Tom Gottfried <tom@intevation.de>
parents: 1169
diff changeset
230 allowBlank: false,
1086
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
231 fieldLabel: i18n.getMsg('teilintervallBis'),
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
232 margin: '0, 15, 5, 5',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
233 labelWidth: 18,
1108
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
234 width: '15%',
1086
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
235 name: 'teilintervallBis',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
236 period: 'end'
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
237 }, {
1168
40a07eb873bf Add numberfield with error/warning functionality and use for Messprogramm form.
Tom Gottfried <tom@intevation.de>
parents: 1167
diff changeset
238 xtype: 'numfield',
1169
e552e82ceb8a Teilintervall and offset must be integer.
Tom Gottfried <tom@intevation.de>
parents: 1168
diff changeset
239 allowDecimals: false,
1086
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
240 margin: '0, 10, 5, 5',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
241 fieldLabel: i18n.getMsg('offset'),
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
242 labelWidth: 45,
1108
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
243 width: '17%',
1086
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
244 name: 'intervallOffset'
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
245 }]
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
246 }, {
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
247 xtype: 'probenintervallslider',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
248 // fieldLabel: i18n.getMsg('intervall'),
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
249 // labelWidth: 70,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
250 pack: 'center',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
251 width: '70%',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
252 margin: '0, 40, 10, 40',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
253 values: [0, 0]
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
254 //this will be overridden
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
255 // by setRecord
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
256 }, {
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
257 xtype: 'fset',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
258 name: 'gueltigPeriodFieldset',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
259 layout: {
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
260 type: 'hbox',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
261 align: 'stretch'
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
262 },
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
263 border: 0,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
264 items: [{
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
265 xtype: 'datetime',
1180
1ae5e4f0f2c8 Set allowBlank to false for mandatory fields to be filled by the user.
Tom Gottfried <tom@intevation.de>
parents: 1169
diff changeset
266 allowBlank: false,
1086
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
267 fieldLabel: i18n.getMsg('gueltigVon'),
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
268 margin: '0, 30, 5, 5',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
269 labelWidth: 90,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
270 name: 'gueltigVon',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
271 format: 'd.m.Y',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
272 period: 'start'
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
273 }, {
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
274 xtype: 'datetime',
1180
1ae5e4f0f2c8 Set allowBlank to false for mandatory fields to be filled by the user.
Tom Gottfried <tom@intevation.de>
parents: 1169
diff changeset
275 allowBlank: false,
1086
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
276 fieldLabel: i18n.getMsg('gueltigBis'),
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
277 margin: '0, 5, 5, 5',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
278 labelWidth: 40,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
279 name: 'gueltigBis',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
280 format: 'd.m.Y',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
281 period: 'end'
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
282 }]
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
283 }]
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
284 }, {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
285 // Medium
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
286 xtype: 'fieldset',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
287 title: i18n.getMsg('medium'),
1086
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
288 width: '100%',
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
289 items: [{
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
290 border: 0,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
291 layout: {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
292 type: 'vbox',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
293 align: 'stretch'
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
294 },
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
295 width: '100%',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
296 items: [{
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
297 xtype: 'umwelt',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
298 name: 'umwId',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
299 fieldLabel: i18n.getMsg('umwId'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
300 labelWidth: 125,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
301 editable: true,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
302 listeners: {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
303 dirtychange: {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
304 fn: this.updateOnChange,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
305 scope: me
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
306 }
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
307 }
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
308 }, {
1086
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
309 border: 0,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
310 layout: {
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
311 type: 'hbox',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
312 align: 'stretch'
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
313 },
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
314 width: '100%',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
315 items: [{
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
316 xtype: 'textfield',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
317 maxLength: 38,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
318 enforceMaxLength: true,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
319 name: 'mediaDesk',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
320 width: '60%',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
321 labelWidth: 125,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
322 fieldLabel: i18n.getMsg('mediaDesk'),
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
323 editable: false,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
324 readOnly: true,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
325 listeners: {
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
326 dirtychange: {
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
327 fn: this.updateOnChange,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
328 scope: me
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
329 }
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
330 }
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
331 }, {
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
332 xtype: 'textfield',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
333 name: 'media',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
334 margin: '0, 10, 5, 10',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
335 width: '40%',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
336 enforceMaxLength: true,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
337 editable: false,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
338 readOnly: true
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
339 }]
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
340 }, {
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
341 xtype: 'fieldset',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
342 title: i18n.getMsg('deskDetails'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
343 collapsible: true,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
344 collapsed: true,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
345 defaultType: 'textfield',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
346 layout: {
1086
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
347 type: 'vbox',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
348 align: 'stretch'
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
349 },
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
350 items: this.buildDescriptors(),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
351 listeners: {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
352 dirtychange: {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
353 fn: this.updateOnChange,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
354 scope: me
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
355 }
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
356 }
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
357 }]
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
358 }]
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
359 }, {
1086
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
360 // Ort
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
361 xtype: 'fieldset',
1086
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
362 title: 'Ort',
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
363 layout: {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
364 type: 'hbox',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
365 align: 'stretch'
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
366 },
1086
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
367 width: '100%',
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
368 items: [{
1086
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
369 xtype: 'location',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
370 name: 'ortId',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
371 fieldLabel: i18n.getMsg('ortId'),
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
372 labelWidth: 80,
1180
1ae5e4f0f2c8 Set allowBlank to false for mandatory fields to be filled by the user.
Tom Gottfried <tom@intevation.de>
parents: 1169
diff changeset
373 allowBlank: false,
1086
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
374 forceSelection: true,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
375 editable: false,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
376 columnWidth: '0.75'
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
377 }, {
1086
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
378 xtype: 'button',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
379 name: 'ortIdButton',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
380 margin: '0 0 0 5',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
381 text: i18n.getMsg('messprogrammort.button.title'),
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
382 action: 'ort',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
383 columnWidth: '0.25'
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
384 }]
1086
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
385 }, {
1116
92c0fa2f29b0 complete some comboboxes in probe form and messprogramm form
Michael Stanko <mstanko@bfs.de>
parents: 1108
diff changeset
386 xtype: 'probenehmer',
1086
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
387 name: 'probeNehmerId',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
388 fieldLabel: i18n.getMsg('probeNehmerId'),
1116
92c0fa2f29b0 complete some comboboxes in probe form and messprogramm form
Michael Stanko <mstanko@bfs.de>
parents: 1108
diff changeset
389 margin: '0, 5, 5, 5',
1086
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
390 width: '100%',
1116
92c0fa2f29b0 complete some comboboxes in probe form and messprogramm form
Michael Stanko <mstanko@bfs.de>
parents: 1108
diff changeset
391 minValue: 0,
1086
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
392 anchor: '100%',
1116
92c0fa2f29b0 complete some comboboxes in probe form and messprogramm form
Michael Stanko <mstanko@bfs.de>
parents: 1108
diff changeset
393 labelWidth: 95
1086
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
394 }, {
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
395 xtype: 'textarea',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
396 name: 'probeKommentar',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
397 labelAlign: 'top',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
398 fieldLabel: i18n.getMsg('probeKommentar'),
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
399 width: '100%',
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
400 labelwidth: 135,
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
401 anchor: '100%'
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
402 }]
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
403 }]
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
404 }];
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
405 this.callParent(arguments);
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
406 },
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
407
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
408 populateIntervall: function(record, intervall) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
409 //intervall is an identifier of a intervall
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
410 // for instance H, M, J, ...
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
411 // Initialize the probenintervallslider
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
412 var s = this.down('probenintervallslider');
774
afc9076db490 Added Offset field
Dustin Demuth <dustin@intevation.de>
parents: 759
diff changeset
413 var i = this.getForm().findField('intervallOffset');
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
414 var v = this.getForm().findField('teilintervallVon');
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
415 var b = this.getForm().findField('teilintervallBis');
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
416 var intervallstore = Ext.data.StoreManager.get('Probenintervall');
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
417
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
418 var svalUpper = null
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
419 var svalLower = null
759
b7484c7da2d4 Unified the Messprogramm windows. Unfortunately the Roweditor of Messmethodengrid is broken in this commit. This is due to the fact that the Mmt store is noit autoloaded anymore
Dustin Demuth <dustin@intevation.de>
parents: 757
diff changeset
420 var min = null
b7484c7da2d4 Unified the Messprogramm windows. Unfortunately the Roweditor of Messmethodengrid is broken in this commit. This is due to the fact that the Mmt store is noit autoloaded anymore
Dustin Demuth <dustin@intevation.de>
parents: 757
diff changeset
421 var max = null
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
422
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
423 if (!intervallstore) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
424 intervallstore = Ext.create('Lada.store.Probenintervall');
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
425 }
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
426
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
427 //It is likely that this method was not
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
428 // called from the controller,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
429 //and the probenintervall was not changed.
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
430 // Load the records in this case
759
b7484c7da2d4 Unified the Messprogramm windows. Unfortunately the Roweditor of Messmethodengrid is broken in this commit. This is due to the fact that the Mmt store is noit autoloaded anymore
Dustin Demuth <dustin@intevation.de>
parents: 757
diff changeset
431 if (!intervall && record) {
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
432 intervall = record.get('probenintervall',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
433 0, false, false, true);
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
434
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
435 svalUpper = record.get('teilintervallBis');
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
436 svalLower = record.get('teilintervallVon');
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
437 }
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
438
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
439
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
440 var intrec = intervallstore
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
441 .findRecord('probenintervall',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
442 intervall, 0, false, false, true);
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
443
759
b7484c7da2d4 Unified the Messprogramm windows. Unfortunately the Roweditor of Messmethodengrid is broken in this commit. This is due to the fact that the Mmt store is noit autoloaded anymore
Dustin Demuth <dustin@intevation.de>
parents: 757
diff changeset
444 if (intrec) { // in cases when a new messprogramm is
b7484c7da2d4 Unified the Messprogramm windows. Unfortunately the Roweditor of Messmethodengrid is broken in this commit. This is due to the fact that the Mmt store is noit autoloaded anymore
Dustin Demuth <dustin@intevation.de>
parents: 757
diff changeset
445 // created and the discard function is used, intrec will be null
b7484c7da2d4 Unified the Messprogramm windows. Unfortunately the Roweditor of Messmethodengrid is broken in this commit. This is due to the fact that the Mmt store is noit autoloaded anymore
Dustin Demuth <dustin@intevation.de>
parents: 757
diff changeset
446 // consequently the assertion below will fail.
b7484c7da2d4 Unified the Messprogramm windows. Unfortunately the Roweditor of Messmethodengrid is broken in this commit. This is due to the fact that the Mmt store is noit autoloaded anymore
Dustin Demuth <dustin@intevation.de>
parents: 757
diff changeset
447 min = intrec.get('periodstart');
b7484c7da2d4 Unified the Messprogramm windows. Unfortunately the Roweditor of Messmethodengrid is broken in this commit. This is due to the fact that the Mmt store is noit autoloaded anymore
Dustin Demuth <dustin@intevation.de>
parents: 757
diff changeset
448 max = intrec.get('periodend');
b7484c7da2d4 Unified the Messprogramm windows. Unfortunately the Roweditor of Messmethodengrid is broken in this commit. This is due to the fact that the Mmt store is noit autoloaded anymore
Dustin Demuth <dustin@intevation.de>
parents: 757
diff changeset
449 }
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
450
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
451 if (!svalUpper) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
452 svalUpper = max;
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
453 }
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
454 if (!svalLower) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
455 svalLower = min;
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
456 }
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
457
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
458 //Set Teilintervalle
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
459 v.setMinValue(min);
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
460 v.setMaxValue(max);
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
461 b.setMinValue(min);
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
462 b.setMaxValue(max);
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
463
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
464 //Set Slider
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
465 s.setMinValue(min);
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
466 s.setMaxValue(max);
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
467
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
468 v.setValue(svalLower);
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
469 b.setValue(svalUpper);
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
470
774
afc9076db490 Added Offset field
Dustin Demuth <dustin@intevation.de>
parents: 759
diff changeset
471 //Set IntervallOffset
afc9076db490 Added Offset field
Dustin Demuth <dustin@intevation.de>
parents: 759
diff changeset
472 i.setMinValue(0);
afc9076db490 Added Offset field
Dustin Demuth <dustin@intevation.de>
parents: 759
diff changeset
473 i.setMaxValue(max-1);
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
474 },
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
475
1067
3da8e8b973ad Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
476 setRecord: function(messRecord) {
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
477 this.clearMessages();
1067
3da8e8b973ad Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
478 this.getForm().loadRecord(messRecord);
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
479 //Set the intervall numberfields and the slider.
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
480 this.down('probenintervallslider').setValue([
1067
3da8e8b973ad Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
481 messRecord.get('teilintervallVon'),
3da8e8b973ad Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
482 messRecord.get('teilintervallBis')
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
483 ]);
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
484
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
485 //TODO Set Sliders MinMaxValue
1067
3da8e8b973ad Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
486 this.populateIntervall(messRecord);
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
487
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
488 this.down('probenintervallslider').on(
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
489 'change',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
490 Lada.app.getController('Lada.controller.form.Messprogramm')
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
491 .synchronizeFields
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
492 );
1067
3da8e8b973ad Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
493 var mstStore = Ext.data.StoreManager.get('messstellen');
3da8e8b973ad Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
494 if (!messRecord.get('owner')) {
3da8e8b973ad Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
495 var mstId = mstStore.getById(messRecord.get('mstId'));
1071
116b9629eb2c Fixed mstId in new messprogramm dialog.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1068
diff changeset
496 if (!mstId) {
116b9629eb2c Fixed mstId in new messprogramm dialog.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1068
diff changeset
497 return;
116b9629eb2c Fixed mstId in new messprogramm dialog.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1068
diff changeset
498 }
1067
3da8e8b973ad Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
499 var laborMstId = mstStore.getById(messRecord.get('laborMstId'));
3da8e8b973ad Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
500 if (laborMstId) {
3da8e8b973ad Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
501 laborMstId = laborMstId.get('messStelle');
3da8e8b973ad Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
502 }
3da8e8b973ad Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
503 else {
3da8e8b973ad Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
504 laborMstId = '';
3da8e8b973ad Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
505 }
3da8e8b973ad Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
506 var id = this.down('messstellelabor').store.count() + 1;
1108
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
507 if ( messRecord.get('mstId') === messRecord.get('laborMstId') ) {
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
508 displayCombi = mstId.get('messStelle');
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
509 } else {
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
510 displayCombi = mstId.get('messStelle') + '/' + laborMstId
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
511 }
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
512 var newStore = Ext.create('Ext.data.Store', {
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
513 model: 'Lada.model.MessstelleLabor',
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
514 data: [{
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
515 id: id,
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
516 laborMst: messRecord.get('laborMstId'),
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
517 messStelle: messRecord.get('mstId'),
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
518 displayCombi: displayCombi
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
519 }]
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
520 });
1067
3da8e8b973ad Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
521 this.down('messstellelabor').down('combobox').store = newStore;
3da8e8b973ad Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
522 this.down('messstellelabor').setValue(id);
3da8e8b973ad Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
523 }
3da8e8b973ad Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
524 else {
3da8e8b973ad Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
525 var mstLaborStore = Ext.data.StoreManager.get('messstellelabor');
3da8e8b973ad Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
526 var items = mstLaborStore.queryBy(function(record) {
3da8e8b973ad Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
527 if (record.get('messStelle') === messRecord.get('mstId') &&
3da8e8b973ad Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
528 record.get('laborMst') === messRecord.get('laborMstId')) {
3da8e8b973ad Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
529 return true;
3da8e8b973ad Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
530 }
3da8e8b973ad Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
531 });
3da8e8b973ad Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
532 this.down('messstellelabor').setValue(items.getAt(0));
3da8e8b973ad Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 894
diff changeset
533 }
784
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
534 },
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
535
784
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
536 setMediaDesk: function(record) {
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
537 var media = record.get('mediaDesk').split(' ');
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
538 this.setMediaSN(0, media);
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
539 },
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
540
1108
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
541 setMediaSN: function(ndx, media, beschreibung) {
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
542 var mediabeschreibung = this.getForm().findField('media');
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
543
784
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
544 if (ndx >= 12) {
1108
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
545 mediabeschreibung.setValue(beschreibung);
784
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
546 return;
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
547 }
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
548 var me = this;
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
549 var current = this.down('deskriptor[layer=' + ndx + ']');
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
550 var cbox = current.down('combobox');
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
551 if (ndx === 0) {
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
552 cbox.store.proxy.extraParams = {
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
553 'layer': ndx
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
554 };
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
555 }
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
556 else {
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
557 var parents = current.getParents(current.down('combobox'));
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
558 if (parents.length === 0) {
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
559 return;
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
560 }
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
561 cbox.store.proxy.extraParams = {
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
562 'layer': ndx,
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
563 'parents': parents
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
564 };
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
565 }
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
566 cbox.store.load(function(records, op, success) {
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
567 if (!success) {
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
568 return;
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
569 }
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
570 cbox.select(cbox.store.findRecord('sn', parseInt(media[ndx + 1], 10)));
1108
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
571 var mediatext = cbox.store.findRecord('sn', parseInt(media[ndx + 1], 10));
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
572 if (mediatext !== null) {
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
573 if ( (ndx <= 3) && (media[1] === '01') && (mediatext.data.beschreibung !== "leer") ) {
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
574 beschreibung = mediatext.data.beschreibung;
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
575 } else if ( (media[1] !== '01') && (mediatext.data.beschreibung !== "leer") && (ndx <= 1) ) {
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
576 beschreibung = mediatext.data.beschreibung;
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
577 }
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
578 }
7baaf2cd3f57 Redesign in Messgrogrammform
Evi Huber <ehuber@bfs.de>
parents: 1104
diff changeset
579 me.setMediaSN(++ndx, media, beschreibung);
784
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
580 });
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
581 },
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
582
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
583 setMessages: function(errors, warnings) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
584 var key;
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
585 var element;
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
586 var content;
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
587 var i18n = Lada.getApplication().bundle;
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
588 if (warnings) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
589 for (key in warnings) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
590 element = this.down('component[name=' + key + ']');
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
591 if (!element) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
592 continue;
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
593 }
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
594 content = warnings[key];
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
595 var warnText = '';
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
596 for (var i = 0; i < content.length; i++) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
597 warnText += i18n.getMsg(content[i].toString()) + '\n';
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
598 }
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
599 element.showWarnings(warnText);
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
600 }
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
601 }
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
602 if (errors) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
603 for (key in errors) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
604 element = this.down('component[name=' + key + ']');
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
605 if (!element) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
606 continue;
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
607 }
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
608 content = errors[key];
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
609 var errorText = '';
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
610 for (var i = 0; i < content.length; i++) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
611 errorText += i18n.getMsg(content[i].toString()) + '\n';
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
612 }
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
613 element.showErrors(errorText);
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
614 }
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
615 }
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
616 },
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
617
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
618 clearMessages: function() {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
619 // TODO
1068
096d552508cd Set readonly state for messstelle-labor widget.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1067
diff changeset
620 this.down('cbox[name=mstlabor]').clearWarningOrError();
777
5a153d36ed4e ClearMessages
Dustin Demuth <dustin@intevation.de>
parents: 774
diff changeset
621 this.down('tfield[name=name]').clearWarningOrError();
5a153d36ed4e ClearMessages
Dustin Demuth <dustin@intevation.de>
parents: 774
diff changeset
622 //no clearmsg for probeKommentar
5a153d36ed4e ClearMessages
Dustin Demuth <dustin@intevation.de>
parents: 774
diff changeset
623 this.down('cbox[name=datenbasisId]').clearWarningOrError();
5a153d36ed4e ClearMessages
Dustin Demuth <dustin@intevation.de>
parents: 774
diff changeset
624 this.down('cbox[name=baId]').clearWarningOrError();
1086
61cc583c3649 Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents: 1071
diff changeset
625 this.down('chkbox[name=test]').clearWarningOrError();
777
5a153d36ed4e ClearMessages
Dustin Demuth <dustin@intevation.de>
parents: 774
diff changeset
626 this.down('cbox[name=probenartId]').clearWarningOrError();
5a153d36ed4e ClearMessages
Dustin Demuth <dustin@intevation.de>
parents: 774
diff changeset
627 this.down('cbox[name=netzbetreiberId]').clearWarningOrError();
1167
e9bf88db2bbb Complement clearing of Messprogramm form.
Tom Gottfried <tom@intevation.de>
parents: 1116
diff changeset
628 // clear messages in intervall definition
e9bf88db2bbb Complement clearing of Messprogramm form.
Tom Gottfried <tom@intevation.de>
parents: 1116
diff changeset
629 this.down('fset[name=probenIntervallFieldset]').clearMessages();
e9bf88db2bbb Complement clearing of Messprogramm form.
Tom Gottfried <tom@intevation.de>
parents: 1116
diff changeset
630 this.down('cbox[name=probenintervall]').clearWarningOrError();
e9bf88db2bbb Complement clearing of Messprogramm form.
Tom Gottfried <tom@intevation.de>
parents: 1116
diff changeset
631 this.down('fset[name=gueltigPeriodFieldset]').clearMessages();
1168
40a07eb873bf Add numberfield with error/warning functionality and use for Messprogramm form.
Tom Gottfried <tom@intevation.de>
parents: 1167
diff changeset
632 this.down('numfield[name=teilintervallVon]').clearWarningOrError();
40a07eb873bf Add numberfield with error/warning functionality and use for Messprogramm form.
Tom Gottfried <tom@intevation.de>
parents: 1167
diff changeset
633 this.down('numfield[name=teilintervallBis]').clearWarningOrError();
1167
e9bf88db2bbb Complement clearing of Messprogramm form.
Tom Gottfried <tom@intevation.de>
parents: 1116
diff changeset
634 this.down('datetime[name=gueltigVon]').clearWarningOrError();
e9bf88db2bbb Complement clearing of Messprogramm form.
Tom Gottfried <tom@intevation.de>
parents: 1116
diff changeset
635 this.down('datetime[name=gueltigBis]').clearWarningOrError();
777
5a153d36ed4e ClearMessages
Dustin Demuth <dustin@intevation.de>
parents: 774
diff changeset
636 //no clear for probeNehmerId
5a153d36ed4e ClearMessages
Dustin Demuth <dustin@intevation.de>
parents: 774
diff changeset
637 // Deskriptoren are missing
5a153d36ed4e ClearMessages
Dustin Demuth <dustin@intevation.de>
parents: 774
diff changeset
638 this.down('cbox[name=umwId]').clearWarningOrError();
1167
e9bf88db2bbb Complement clearing of Messprogramm form.
Tom Gottfried <tom@intevation.de>
parents: 1116
diff changeset
639 this.down('cbox[name=ortId]').clearWarningOrError();
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
640 },
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
641
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
642 setReadOnly: function(value) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
643 // TODO
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
644 },
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
645
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
646 buildDescriptors: function() {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
647 var fields = [];
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
648 for (var i = 0; i < 12; i++) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
649 fields[i] = {
784
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
650 xtype: 'deskriptor',
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
651 fieldLabel: 'S' + i,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
652 labelWidth: 25,
784
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
653 width: 190,
f0b26df02157 Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 779
diff changeset
654 layer: i,
757
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
655 margin: '0, 10, 5, 0'
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
656 };
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
657 }
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
658 return fields;
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
659 }
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
660 });

http://lada.wald.intevation.org