annotate app/view/form/Messprogramm.js @ 757:b8502964f5c3

Added missing files. Added MmtMockup
author Dustin Demuth <dustin@intevation.de>
date Wed, 06 May 2015 14:15:37 +0200
parents
children b7484c7da2d4
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
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
9 /*
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
10 * Formular to edit a Messprogramm
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',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
17 'Lada.view.widget.Messstelle',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
18 'Lada.view.widget.Netzbetreiber',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
19 'Lada.view.widget.Betriebsart',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
20 'Lada.view.widget.Testdatensatz',
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',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
24 'Lada.view.widget.base.FieldSet',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
25 'Lada.model.Messprogramm',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
26 'Lada.model.MmtMessprogramm',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
27 'Lada.view.widget.Probenintervall',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
28 'Lada.view.widget.ProbenintervallSlider',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
29 'Lada.view.widget.base.Datetime',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
30 'Lada.view.widget.base.DateField'
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
31 ],
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
32
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
33 model: 'Lada.model.Messprogramm',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
34 minWidth: 650,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
35 margin: 5,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
36 border: 0,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
37
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
38 recordId: null,
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 trackResetOnLoad: true,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
41
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
42 initComponent: function() {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
43 var me = this;
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
44 var i18n = Lada.getApplication().bundle;
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
45 this.items = [{
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
46 xtype: 'fieldset',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
47 title: i18n.getMsg('messprogramm.form.fieldset.title'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
48 items: [{
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
49 border: 0,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
50 margin: '0, 0, 10, 0',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
51 dockedItems: [{
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
52 xtype: 'toolbar',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
53 dock: 'bottom',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
54 border: '0, 1, 1, 1',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
55 style: {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
56 borderBottom: '1px solid #b5b8c8 !important',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
57 borderLeft: '1px solid #b5b8c8 !important',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
58 borderRight: '1px solid #b5b8c8 !important'
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
59 },
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
60 items: ['->', {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
61 text: i18n.getMsg('save'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
62 qtip: i18n.getMsg('save.qtip'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
63 icon: 'resources/img/dialog-ok-apply.png',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
64 action: 'save',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
65 disabled: true
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
66 }, {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
67 text: i18n.getMsg('discard'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
68 qtip: i18n.getMsg('discard.qtip'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
69 icon: 'resources/img/dialog-cancel.png',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
70 action: 'discard',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
71 disabled: true
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
72 }]
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
73 }],
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
74 items: [{
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
75 layout: 'hbox',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
76 border: 0,
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 width: '50%',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
80 minWidth: 290,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
81 layout: {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
82 type: 'vbox',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
83 align: 'stretch'
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
84 },
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
85 margin: '0, 10, 0, 0',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
86 items: [{
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
87 xtype: 'messstelle',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
88 name: 'mstId',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
89 fieldLabel: i18n.getMsg('mstId'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
90 labelWidth: 135,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
91 allowBlank: false,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
92 editable: true
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
93 }, {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
94 xtype: 'textfield',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
95 name: 'name',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
96 fieldLabel: i18n.getMsg('name'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
97 labelWidth: 135,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
98 allowBlank: false,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
99 editable: true
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
100 }, {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
101 xtype: 'textarea', //todo: we need a widget which is capable of handling errormsg.
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
102 name: 'probeKommentar',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
103 labelAlign: 'top',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
104 fieldLabel: i18n.getMsg('probeKommentar'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
105 labelwidth: 135,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
106 anchor: '100%'
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
107 }]
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
108 }, {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
109 border: 0,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
110 width: '50%',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
111 minWidth: 300,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
112 margin: '0, 1, 0, 0',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
113 items: [{
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
114 xtype: 'fset',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
115 title: i18n.getMsg('erwAngaben'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
116 name: 'erwAngaben',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
117 collapsible: false,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
118 collapsed: false,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
119 items: [{
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
120 xtype: 'datenbasis',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
121 editable: false,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
122 name: 'datenbasisId',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
123 fieldLabel: i18n.getMsg('datenbasisId'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
124 anchor: '100%',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
125 labelWidth: 105
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
126 }, {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
127 xtype: 'betriebsart',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
128 name: 'baId',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
129 fieldLabel: i18n.getMsg('baId'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
130 anchor: '100%',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
131 labelWidth: 105
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
132 }, {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
133 xtype: 'testdatensatz',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
134 name: 'test',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
135 fieldLabel: i18n.getMsg('test'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
136 anchor: '100%',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
137 labelWidth: 105,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
138 allowBlank: false
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
139 }, {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
140 xtype: 'probenart',
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: 'probenartId',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
143 fieldLabel: i18n.getMsg('probenartId'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
144 anchor: '100%',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
145 labelWidth: 105,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
146 allowBlank: false
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
147 }, {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
148 xtype: 'numberfield',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
149 allowDecimals: false,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
150 name: 'probeNehmerId',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
151 fieldLabel: i18n.getMsg('probeNehmerId'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
152 anchor: '100%',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
153 labelWidth: 105
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
154 }, {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
155 xtype: 'netzbetreiber',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
156 name: 'netzbetreiberId',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
157 editable: false,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
158 fieldLabel: i18n.getMsg('netzbetreiberId'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
159 anchor: '100%',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
160 labelWidth: 105,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
161 allowBlank: false
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
162 }]
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
163 }]
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
164 }]
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
165 }, {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
166 // Medium
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
167 xtype: 'fieldset',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
168 title: i18n.getMsg('medium'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
169 items: [{
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
170 border: 0,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
171 layout: {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
172 type: 'vbox',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
173 align: 'stretch'
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
174 },
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
175 width: '100%',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
176 items: [{
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
177 xtype: 'textfield',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
178 maxLength: 38,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
179 enforceMaxLength: true,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
180 name: 'mediaDesk',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
181 labelWidth: 125,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
182 fieldLabel: i18n.getMsg('mediaDesk'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
183 regex: new RegExp('(?:D: ){1}(?:[0-9]{2} ){11}[0-9]{2}'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
184 regexText: i18n.getMsg('err.msg.deskriptorvalidation'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
185 listeners: {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
186 dirtychange: {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
187 fn: this.updateOnChange,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
188 scope: me
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
189 }
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
190 }
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
191 }, {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
192 xtype: 'umwelt',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
193 name: 'umwId',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
194 fieldLabel: i18n.getMsg('umwId'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
195 labelWidth: 125,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
196 allowBlank: false,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
197 editable: true,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
198 listeners: {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
199 dirtychange: {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
200 fn: this.updateOnChange,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
201 scope: me
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
202 }
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
203 }
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
204 }, {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
205 xtype: 'fieldset',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
206 title: i18n.getMsg('deskDetails'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
207 collapsible: true,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
208 collapsed: true,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
209 defaultType: 'textfield',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
210 layout: {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
211 type: 'table',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
212 columns: 3
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
213 },
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
214 items: this.buildDescriptors(),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
215 listeners: {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
216 dirtychange: {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
217 fn: this.updateOnChange,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
218 scope: me
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
219 }
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
220 }
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
221 }]
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
222 }]
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
223 }, {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
224 // Zeit
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
225 xtype: 'fieldset',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
226 title: i18n.getMsg('time'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
227 layout: {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
228 type: 'hbox',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
229 pack: 'center',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
230 align: 'stretch'
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
231 },
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
232 items: [{
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
233 xtype: 'fset',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
234 title: i18n.getMsg('validity'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
235 name: 'gueltigPeriod',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
236 anchor: '100%',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
237 width: '50%',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
238 margin: '0, 5, 5, 5',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
239 layout: {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
240 type: 'vbox',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
241 align: 'stretch'
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
242 },
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
243 items: [{
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
244 xtype: 'datetime',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
245 fieldLabel: i18n.getMsg('gueltigVon'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
246 labelWidth: 90,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
247 anchor: '100%',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
248 name: 'gueltigVon',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
249 format: 'd.m.Y H:i',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
250 period: 'start'
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
251 }, {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
252 xtype: 'datetime',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
253 fieldLabel: i18n.getMsg('gueltigBis'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
254 labelWidth: 90,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
255 anchor: '100%',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
256 name: 'gueltigBis',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
257 format: 'd.m.Y H:i',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
258 period: 'end'
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
259 }]
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
260 }, {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
261 xtype: 'fset',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
262 title: i18n.getMsg('probenintervall'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
263 name: 'probenintervall',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
264 anchor: '100%',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
265 width: '50%',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
266 margin: '0, 5, 5, 5',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
267 layout: {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
268 type: 'vbox',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
269 align: 'stretch'
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
270 },
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
271 items: [{
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
272 xtype: 'probenintervall',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
273 fieldLabel: i18n.getMsg('probenintervall'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
274 labelWidth: 90,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
275 anchor: '100%',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
276 name: 'probenintervall'
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
277 }, {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
278 xtype: 'numberfield',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
279 fieldLabel: i18n.getMsg('teilintervallVon'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
280 labelWidth: 90,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
281 anchor: '100%',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
282 name: 'teilintervallVon',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
283 period: 'start'
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 xtype: 'numberfield',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
286 fieldLabel: i18n.getMsg('teilintervallBis'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
287 labelWidth: 90,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
288 anchor: '100%',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
289 name: 'teilintervallBis',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
290 period: 'end'
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
291 }, {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
292 xtype: 'probenintervallslider',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
293 fieldLabel: i18n.getMsg('intervall'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
294 labelWidth: 90,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
295 anchor: '100%',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
296 values: [0, 0],
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
297 //this will be overridden
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
298 // by setRecord
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 }]
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
301 }]
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
302 }]
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
303 }];
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
304 this.callParent(arguments);
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
305 },
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 populateIntervall: function(record, intervall) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
308 console.log('Populate Start');
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
309 //intervall is an identifier of a intervall
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
310 // for instance H, M, J, ...
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
311 // Initialize the probenintervallslider
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
312 var s = this.down('probenintervallslider');
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
313 var v = this.getForm().findField('teilintervallVon');
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
314 var b = this.getForm().findField('teilintervallBis');
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
315 var intervallstore = Ext.data.StoreManager.get('Probenintervall');
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
316
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
317 var svalUpper = null
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
318 var svalLower = null
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
319
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
320 if (!intervallstore) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
321 intervallstore = Ext.create('Lada.store.Probenintervall');
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
322 }
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
323
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
324 //It is likely that this method was not
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
325 // called from the controller,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
326 //and the probenintervall was not changed.
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
327 // Load the records in this case
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
328 if (!intervall) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
329 intervall = record.get('probenintervall',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
330 0, false, false, true);
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
331
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
332 svalUpper = record.get('teilintervallBis');
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
333 svalLower = record.get('teilintervallVon');
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
334 }
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
335
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
336
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
337 var intrec = intervallstore
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
338 .findRecord('probenintervall',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
339 intervall, 0, false, false, true);
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
340
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
341 var min = intrec.get('periodstart');
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
342 var max = intrec.get('periodend');
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
343
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
344 if (!svalUpper) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
345 svalUpper = max;
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
346 }
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
347 if (!svalLower) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
348 svalLower = min;
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 //Set Teilintervalle
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
352 v.setMinValue(min);
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
353 v.setMaxValue(max);
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
354 b.setMinValue(min);
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
355 b.setMaxValue(max);
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 //Set Slider
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
358 s.setMinValue(min);
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
359 s.setMaxValue(max);
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
360
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
361 v.setValue(svalLower);
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
362 b.setValue(svalUpper);
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
363
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
364 console.log('Populate End');
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
365 },
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
366
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
367 setRecord: function(record) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
368 this.clearMessages();
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
369 this.getForm().loadRecord(record);
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
370 //Set the intervall numberfields and the slider.
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
371 this.down('probenintervallslider').setValue([
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
372 record.get('teilintervallVon'),
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
373 record.get('teilintervallBis')
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
374 ]);
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
375
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
376 //TODO Set Sliders MinMaxValue
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
377
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
378 this.down('probenintervallslider').on(
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
379 'change',
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
380 Lada.app.getController('Lada.controller.form.Messprogramm')
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
381 .synchronizeFields
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
382 );
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
383
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
384 },
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
385
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
386 setMessages: function(errors, warnings) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
387 var key;
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
388 var element;
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
389 var content;
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
390 var i18n = Lada.getApplication().bundle;
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
391 if (warnings) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
392 for (key in warnings) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
393 element = this.down('component[name=' + key + ']');
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
394 if (!element) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
395 continue;
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 content = warnings[key];
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
398 var warnText = '';
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
399 for (var i = 0; i < content.length; i++) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
400 warnText += i18n.getMsg(content[i].toString()) + '\n';
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
401 }
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
402 element.showWarnings(warnText);
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 if (errors) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
406 for (key in errors) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
407 element = this.down('component[name=' + key + ']');
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
408 if (!element) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
409 continue;
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
410 }
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
411 content = errors[key];
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
412 var errorText = '';
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
413 for (var i = 0; i < content.length; i++) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
414 errorText += i18n.getMsg(content[i].toString()) + '\n';
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
415 }
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
416 element.showErrors(errorText);
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 },
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
420
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
421 clearMessages: function() {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
422 // TODO
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
423 },
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
424
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
425 setReadOnly: function(value) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
426 // TODO
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
427 },
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
428
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
429 buildDescriptors: function() {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
430 var fields = [];
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
431 for (var i = 0; i < 12; i++) {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
432 fields[i] = {
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
433 fieldLabel: 'S' + i,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
434 name: 's' + i,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
435 labelWidth: 25,
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
436 margin: '0, 10, 5, 0'
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 return fields;
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
440 }
b8502964f5c3 Added missing files. Added MmtMockup
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
441 });

http://lada.wald.intevation.org