annotate app/view/form/Location.js @ 722:cf898d2cd362

Do not autoload this store
author Dustin Demuth <dustin@intevation.de>
date Thu, 16 Apr 2015 11:58:00 +0200
parents 2ad36c8db968
children 3139b920dd0e
rev   line source
604
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
2 * Software engineering by Intevation GmbH
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
3 *
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
4 * This file is Free Software under the GNU GPL (v>=3)
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
6 * the documentation coming with IMIS-Labordaten-Application for details.
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
7 */
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
8
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
9 /*
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
10 * Formular to edit a Probe
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
11 */
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
12 Ext.define('Lada.view.form.Location', {
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
13 extend: 'Ext.form.Panel',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
14 alias: 'widget.locationform',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
15
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
16 requires: [
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
17 'Lada.view.widget.Verwaltungseinheit',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
18 'Lada.view.widget.Staat'
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
19 ],
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
20
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
21 model: 'Lada.model.Ort',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
22 minWidth: 300,
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
23 margin: 5,
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
24 border: 0,
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
25
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
26 recordId: null,
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
27
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
28 trackResetOnLoad: true,
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
29
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
30 initComponent: function() {
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
31 this.items = [{
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
32 xtype: 'fieldset',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
33 title: 'Details',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
34 items: [{
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
35 border: 0,
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
36 margin: '0, 0, 10, 0',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
37 dockedItems: [{
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
38 xtype: 'toolbar',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
39 dock: 'bottom',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
40 border: '0, 1, 1, 1',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
41 style: {
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
42 borderBottom: '1px solid #b5b8c8 !important',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
43 borderLeft: '1px solid #b5b8c8 !important',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
44 borderRight: '1px solid #b5b8c8 !important'
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
45 },
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
46 items: ['->', {
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
47 text: 'Speichern',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
48 qtip: 'Daten speichern',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
49 icon: 'resources/img/dialog-ok-apply.png',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
50 action: 'save',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
51 disabled: true
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
52 }, {
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
53 text: 'Verwerfen',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
54 qtip: 'Änderungen verwerfen',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
55 icon: 'resources/img/dialog-cancel.png',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
56 action: 'discard',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
57 disabled: true
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
58 }]
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
59 }],
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
60 items: [{
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
61 xtype: 'tfield',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
62 maxLength: 100,
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
63 name: 'beschreibung',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
64 fieldLabel: 'Beschreibung',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
65 width: 280,
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
66 labelWidth: 80
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
67 }, {
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
68 xtype: 'tfield',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
69 maxLength: 10,
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
70 name: 'bezeichnung',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
71 fieldLabel: 'Bezeichnung',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
72 width: 280,
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
73 labelWidth: 80
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
74 }, {
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
75 xtype: 'staat',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
76 name: 'staatId',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
77 fieldLabel: 'Staat',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
78 width: 280,
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
79 labelWidth: 80
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
80 }, {
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
81 xtype: 'verwaltungseinheit',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
82 name: 'verwaltungseinheitId',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
83 fieldLabel: 'Gemeinde',
675
fe527f380b10 merged.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 604
diff changeset
84 editable: true,
604
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
85 width: 280,
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
86 labelWidth: 80
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
87 }, {
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
88 xtype: 'numberfield',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
89 name: 'latitude',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
90 fieldLabel: 'Lat',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
91 width: 280,
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
92 labelWidth: 80
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
93 }, {
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
94 xtype: 'numberfield',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
95 name: 'longitude',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
96 fieldLabel: 'Lon',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
97 width: 280,
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
98 labelWidth: 80
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
99 }, {
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
100 xtype: 'numberfield',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
101 name: 'hoeheLand',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
102 fieldLabel: 'Höhe',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
103 width: 280,
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
104 labelWidth: 80
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
105 }]
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
106 }]
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
107 }];
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
108 this.callParent(arguments);
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
109 },
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
110
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
111 setRecord: function(record) {
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
112 this.getForm().loadRecord(record);
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
113 },
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
114
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
115 setMessages: function(errors, warnings) {
708
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
116 var key;
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
117 var element;
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
118 var content;
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
119 var i18n = Lada.getApplication().bundle;
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
120 if (warnings) {
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
121 for (key in warnings) {
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
122 element = this.down('component[name=' + key + ']');
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
123 if (!element) {
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
124 continue;
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
125 }
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
126 content = warnings[key];
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
127 var warnText = '';
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
128 for (var i = 0; i < content.length; i++) {
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
129 warnText += i18n.getMsg(content[i].toString()) + '\n';
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
130 }
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
131 element.showWarnings(warnText);
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
132 }
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
133 }
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
134 if (errors) {
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
135 for (key in errors) {
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
136 element = this.down('component[name=' + key + ']');
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
137 if (!element) {
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
138 continue;
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
139 }
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
140 content = errors[key];
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
141 var errorText = '';
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
142 for (var i = 0; i < content.length; i++) {
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
143 errorText += i18n.getMsg(content[i].toString()) + '\n';
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
144 }
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
145 element.showErrors(errorText);
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
146 }
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
147 }
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
148 },
604
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
149
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
150 clearMessages: function() {
708
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
151 this.down('tfield[name=beschreibung]').clearWarningOrError();
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
152 this.down('tfield[name=bezeichnung]').clearWarningOrError();
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
153 this.down('staat[name=staatId]').clearWarningOrError();
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
154 this.down('verwaltungseinheit[name=verwaltungseinheitId]').clearWarningOrError();
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
155 //this.down('numberfield[name=longitude]').clearWarningOrError();
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
156 //this.down('numberfield[name=latitude]').clearWarningOrError();
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
157 //this.down('numberfield[name=hoeheLand]').clearWarningOrError();
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
158 },
604
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
159
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
160 setReadOnly: function(value) {
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
161 this.down('tfield[name=beschreibung]').setReadOnly(value);
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
162 this.down('tfield[name=bezeichnung]').setReadOnly(value);
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
163 this.down('staat[name=staatId]').setReadOnly(value);
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
164 this.down('verwaltungseinheit[name=verwaltungseinheitId]').setReadOnly(value);
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
165 this.down('numberfield[name=longitude]').setReadOnly(value);
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
166 this.down('numberfield[name=latitude]').setReadOnly(value);
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
167 this.down('numberfield[name=hoeheLand]').setReadOnly(value);
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
168 }
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
169 });

http://lada.wald.intevation.org