Mercurial > lada > lada-client
annotate app/view/form/Messprogramm.js @ 1168:40a07eb873bf
Add numberfield with error/warning functionality and use for Messprogramm form.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Fri, 01 Jul 2016 14:01:02 +0200 |
parents | e9bf88db2bbb |
children | e552e82ceb8a |
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 | 9 /** |
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, |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
142 name: 'datenbasisId', |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
143 fieldLabel: i18n.getMsg('datenbasisId'), |
1086
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
144 margin : '0, 5, 5, 5', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
145 width : '20%', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
146 labelWidth: 65 |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
147 }, { |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
148 xtype: 'chkbox', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
149 name: 'test', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
150 fieldLabel: i18n.getMsg('test'), |
757
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
151 anchor: '100%', |
1086
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
152 margin : '0, 5, 5, 5', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
153 width : '10%', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
154 labelWidth: 30, |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
155 allowBlank: false |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
156 }] |
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 layout: { |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
159 type: 'hbox', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
160 align: 'stretch' |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
161 }, |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
162 border: 0, |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
163 items: [{ |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
164 xtype: 'tfield', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
165 name: 'name', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
166 fieldLabel: i18n.getMsg('mprId'), |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
167 margin: '0, 5, 5, 5', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
168 width: '35%', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
169 labelWidth: 95, |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
170 maxLength: 20, |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
171 editable: true |
757
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
172 }, { |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
173 xtype: 'betriebsart', |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
174 name: 'baId', |
1108 | 175 margin: '0, 5, 5, 5', |
757
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
176 fieldLabel: i18n.getMsg('baId'), |
1108 | 177 //anchor: '100%', |
178 width: '35%', | |
179 labelWidth: 80 | |
757
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
180 }, { |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
181 xtype: 'probenart', |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
182 editable: false, |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
183 name: 'probenartId', |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
184 fieldLabel: i18n.getMsg('probenartId'), |
1108 | 185 margin: '0, 5, 5, 5', |
1086
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
186 width: '20%', |
1108 | 187 labelWidth: 70, |
757
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
188 allowBlank: false |
1086
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
189 }] |
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 // Zeit |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
193 xtype: 'fieldset', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
194 title: i18n.getMsg('probenintervall'), |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
195 layout: { |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
196 type: 'vbox', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
197 align: 'stretch' |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
198 }, |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
199 items: [{ |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
200 xtype: 'fset', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
201 name: 'probenIntervallFieldset', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
202 layout: { |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
203 type: 'hbox', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
204 align: 'stretch' |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
205 }, |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
206 border: 0, |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
207 margin: '0, 0, 0, 0', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
208 items: [{ |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
209 xtype: 'probenintervall', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
210 fieldLabel: i18n.getMsg('probenintervall'), |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
211 margin: '0, 10, 5, 5', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
212 labelWidth: 50, |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
213 width: '40%', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
214 name: 'probenintervall' |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
215 }, { |
1168
40a07eb873bf
Add numberfield with error/warning functionality and use for Messprogramm form.
Tom Gottfried <tom@intevation.de>
parents:
1167
diff
changeset
|
216 xtype: 'numfield', |
1086
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
217 fieldLabel: i18n.getMsg('teilintervallVon'), |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
218 margin: '0, 10, 5, 10', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
219 labelWidth: 90, |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
220 width: '28%', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
221 name: 'teilintervallVon', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
222 period: 'start' |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
223 }, { |
1168
40a07eb873bf
Add numberfield with error/warning functionality and use for Messprogramm form.
Tom Gottfried <tom@intevation.de>
parents:
1167
diff
changeset
|
224 xtype: 'numfield', |
1086
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
225 fieldLabel: i18n.getMsg('teilintervallBis'), |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
226 margin: '0, 15, 5, 5', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
227 labelWidth: 18, |
1108 | 228 width: '15%', |
1086
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
229 name: 'teilintervallBis', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
230 period: 'end' |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
231 }, { |
1168
40a07eb873bf
Add numberfield with error/warning functionality and use for Messprogramm form.
Tom Gottfried <tom@intevation.de>
parents:
1167
diff
changeset
|
232 xtype: 'numfield', |
1086
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
233 margin: '0, 10, 5, 5', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
234 fieldLabel: i18n.getMsg('offset'), |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
235 labelWidth: 45, |
1108 | 236 width: '17%', |
1086
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
237 name: 'intervallOffset' |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
238 }] |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
239 }, { |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
240 xtype: 'probenintervallslider', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
241 // fieldLabel: i18n.getMsg('intervall'), |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
242 // labelWidth: 70, |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
243 pack: 'center', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
244 width: '70%', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
245 margin: '0, 40, 10, 40', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
246 values: [0, 0] |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
247 //this will be overridden |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
248 // by setRecord |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
249 }, { |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
250 xtype: 'fset', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
251 name: 'gueltigPeriodFieldset', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
252 layout: { |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
253 type: 'hbox', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
254 align: 'stretch' |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
255 }, |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
256 border: 0, |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
257 items: [{ |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
258 xtype: 'datetime', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
259 fieldLabel: i18n.getMsg('gueltigVon'), |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
260 margin: '0, 30, 5, 5', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
261 labelWidth: 90, |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
262 name: 'gueltigVon', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
263 format: 'd.m.Y', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
264 period: 'start' |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
265 }, { |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
266 xtype: 'datetime', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
267 fieldLabel: i18n.getMsg('gueltigBis'), |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
268 margin: '0, 5, 5, 5', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
269 labelWidth: 40, |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
270 name: 'gueltigBis', |
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: 'end' |
757
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
273 }] |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
274 }] |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
275 }, { |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
276 // Medium |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
277 xtype: 'fieldset', |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
278 title: i18n.getMsg('medium'), |
1086
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
279 width: '100%', |
757
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
280 items: [{ |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
281 border: 0, |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
282 layout: { |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
283 type: 'vbox', |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
284 align: 'stretch' |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
285 }, |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
286 width: '100%', |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
287 items: [{ |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
288 xtype: 'umwelt', |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
289 name: 'umwId', |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
290 fieldLabel: i18n.getMsg('umwId'), |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
291 labelWidth: 125, |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
292 allowBlank: false, |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
293 editable: true, |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
294 listeners: { |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
295 dirtychange: { |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
296 fn: this.updateOnChange, |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
297 scope: me |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
298 } |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
299 } |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
300 }, { |
1086
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
301 border: 0, |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
302 layout: { |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
303 type: 'hbox', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
304 align: 'stretch' |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
305 }, |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
306 width: '100%', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
307 items: [{ |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
308 xtype: 'textfield', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
309 maxLength: 38, |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
310 enforceMaxLength: true, |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
311 name: 'mediaDesk', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
312 width: '60%', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
313 labelWidth: 125, |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
314 fieldLabel: i18n.getMsg('mediaDesk'), |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
315 editable: false, |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
316 readOnly: true, |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
317 listeners: { |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
318 dirtychange: { |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
319 fn: this.updateOnChange, |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
320 scope: me |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
321 } |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
322 } |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
323 }, { |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
324 xtype: 'textfield', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
325 name: 'media', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
326 margin: '0, 10, 5, 10', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
327 width: '40%', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
328 enforceMaxLength: true, |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
329 editable: false, |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
330 readOnly: true |
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 }, { |
757
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
333 xtype: 'fieldset', |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
334 title: i18n.getMsg('deskDetails'), |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
335 collapsible: true, |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
336 collapsed: true, |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
337 defaultType: 'textfield', |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
338 layout: { |
1086
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
339 type: 'vbox', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
340 align: 'stretch' |
757
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
341 }, |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
342 items: this.buildDescriptors(), |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
343 listeners: { |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
344 dirtychange: { |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
345 fn: this.updateOnChange, |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
346 scope: me |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
347 } |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
348 } |
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 }] |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
351 }, { |
1086
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
352 // Ort |
757
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
353 xtype: 'fieldset', |
1086
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
354 title: 'Ort', |
757
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
355 layout: { |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
356 type: 'hbox', |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
357 align: 'stretch' |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
358 }, |
1086
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
359 width: '100%', |
757
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
360 items: [{ |
1086
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
361 xtype: 'location', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
362 name: 'ortId', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
363 fieldLabel: i18n.getMsg('ortId'), |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
364 labelWidth: 80, |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
365 allowBlank: true, |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
366 forceSelection: true, |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
367 editable: false, |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
368 columnWidth: '0.75' |
757
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
369 }, { |
1086
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
370 xtype: 'button', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
371 name: 'ortIdButton', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
372 margin: '0 0 0 5', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
373 text: i18n.getMsg('messprogrammort.button.title'), |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
374 action: 'ort', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
375 columnWidth: '0.25' |
757
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
376 }] |
1086
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
377 }, { |
1116
92c0fa2f29b0
complete some comboboxes in probe form and messprogramm form
Michael Stanko <mstanko@bfs.de>
parents:
1108
diff
changeset
|
378 xtype: 'probenehmer', |
1086
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
379 name: 'probeNehmerId', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
380 fieldLabel: i18n.getMsg('probeNehmerId'), |
1116
92c0fa2f29b0
complete some comboboxes in probe form and messprogramm form
Michael Stanko <mstanko@bfs.de>
parents:
1108
diff
changeset
|
381 margin: '0, 5, 5, 5', |
1086
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
382 width: '100%', |
1116
92c0fa2f29b0
complete some comboboxes in probe form and messprogramm form
Michael Stanko <mstanko@bfs.de>
parents:
1108
diff
changeset
|
383 minValue: 0, |
1086
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
384 anchor: '100%', |
1116
92c0fa2f29b0
complete some comboboxes in probe form and messprogramm form
Michael Stanko <mstanko@bfs.de>
parents:
1108
diff
changeset
|
385 labelWidth: 95 |
1086
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
386 }, { |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
387 xtype: 'textarea', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
388 name: 'probeKommentar', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
389 labelAlign: 'top', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
390 fieldLabel: i18n.getMsg('probeKommentar'), |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
391 width: '100%', |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
392 labelwidth: 135, |
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
393 anchor: '100%' |
757
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
394 }] |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
395 }] |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
396 }]; |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
397 this.callParent(arguments); |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
398 }, |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
399 |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
400 populateIntervall: function(record, intervall) { |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
401 //intervall is an identifier of a intervall |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
402 // for instance H, M, J, ... |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
403 // Initialize the probenintervallslider |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
404 var s = this.down('probenintervallslider'); |
774 | 405 var i = this.getForm().findField('intervallOffset'); |
757
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
406 var v = this.getForm().findField('teilintervallVon'); |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
407 var b = this.getForm().findField('teilintervallBis'); |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
408 var intervallstore = Ext.data.StoreManager.get('Probenintervall'); |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
409 |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
410 var svalUpper = null |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
411 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
|
412 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
|
413 var max = null |
757
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
414 |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
415 if (!intervallstore) { |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
416 intervallstore = Ext.create('Lada.store.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 |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
419 //It is likely that this method was not |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
420 // called from the controller, |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
421 //and the probenintervall was not changed. |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
422 // 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
|
423 if (!intervall && record) { |
757
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
424 intervall = record.get('probenintervall', |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
425 0, false, false, true); |
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 svalUpper = record.get('teilintervallBis'); |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
428 svalLower = record.get('teilintervallVon'); |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
429 } |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
430 |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
431 |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
432 var intrec = intervallstore |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
433 .findRecord('probenintervall', |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
434 intervall, 0, false, false, true); |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
435 |
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
|
436 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
|
437 // 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
|
438 // 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
|
439 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
|
440 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
|
441 } |
757
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
442 |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
443 if (!svalUpper) { |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
444 svalUpper = max; |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
445 } |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
446 if (!svalLower) { |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
447 svalLower = min; |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
448 } |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
449 |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
450 //Set Teilintervalle |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
451 v.setMinValue(min); |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
452 v.setMaxValue(max); |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
453 b.setMinValue(min); |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
454 b.setMaxValue(max); |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
455 |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
456 //Set Slider |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
457 s.setMinValue(min); |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
458 s.setMaxValue(max); |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
459 |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
460 v.setValue(svalLower); |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
461 b.setValue(svalUpper); |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
462 |
774 | 463 //Set IntervallOffset |
464 i.setMinValue(0); | |
465 i.setMaxValue(max-1); | |
757
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
466 }, |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
467 |
1067
3da8e8b973ad
Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
894
diff
changeset
|
468 setRecord: function(messRecord) { |
757
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
469 this.clearMessages(); |
1067
3da8e8b973ad
Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
894
diff
changeset
|
470 this.getForm().loadRecord(messRecord); |
757
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
471 //Set the intervall numberfields and the slider. |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
472 this.down('probenintervallslider').setValue([ |
1067
3da8e8b973ad
Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
894
diff
changeset
|
473 messRecord.get('teilintervallVon'), |
3da8e8b973ad
Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
894
diff
changeset
|
474 messRecord.get('teilintervallBis') |
757
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
475 ]); |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
476 |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
477 //TODO Set Sliders MinMaxValue |
1067
3da8e8b973ad
Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
894
diff
changeset
|
478 this.populateIntervall(messRecord); |
757
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
479 |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
480 this.down('probenintervallslider').on( |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
481 'change', |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
482 Lada.app.getController('Lada.controller.form.Messprogramm') |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
483 .synchronizeFields |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
484 ); |
1067
3da8e8b973ad
Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
894
diff
changeset
|
485 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
|
486 if (!messRecord.get('owner')) { |
3da8e8b973ad
Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
894
diff
changeset
|
487 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
|
488 if (!mstId) { |
116b9629eb2c
Fixed mstId in new messprogramm dialog.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1068
diff
changeset
|
489 return; |
116b9629eb2c
Fixed mstId in new messprogramm dialog.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1068
diff
changeset
|
490 } |
1067
3da8e8b973ad
Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
894
diff
changeset
|
491 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
|
492 if (laborMstId) { |
3da8e8b973ad
Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
894
diff
changeset
|
493 laborMstId = laborMstId.get('messStelle'); |
3da8e8b973ad
Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
894
diff
changeset
|
494 } |
3da8e8b973ad
Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
894
diff
changeset
|
495 else { |
3da8e8b973ad
Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
894
diff
changeset
|
496 laborMstId = ''; |
3da8e8b973ad
Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
894
diff
changeset
|
497 } |
3da8e8b973ad
Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
894
diff
changeset
|
498 var id = this.down('messstellelabor').store.count() + 1; |
1108 | 499 if ( messRecord.get('mstId') === messRecord.get('laborMstId') ) { |
500 displayCombi = mstId.get('messStelle'); | |
501 } else { | |
502 displayCombi = mstId.get('messStelle') + '/' + laborMstId | |
503 } | |
504 var newStore = Ext.create('Ext.data.Store', { | |
505 model: 'Lada.model.MessstelleLabor', | |
506 data: [{ | |
507 id: id, | |
508 laborMst: messRecord.get('laborMstId'), | |
509 messStelle: messRecord.get('mstId'), | |
510 displayCombi: displayCombi | |
511 }] | |
512 }); | |
1067
3da8e8b973ad
Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
894
diff
changeset
|
513 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
|
514 this.down('messstellelabor').setValue(id); |
3da8e8b973ad
Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
894
diff
changeset
|
515 } |
3da8e8b973ad
Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
894
diff
changeset
|
516 else { |
3da8e8b973ad
Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
894
diff
changeset
|
517 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
|
518 var items = mstLaborStore.queryBy(function(record) { |
3da8e8b973ad
Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
894
diff
changeset
|
519 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
|
520 record.get('laborMst') === messRecord.get('laborMstId')) { |
3da8e8b973ad
Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
894
diff
changeset
|
521 return true; |
3da8e8b973ad
Use the laborMstId to generate probe objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
894
diff
changeset
|
522 } |
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 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
|
525 } |
784
f0b26df02157
Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
779
diff
changeset
|
526 }, |
757
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
527 |
784
f0b26df02157
Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
779
diff
changeset
|
528 setMediaDesk: function(record) { |
f0b26df02157
Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
779
diff
changeset
|
529 var media = record.get('mediaDesk').split(' '); |
f0b26df02157
Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
779
diff
changeset
|
530 this.setMediaSN(0, media); |
f0b26df02157
Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
779
diff
changeset
|
531 }, |
f0b26df02157
Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
779
diff
changeset
|
532 |
1108 | 533 setMediaSN: function(ndx, media, beschreibung) { |
534 var mediabeschreibung = this.getForm().findField('media'); | |
535 | |
784
f0b26df02157
Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
779
diff
changeset
|
536 if (ndx >= 12) { |
1108 | 537 mediabeschreibung.setValue(beschreibung); |
784
f0b26df02157
Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
779
diff
changeset
|
538 return; |
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 var me = this; |
f0b26df02157
Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
779
diff
changeset
|
541 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
|
542 var cbox = current.down('combobox'); |
f0b26df02157
Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
779
diff
changeset
|
543 if (ndx === 0) { |
f0b26df02157
Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
779
diff
changeset
|
544 cbox.store.proxy.extraParams = { |
f0b26df02157
Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
779
diff
changeset
|
545 'layer': ndx |
f0b26df02157
Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
779
diff
changeset
|
546 }; |
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 else { |
f0b26df02157
Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
779
diff
changeset
|
549 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
|
550 if (parents.length === 0) { |
f0b26df02157
Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
779
diff
changeset
|
551 return; |
f0b26df02157
Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
779
diff
changeset
|
552 } |
f0b26df02157
Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
779
diff
changeset
|
553 cbox.store.proxy.extraParams = { |
f0b26df02157
Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
779
diff
changeset
|
554 'layer': ndx, |
f0b26df02157
Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
779
diff
changeset
|
555 'parents': parents |
f0b26df02157
Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
779
diff
changeset
|
556 }; |
f0b26df02157
Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
779
diff
changeset
|
557 } |
f0b26df02157
Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
779
diff
changeset
|
558 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
|
559 if (!success) { |
f0b26df02157
Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
779
diff
changeset
|
560 return; |
f0b26df02157
Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
779
diff
changeset
|
561 } |
f0b26df02157
Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
779
diff
changeset
|
562 cbox.select(cbox.store.findRecord('sn', parseInt(media[ndx + 1], 10))); |
1108 | 563 var mediatext = cbox.store.findRecord('sn', parseInt(media[ndx + 1], 10)); |
564 if (mediatext !== null) { | |
565 if ( (ndx <= 3) && (media[1] === '01') && (mediatext.data.beschreibung !== "leer") ) { | |
566 beschreibung = mediatext.data.beschreibung; | |
567 } else if ( (media[1] !== '01') && (mediatext.data.beschreibung !== "leer") && (ndx <= 1) ) { | |
568 beschreibung = mediatext.data.beschreibung; | |
569 } | |
570 } | |
571 me.setMediaSN(++ndx, media, beschreibung); | |
784
f0b26df02157
Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
779
diff
changeset
|
572 }); |
757
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
573 }, |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
574 |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
575 setMessages: function(errors, warnings) { |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
576 var key; |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
577 var element; |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
578 var content; |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
579 var i18n = Lada.getApplication().bundle; |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
580 if (warnings) { |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
581 for (key in warnings) { |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
582 element = this.down('component[name=' + key + ']'); |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
583 if (!element) { |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
584 continue; |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
585 } |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
586 content = warnings[key]; |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
587 var warnText = ''; |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
588 for (var i = 0; i < content.length; i++) { |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
589 warnText += i18n.getMsg(content[i].toString()) + '\n'; |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
590 } |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
591 element.showWarnings(warnText); |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
592 } |
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 if (errors) { |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
595 for (key in errors) { |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
596 element = this.down('component[name=' + key + ']'); |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
597 if (!element) { |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
598 continue; |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
599 } |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
600 content = errors[key]; |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
601 var errorText = ''; |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
602 for (var i = 0; i < content.length; i++) { |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
603 errorText += i18n.getMsg(content[i].toString()) + '\n'; |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
604 } |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
605 element.showErrors(errorText); |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
606 } |
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 }, |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
609 |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
610 clearMessages: function() { |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
611 // TODO |
1068
096d552508cd
Set readonly state for messstelle-labor widget.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1067
diff
changeset
|
612 this.down('cbox[name=mstlabor]').clearWarningOrError(); |
777 | 613 this.down('tfield[name=name]').clearWarningOrError(); |
614 //no clearmsg for probeKommentar | |
615 this.down('cbox[name=datenbasisId]').clearWarningOrError(); | |
616 this.down('cbox[name=baId]').clearWarningOrError(); | |
1086
61cc583c3649
Messprogramm form redesign
Michael Stanko <mstanko@bfs.de>
parents:
1071
diff
changeset
|
617 this.down('chkbox[name=test]').clearWarningOrError(); |
777 | 618 this.down('cbox[name=probenartId]').clearWarningOrError(); |
619 this.down('cbox[name=netzbetreiberId]').clearWarningOrError(); | |
1167
e9bf88db2bbb
Complement clearing of Messprogramm form.
Tom Gottfried <tom@intevation.de>
parents:
1116
diff
changeset
|
620 // clear messages in intervall definition |
e9bf88db2bbb
Complement clearing of Messprogramm form.
Tom Gottfried <tom@intevation.de>
parents:
1116
diff
changeset
|
621 this.down('fset[name=probenIntervallFieldset]').clearMessages(); |
e9bf88db2bbb
Complement clearing of Messprogramm form.
Tom Gottfried <tom@intevation.de>
parents:
1116
diff
changeset
|
622 this.down('cbox[name=probenintervall]').clearWarningOrError(); |
e9bf88db2bbb
Complement clearing of Messprogramm form.
Tom Gottfried <tom@intevation.de>
parents:
1116
diff
changeset
|
623 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
|
624 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
|
625 this.down('numfield[name=teilintervallBis]').clearWarningOrError(); |
1167
e9bf88db2bbb
Complement clearing of Messprogramm form.
Tom Gottfried <tom@intevation.de>
parents:
1116
diff
changeset
|
626 this.down('datetime[name=gueltigVon]').clearWarningOrError(); |
e9bf88db2bbb
Complement clearing of Messprogramm form.
Tom Gottfried <tom@intevation.de>
parents:
1116
diff
changeset
|
627 this.down('datetime[name=gueltigBis]').clearWarningOrError(); |
777 | 628 //no clear for probeNehmerId |
629 // Deskriptoren are missing | |
630 this.down('cbox[name=umwId]').clearWarningOrError(); | |
1167
e9bf88db2bbb
Complement clearing of Messprogramm form.
Tom Gottfried <tom@intevation.de>
parents:
1116
diff
changeset
|
631 this.down('cbox[name=ortId]').clearWarningOrError(); |
757
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
632 }, |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
633 |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
634 setReadOnly: function(value) { |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
635 // TODO |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
636 }, |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
637 |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
638 buildDescriptors: function() { |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
639 var fields = []; |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
640 for (var i = 0; i < 12; i++) { |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
641 fields[i] = { |
784
f0b26df02157
Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
779
diff
changeset
|
642 xtype: 'deskriptor', |
757
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
643 fieldLabel: 'S' + i, |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
644 labelWidth: 25, |
784
f0b26df02157
Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
779
diff
changeset
|
645 width: 190, |
f0b26df02157
Handle deskriptoren in messprogramm like in probe.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
779
diff
changeset
|
646 layer: i, |
757
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
647 margin: '0, 10, 5, 0' |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
648 }; |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
649 } |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
650 return fields; |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
651 } |
b8502964f5c3
Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
652 }); |