annotate app/view/form/Location.js @ 807:18697326c862

Less ugly
author Dustin Demuth <dustin@intevation.de>
date Fri, 22 May 2015 15:02:22 +0200
parents 3139b920dd0e
children dd9b77e2532b
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',
802
3139b920dd0e Increased decimalPrecision for LatLon
Dustin Demuth <dustin@intevation.de>
parents: 708
diff changeset
91 decimalPrecision: 5,
604
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
92 width: 280,
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
93 labelWidth: 80
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
94 }, {
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
95 xtype: 'numberfield',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
96 name: 'longitude',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
97 fieldLabel: 'Lon',
802
3139b920dd0e Increased decimalPrecision for LatLon
Dustin Demuth <dustin@intevation.de>
parents: 708
diff changeset
98 decimalPrecision: 5,
604
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
99 width: 280,
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
100 labelWidth: 80
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
101 }, {
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
102 xtype: 'numberfield',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
103 name: 'hoeheLand',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
104 fieldLabel: 'Höhe',
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
105 width: 280,
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
106 labelWidth: 80
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 }]
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 this.callParent(arguments);
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
111 },
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
112
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
113 setRecord: function(record) {
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
114 this.getForm().loadRecord(record);
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
115 },
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
116
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
117 setMessages: function(errors, warnings) {
708
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
118 var key;
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
119 var element;
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
120 var content;
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
121 var i18n = Lada.getApplication().bundle;
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
122 if (warnings) {
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
123 for (key in warnings) {
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
124 element = this.down('component[name=' + key + ']');
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
125 if (!element) {
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
126 continue;
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
127 }
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
128 content = warnings[key];
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
129 var warnText = '';
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
130 for (var i = 0; i < content.length; i++) {
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
131 warnText += i18n.getMsg(content[i].toString()) + '\n';
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 element.showWarnings(warnText);
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
134 }
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
135 }
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
136 if (errors) {
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
137 for (key in errors) {
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
138 element = this.down('component[name=' + key + ']');
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
139 if (!element) {
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
140 continue;
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
141 }
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
142 content = errors[key];
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
143 var errorText = '';
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
144 for (var i = 0; i < content.length; i++) {
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
145 errorText += i18n.getMsg(content[i].toString()) + '\n';
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 element.showErrors(errorText);
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
148 }
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
149 }
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
150 },
604
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
151
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
152 clearMessages: function() {
708
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
153 this.down('tfield[name=beschreibung]').clearWarningOrError();
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
154 this.down('tfield[name=bezeichnung]').clearWarningOrError();
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
155 this.down('staat[name=staatId]').clearWarningOrError();
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
156 this.down('verwaltungseinheit[name=verwaltungseinheitId]').clearWarningOrError();
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
157 //this.down('numberfield[name=longitude]').clearWarningOrError();
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
158 //this.down('numberfield[name=latitude]').clearWarningOrError();
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
159 //this.down('numberfield[name=hoeheLand]').clearWarningOrError();
2ad36c8db968 Added ClearMessages, SetWarnigs, SetReadonly
Dustin Demuth <dustin@intevation.de>
parents: 675
diff changeset
160 },
604
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
161
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
162 setReadOnly: function(value) {
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
163 this.down('tfield[name=beschreibung]').setReadOnly(value);
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
164 this.down('tfield[name=bezeichnung]').setReadOnly(value);
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
165 this.down('staat[name=staatId]').setReadOnly(value);
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
166 this.down('verwaltungseinheit[name=verwaltungseinheitId]').setReadOnly(value);
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
167 this.down('numberfield[name=longitude]').setReadOnly(value);
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
168 this.down('numberfield[name=latitude]').setReadOnly(value);
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
169 this.down('numberfield[name=hoeheLand]').setReadOnly(value);
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
170 }
2f17dd53e69f Added form for locations.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
171 });

http://lada.wald.intevation.org