Mercurial > lada > lada-client
annotate app/view/form/Messung.js @ 1155:1be581a403b5
Introduce i18n for Haupt- and Nebenprobennummer.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Mon, 06 Jun 2016 15:10:01 +0200 |
parents | d8e74bd89d6b |
children | bb44ec8746f5 |
rev | line source |
---|---|
581
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz |
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
2 * Software engineering by Intevation GmbH |
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
3 * |
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
4 * This file is Free Software under the GNU GPL (v>=3) |
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out |
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
6 * the documentation coming with IMIS-Labordaten-Application for details. |
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
7 */ |
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
8 |
894 | 9 /** |
10 * Form to edit a Messung | |
581
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
11 */ |
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
12 Ext.define('Lada.view.form.Messung', { |
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
13 extend: 'Ext.form.Panel', |
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
14 alias: 'widget.messungform', |
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
15 requires: [ |
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
16 'Lada.view.widget.Datenbasis', |
611
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
17 'Lada.view.widget.base.CheckBox', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
18 'Lada.view.widget.Messmethode', |
581
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
19 'Lada.view.widget.base.TextField', |
882 | 20 'Lada.view.widget.base.Datetime' |
581
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
21 ], |
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
22 |
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
23 model: 'Lada.model.Messung', |
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
24 minWidth: 650, |
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
25 margin: 5, |
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
26 border: 0, |
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
27 |
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
28 recordId: null, |
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
29 |
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
30 trackResetOnLoad: true, |
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
31 |
589 | 32 initComponent: function() { |
611
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
33 var me = this; |
1155
1be581a403b5
Introduce i18n for Haupt- and Nebenprobennummer.
Tom Gottfried <tom@intevation.de>
parents:
1017
diff
changeset
|
34 var i18n = Lada.getApplication().bundle; |
581
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
35 this.items = [{ |
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
36 xtype: 'fieldset', |
611
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
37 title: 'Allgemein', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
38 items: [{ |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
39 border: 0, |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
40 margin: '0, 0, 10, 0', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
41 layout: { |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
42 type: 'table', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
43 columns: 2 |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
44 }, |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
45 dockedItems: [{ |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
46 xtype: 'toolbar', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
47 dock: 'bottom', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
48 border: '0, 1, 1, 1', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
49 style: { |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
50 borderBottom: '1px solid #b5b8c8 !important', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
51 borderLeft: '1px solid #b5b8c8 !important', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
52 borderRight: '1px solid #b5b8c8 !important' |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
53 }, |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
54 items: ['->', { |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
55 text: 'Speichern', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
56 qtip: 'Daten speichern', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
57 icon: 'resources/img/dialog-ok-apply.png', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
58 action: 'save', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
59 disabled: true |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
60 }, { |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
61 text: 'Verwerfen', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
62 qtip: 'Ă„nderungen verwerfen', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
63 icon: 'resources/img/dialog-cancel.png', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
64 action: 'discard', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
65 disabled: true |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
66 }] |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
67 }], |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
68 items: [{ |
708
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
69 xtype: 'tfield', |
611
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
70 name: 'nebenprobenNr', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
71 maxLength: 10, |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
72 margin: '0, 10, 5, 0', |
1155
1be581a403b5
Introduce i18n for Haupt- and Nebenprobennummer.
Tom Gottfried <tom@intevation.de>
parents:
1017
diff
changeset
|
73 fieldLabel: i18n.getMsg('nebenprobenNr'), |
611
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
74 width: 300, |
718
7f11b75e0188
Trailing Commas, editable: false for Umwelt und Messstelle widget
Dustin Demuth <dustin@intevation.de>
parents:
715
diff
changeset
|
75 labelWidth: 100 |
611
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
76 }, { |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
77 xtype: 'messmethode', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
78 name: 'mmtId', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
79 margin: '0, 10, 5, 0', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
80 fieldLabel: 'Messmethode', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
81 width: 300, |
718
7f11b75e0188
Trailing Commas, editable: false for Umwelt und Messstelle widget
Dustin Demuth <dustin@intevation.de>
parents:
715
diff
changeset
|
82 labelWidth: 100 |
611
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
83 }, { |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
84 xtype: 'datetime', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
85 name: 'messzeitpunkt', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
86 margin: '0, 10, 5, 0', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
87 fieldLabel: 'Messzeitpunkt', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
88 width: 300, |
718
7f11b75e0188
Trailing Commas, editable: false for Umwelt und Messstelle widget
Dustin Demuth <dustin@intevation.de>
parents:
715
diff
changeset
|
89 labelWidth: 100 |
611
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
90 }, { |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
91 xtype: 'numberfield', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
92 allowDecimals: false, |
661
04cf6b514e3e
Enforcing maxlength on Numberfield Messdauer
Dustin Demuth <dustin@intevation.de>
parents:
611
diff
changeset
|
93 allowExponential: false, |
04cf6b514e3e
Enforcing maxlength on Numberfield Messdauer
Dustin Demuth <dustin@intevation.de>
parents:
611
diff
changeset
|
94 enforceMaxLength: true, |
04cf6b514e3e
Enforcing maxlength on Numberfield Messdauer
Dustin Demuth <dustin@intevation.de>
parents:
611
diff
changeset
|
95 maxLength: 10, |
611
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
96 minValue: 0, |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
97 name: 'messdauer', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
98 margin: '0, 10, 5, 0', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
99 fieldLabel: 'Messdauer', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
100 width: 300, |
718
7f11b75e0188
Trailing Commas, editable: false for Umwelt und Messstelle widget
Dustin Demuth <dustin@intevation.de>
parents:
715
diff
changeset
|
101 labelWidth: 100 |
611
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
102 }, { |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
103 xtype: 'chkbox', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
104 name: 'fertig', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
105 margin: '0, 10, 5, 0', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
106 fieldLabel: 'Fertig', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
107 width: 300, |
718
7f11b75e0188
Trailing Commas, editable: false for Umwelt und Messstelle widget
Dustin Demuth <dustin@intevation.de>
parents:
715
diff
changeset
|
108 labelWidth: 100 |
611
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
109 }, { |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
110 xtype: 'chkbox', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
111 name: 'geplant', |
854
a031b98c7edc
Geplant-Checkbox for Messungen is now ReadOnly
Dustin Demuth <dustin@intevation.de>
parents:
718
diff
changeset
|
112 readOnly: true, |
611
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
113 margin: '0, 10, 5, 0', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
114 fieldLabel: 'Geplant', |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
115 width: 300, |
718
7f11b75e0188
Trailing Commas, editable: false for Umwelt und Messstelle widget
Dustin Demuth <dustin@intevation.de>
parents:
715
diff
changeset
|
116 labelWidth: 100 |
945
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
117 }, { |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
118 xtype: 'textfield', |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
119 name: 'status', |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
120 readOnly: true, |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
121 isFormField: false, |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
122 maxLength: 10, |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
123 margin: '0, 10, 5, 0', |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
124 fieldLabel: 'Status', |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
125 width: 300, |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
126 labelWidth: 100, |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
127 submitValue: false, |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
128 isFormField: false, |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
129 preventMark: true, //Do not display error msg. |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
130 validateValue: function() { |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
131 return true; //this field is always valid |
965
a2c2039bb5d9
Disabled StatusGrid Edit when StatusEdit ist false, Load StatuswerteStore differently, removed a bunch of trailing commas
Dustin Demuth <dustin@intevation.de>
parents:
963
diff
changeset
|
132 } |
957
881984972e0e
Added Statusstufe to MessungForm
Dustin Demuth <dustin@intevation.de>
parents:
955
diff
changeset
|
133 }, { |
881984972e0e
Added Statusstufe to MessungForm
Dustin Demuth <dustin@intevation.de>
parents:
955
diff
changeset
|
134 xtype: 'textfield', |
881984972e0e
Added Statusstufe to MessungForm
Dustin Demuth <dustin@intevation.de>
parents:
955
diff
changeset
|
135 name: 'stufe', |
881984972e0e
Added Statusstufe to MessungForm
Dustin Demuth <dustin@intevation.de>
parents:
955
diff
changeset
|
136 readOnly: true, |
881984972e0e
Added Statusstufe to MessungForm
Dustin Demuth <dustin@intevation.de>
parents:
955
diff
changeset
|
137 isFormField: false, |
881984972e0e
Added Statusstufe to MessungForm
Dustin Demuth <dustin@intevation.de>
parents:
955
diff
changeset
|
138 maxLength: 10, |
881984972e0e
Added Statusstufe to MessungForm
Dustin Demuth <dustin@intevation.de>
parents:
955
diff
changeset
|
139 margin: '0, 10, 5, 0', |
881984972e0e
Added Statusstufe to MessungForm
Dustin Demuth <dustin@intevation.de>
parents:
955
diff
changeset
|
140 fieldLabel: 'Stufe', |
881984972e0e
Added Statusstufe to MessungForm
Dustin Demuth <dustin@intevation.de>
parents:
955
diff
changeset
|
141 width: 300, |
881984972e0e
Added Statusstufe to MessungForm
Dustin Demuth <dustin@intevation.de>
parents:
955
diff
changeset
|
142 labelWidth: 100, |
881984972e0e
Added Statusstufe to MessungForm
Dustin Demuth <dustin@intevation.de>
parents:
955
diff
changeset
|
143 submitValue: false, |
881984972e0e
Added Statusstufe to MessungForm
Dustin Demuth <dustin@intevation.de>
parents:
955
diff
changeset
|
144 isFormField: false, |
881984972e0e
Added Statusstufe to MessungForm
Dustin Demuth <dustin@intevation.de>
parents:
955
diff
changeset
|
145 preventMark: true, //Do not display error msg. |
881984972e0e
Added Statusstufe to MessungForm
Dustin Demuth <dustin@intevation.de>
parents:
955
diff
changeset
|
146 validateValue: function() { |
881984972e0e
Added Statusstufe to MessungForm
Dustin Demuth <dustin@intevation.de>
parents:
955
diff
changeset
|
147 return true; //this field is always valid |
965
a2c2039bb5d9
Disabled StatusGrid Edit when StatusEdit ist false, Load StatuswerteStore differently, removed a bunch of trailing commas
Dustin Demuth <dustin@intevation.de>
parents:
963
diff
changeset
|
148 } |
611
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
149 }] |
8a156a7fbe67
added a controller for messungforms, modified testdatensatz-widget to load a local store, removed dirtychange listeners from probe-form
Dustin Demuth <dustin@intevation.de>
parents:
589
diff
changeset
|
150 }] |
581
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
151 }]; |
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
152 this.callParent(arguments); |
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
153 }, |
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
154 |
589 | 155 setRecord: function(record) { |
960
73b397d8dd3a
Hide Status Fields when creating a new messung
Dustin Demuth <dustin@intevation.de>
parents:
958
diff
changeset
|
156 var form = this.getForm(); |
73b397d8dd3a
Hide Status Fields when creating a new messung
Dustin Demuth <dustin@intevation.de>
parents:
958
diff
changeset
|
157 form.loadRecord(record); |
73b397d8dd3a
Hide Status Fields when creating a new messung
Dustin Demuth <dustin@intevation.de>
parents:
958
diff
changeset
|
158 if (record.getId()){ |
961
6f1cc3316e2d
Intermediate Result. When creating a Messung a Statuswert will be set.
Dustin Demuth <dustin@intevation.de>
parents:
960
diff
changeset
|
159 this.retrieveStatus(record.getId(), record.get('status')); |
960
73b397d8dd3a
Hide Status Fields when creating a new messung
Dustin Demuth <dustin@intevation.de>
parents:
958
diff
changeset
|
160 } |
73b397d8dd3a
Hide Status Fields when creating a new messung
Dustin Demuth <dustin@intevation.de>
parents:
958
diff
changeset
|
161 else { |
73b397d8dd3a
Hide Status Fields when creating a new messung
Dustin Demuth <dustin@intevation.de>
parents:
958
diff
changeset
|
162 //remove the StatusWert and StatusStufe field from the form |
73b397d8dd3a
Hide Status Fields when creating a new messung
Dustin Demuth <dustin@intevation.de>
parents:
958
diff
changeset
|
163 var sw = this.down('[name=status]'); |
73b397d8dd3a
Hide Status Fields when creating a new messung
Dustin Demuth <dustin@intevation.de>
parents:
958
diff
changeset
|
164 var ss = this.down('[name=stufe]'); |
73b397d8dd3a
Hide Status Fields when creating a new messung
Dustin Demuth <dustin@intevation.de>
parents:
958
diff
changeset
|
165 ss.hide(); |
73b397d8dd3a
Hide Status Fields when creating a new messung
Dustin Demuth <dustin@intevation.de>
parents:
958
diff
changeset
|
166 sw.hide(); |
73b397d8dd3a
Hide Status Fields when creating a new messung
Dustin Demuth <dustin@intevation.de>
parents:
958
diff
changeset
|
167 } |
945
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
168 }, |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
169 |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
170 retrieveStatus: function(messungsId, statusId) { |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
171 var i18n = Lada.getApplication().bundle; |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
172 var msg = i18n.getMsg('load.statuswert'); |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
173 var textfield = this.down('[name=status]'); |
997
c943340176d4
Disable the statusresetbutton
Dustin Demuth <dustin@intevation.de>
parents:
985
diff
changeset
|
174 var messwin = this.up('window'); |
945
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
175 |
961
6f1cc3316e2d
Intermediate Result. When creating a Messung a Statuswert will be set.
Dustin Demuth <dustin@intevation.de>
parents:
960
diff
changeset
|
176 if(textfield) { |
6f1cc3316e2d
Intermediate Result. When creating a Messung a Statuswert will be set.
Dustin Demuth <dustin@intevation.de>
parents:
960
diff
changeset
|
177 textfield.setRawValue(msg); |
6f1cc3316e2d
Intermediate Result. When creating a Messung a Statuswert will be set.
Dustin Demuth <dustin@intevation.de>
parents:
960
diff
changeset
|
178 } |
945
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
179 |
961
6f1cc3316e2d
Intermediate Result. When creating a Messung a Statuswert will be set.
Dustin Demuth <dustin@intevation.de>
parents:
960
diff
changeset
|
180 var sStore = Ext.create('Lada.store.Status'); |
6f1cc3316e2d
Intermediate Result. When creating a Messung a Statuswert will be set.
Dustin Demuth <dustin@intevation.de>
parents:
960
diff
changeset
|
181 sStore.load({ |
6f1cc3316e2d
Intermediate Result. When creating a Messung a Statuswert will be set.
Dustin Demuth <dustin@intevation.de>
parents:
960
diff
changeset
|
182 params: { |
6f1cc3316e2d
Intermediate Result. When creating a Messung a Statuswert will be set.
Dustin Demuth <dustin@intevation.de>
parents:
960
diff
changeset
|
183 messungsId: messungsId |
6f1cc3316e2d
Intermediate Result. When creating a Messung a Statuswert will be set.
Dustin Demuth <dustin@intevation.de>
parents:
960
diff
changeset
|
184 }, |
6f1cc3316e2d
Intermediate Result. When creating a Messung a Statuswert will be set.
Dustin Demuth <dustin@intevation.de>
parents:
960
diff
changeset
|
185 callback: function(records, operation, success) { |
1017
d8e74bd89d6b
Fixed Activation of StatusReset Button
Dustin Demuth <dustin@intevation.de>
parents:
997
diff
changeset
|
186 var sw, ss, se; |
945
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
187 var i18n = Lada.getApplication().bundle; |
950
c7bf0b459074
Fixed some issues when the status is null
Dustin Demuth <dustin@intevation.de>
parents:
945
diff
changeset
|
188 if (sStore.getTotalCount() === 0 || !statusId) { |
957
881984972e0e
Added Statusstufe to MessungForm
Dustin Demuth <dustin@intevation.de>
parents:
955
diff
changeset
|
189 sw = 0; |
945
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
190 } |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
191 else { |
957
881984972e0e
Added Statusstufe to MessungForm
Dustin Demuth <dustin@intevation.de>
parents:
955
diff
changeset
|
192 sw = sStore.getById(statusId).get('statusWert'); |
881984972e0e
Added Statusstufe to MessungForm
Dustin Demuth <dustin@intevation.de>
parents:
955
diff
changeset
|
193 ss = sStore.getById(statusId).get('statusStufe'); |
1017
d8e74bd89d6b
Fixed Activation of StatusReset Button
Dustin Demuth <dustin@intevation.de>
parents:
997
diff
changeset
|
194 se = sStore.getById(statusId).get('erzeuger'); |
945
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
195 } |
957
881984972e0e
Added Statusstufe to MessungForm
Dustin Demuth <dustin@intevation.de>
parents:
955
diff
changeset
|
196 this.setStatusWert(sw); |
881984972e0e
Added Statusstufe to MessungForm
Dustin Demuth <dustin@intevation.de>
parents:
955
diff
changeset
|
197 this.setStatusStufe(ss); |
997
c943340176d4
Disable the statusresetbutton
Dustin Demuth <dustin@intevation.de>
parents:
985
diff
changeset
|
198 |
1017
d8e74bd89d6b
Fixed Activation of StatusReset Button
Dustin Demuth <dustin@intevation.de>
parents:
997
diff
changeset
|
199 // Enable / Disable the statusreset button of the statusgrid of the messungwindow |
997
c943340176d4
Disable the statusresetbutton
Dustin Demuth <dustin@intevation.de>
parents:
985
diff
changeset
|
200 if (messwin.record.get('statusEdit') === true && |
c943340176d4
Disable the statusresetbutton
Dustin Demuth <dustin@intevation.de>
parents:
985
diff
changeset
|
201 sw != 0 && |
1017
d8e74bd89d6b
Fixed Activation of StatusReset Button
Dustin Demuth <dustin@intevation.de>
parents:
997
diff
changeset
|
202 sw != 4 && |
d8e74bd89d6b
Fixed Activation of StatusReset Button
Dustin Demuth <dustin@intevation.de>
parents:
997
diff
changeset
|
203 Ext.Array.contains(Lada.mst, se)) { |
d8e74bd89d6b
Fixed Activation of StatusReset Button
Dustin Demuth <dustin@intevation.de>
parents:
997
diff
changeset
|
204 |
997
c943340176d4
Disable the statusresetbutton
Dustin Demuth <dustin@intevation.de>
parents:
985
diff
changeset
|
205 messwin.enableStatusReset(); |
c943340176d4
Disable the statusresetbutton
Dustin Demuth <dustin@intevation.de>
parents:
985
diff
changeset
|
206 } |
c943340176d4
Disable the statusresetbutton
Dustin Demuth <dustin@intevation.de>
parents:
985
diff
changeset
|
207 else { |
c943340176d4
Disable the statusresetbutton
Dustin Demuth <dustin@intevation.de>
parents:
985
diff
changeset
|
208 messwin.disableStatusReset(); |
c943340176d4
Disable the statusresetbutton
Dustin Demuth <dustin@intevation.de>
parents:
985
diff
changeset
|
209 } |
c943340176d4
Disable the statusresetbutton
Dustin Demuth <dustin@intevation.de>
parents:
985
diff
changeset
|
210 |
945
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
211 }, |
961
6f1cc3316e2d
Intermediate Result. When creating a Messung a Statuswert will be set.
Dustin Demuth <dustin@intevation.de>
parents:
960
diff
changeset
|
212 scope: this |
945
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
213 }); |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
214 }, |
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
215 |
957
881984972e0e
Added Statusstufe to MessungForm
Dustin Demuth <dustin@intevation.de>
parents:
955
diff
changeset
|
216 /** |
881984972e0e
Added Statusstufe to MessungForm
Dustin Demuth <dustin@intevation.de>
parents:
955
diff
changeset
|
217 * Updates the Messungform and fills the Statuswert |
881984972e0e
Added Statusstufe to MessungForm
Dustin Demuth <dustin@intevation.de>
parents:
955
diff
changeset
|
218 */ |
945
023e622f9551
Added the ability to work with "StatusWerten" which are delivered by the lada-server.
Dustin Demuth <dustin@intevation.de>
parents:
894
diff
changeset
|
219 setStatusWert: function(value){ |
963
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
220 var swStore = Ext.data.StoreManager.get('statuswerte'); |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
221 var i18n = Lada.getApplication().bundle; |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
222 var msg = i18n.getMsg('load.statuswert.error'); |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
223 var textfield = this.down('[name=status]'); |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
224 |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
225 if (!swStore) { |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
226 //Set the textfield asynchronously |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
227 swStore = Ext.create('Lada.store.StatusWerte'); |
965
a2c2039bb5d9
Disabled StatusGrid Edit when StatusEdit ist false, Load StatuswerteStore differently, removed a bunch of trailing commas
Dustin Demuth <dustin@intevation.de>
parents:
963
diff
changeset
|
228 console.log('loading sw store messungform'); |
963
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
229 swStore.load({ |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
230 scope: this, |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
231 callback: function(records, operation, success) { |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
232 if (success) { |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
233 var item = swStore.getById(value); |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
234 if (item) { |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
235 msg = item.get('wert'); |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
236 } |
957
881984972e0e
Added Statusstufe to MessungForm
Dustin Demuth <dustin@intevation.de>
parents:
955
diff
changeset
|
237 } |
963
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
238 if (textfield) { |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
239 textfield.setRawValue(msg); |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
240 } |
965
a2c2039bb5d9
Disabled StatusGrid Edit when StatusEdit ist false, Load StatuswerteStore differently, removed a bunch of trailing commas
Dustin Demuth <dustin@intevation.de>
parents:
963
diff
changeset
|
241 } |
963
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
242 }); |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
243 } |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
244 else { |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
245 //Set the textfield |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
246 var item = swStore.getById(value); |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
247 if (item) { |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
248 msg = item.get('wert'); |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
249 } |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
250 if (textfield) { |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
251 textfield.setRawValue(msg); |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
252 } |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
253 } |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
254 |
957
881984972e0e
Added Statusstufe to MessungForm
Dustin Demuth <dustin@intevation.de>
parents:
955
diff
changeset
|
255 }, |
881984972e0e
Added Statusstufe to MessungForm
Dustin Demuth <dustin@intevation.de>
parents:
955
diff
changeset
|
256 |
881984972e0e
Added Statusstufe to MessungForm
Dustin Demuth <dustin@intevation.de>
parents:
955
diff
changeset
|
257 /** |
881984972e0e
Added Statusstufe to MessungForm
Dustin Demuth <dustin@intevation.de>
parents:
955
diff
changeset
|
258 * Updates the Messungform and fills the StatusStufe |
881984972e0e
Added Statusstufe to MessungForm
Dustin Demuth <dustin@intevation.de>
parents:
955
diff
changeset
|
259 */ |
881984972e0e
Added Statusstufe to MessungForm
Dustin Demuth <dustin@intevation.de>
parents:
955
diff
changeset
|
260 setStatusStufe: function(value){ |
963
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
261 var ssStore = Ext.data.StoreManager.get('statusstufe') |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
262 var i18n = Lada.getApplication().bundle; |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
263 var msg = i18n.getMsg('load.statusstufe.error'); |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
264 var textfield = this.down('[name=stufe]'); |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
265 if (!ssStore) { |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
266 //set the value asynchronously |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
267 Ext.create('Lada.store.StatusStufe'); |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
268 ssStore.load({ |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
269 scope: this, |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
270 callback: function(records, operation, success) { |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
271 if (success) { |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
272 var item = ssStore.getById(value); |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
273 if (item) { |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
274 msg = item.get('stufe'); |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
275 } |
957
881984972e0e
Added Statusstufe to MessungForm
Dustin Demuth <dustin@intevation.de>
parents:
955
diff
changeset
|
276 } |
963
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
277 if (textfield) { |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
278 textfield.setRawValue(msg); |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
279 } |
965
a2c2039bb5d9
Disabled StatusGrid Edit when StatusEdit ist false, Load StatuswerteStore differently, removed a bunch of trailing commas
Dustin Demuth <dustin@intevation.de>
parents:
963
diff
changeset
|
280 } |
963
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
281 }); |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
282 } |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
283 else { |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
284 //Set the value. |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
285 var item = ssStore.getById(value); |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
286 if (item) { |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
287 msg = item.get('stufe'); |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
288 } |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
289 if (textfield) { |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
290 textfield.setRawValue(msg); |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
291 } |
6a6f2c6fe8ee
More work done on StatusWerte and Statusstufe. A Messung will also open when the owner attribute is true. Stauswerte and StatusStufen are loaded at application startup. Statusgrid and Messunggrid now use these stores, which were registered at the store manager.
Dustin Demuth <dustin@intevation.de>
parents:
961
diff
changeset
|
292 } |
581
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
293 }, |
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
294 |
708
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
295 setMessages: function(errors, warnings) { |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
296 var key; |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
297 var element; |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
298 var content; |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
299 var i18n = Lada.getApplication().bundle; |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
300 if (warnings) { |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
301 for (key in warnings) { |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
302 element = this.down('component[name=' + key + ']'); |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
303 if (!element) { |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
304 continue; |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
305 } |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
306 content = warnings[key]; |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
307 var warnText = ''; |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
308 for (var i = 0; i < content.length; i++) { |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
309 warnText += i18n.getMsg(content[i].toString()) + '\n'; |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
310 } |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
311 element.showWarnings(warnText); |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
312 } |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
313 } |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
314 if (errors) { |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
315 for (key in errors) { |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
316 element = this.down('component[name=' + key + ']'); |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
317 if (!element) { |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
318 continue; |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
319 } |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
320 content = errors[key]; |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
321 var errorText = ''; |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
322 for (var i = 0; i < content.length; i++) { |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
323 errorText += i18n.getMsg(content[i].toString()) + '\n'; |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
324 } |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
325 element.showErrors(errorText); |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
326 } |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
327 } |
581
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
328 }, |
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
329 |
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
330 clearMessages: function() { |
708
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
331 this.down('tfield[name=nebenprobenNr]').clearWarningOrError(); |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
332 //this.down('messmethode[name=mmtId]').clearWarningOrError(); |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
333 this.down('datetime[name=messzeitpunkt]').clearWarningOrError(); |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
334 //this.down('numberfield[name=messdauer]').clearWarningOrError(); |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
335 this.down('chkbox[name=fertig]').clearWarningOrError(); |
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
336 this.down('chkbox[name=geplant]').clearWarningOrError(); |
581
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
337 }, |
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
338 |
694 | 339 setReadOnly: function(value) { |
708
2ad36c8db968
Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents:
694
diff
changeset
|
340 this.down('tfield[name=nebenprobenNr]').setReadOnly(value); |
710
f204f30b824a
Handle readonly mode and refresh operations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
708
diff
changeset
|
341 this.down('messmethode[name=mmtId]').setReadOnly(value); |
694 | 342 this.down('datetime[name=messzeitpunkt]').setReadOnly(value); |
343 this.down('numberfield[name=messdauer]').setReadOnly(value); | |
985
abc2e9fe5069
Handle Fertig Flag like all other Attributes
Dustin Demuth <dustin@intevation.de>
parents:
965
diff
changeset
|
344 this.down('chkbox[name=fertig]').setReadOnly(value); |
581
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
345 } |
424802824648
Added a form for Messungen (unfinished)
Dustin Demuth <dustin@intevation.de>
parents:
diff
changeset
|
346 }); |