Mercurial > lada > lada-client
annotate app/view/form/Ortserstellung.js @ 1337:7194964183f4
Ortserstellung controller separated from form
author | Maximilian Krambach <mkrambach@intevation.de> |
---|---|
date | Fri, 03 Feb 2017 17:44:41 +0100 |
parents | b9f0bb189c25 |
children | 1a2cd9bef6d7 |
rev | line source |
---|---|
1279
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
2 * Software engineering by Intevation GmbH |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
3 * |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
4 * This file is Free Software under the GNU GPL (v>=3) |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
6 * the documentation coming with IMIS-Labordaten-Application for details. |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
7 */ |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
8 |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
9 /** |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
10 * Form to create a new Messpunkt |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
11 */ |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
12 Ext.define('Lada.view.form.Ortserstellung', { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
13 extend: 'Ext.form.Panel', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
14 alias: 'widget.ortserstellungsform', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
15 requires: [ |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
16 'Lada.view.widget.Verwaltungseinheit', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
17 'Lada.view.widget.Staat' |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
18 ], |
1284
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
19 model: null, |
1279
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
20 |
1289
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
21 margin: 5, |
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
22 |
1321
f1e348109ebb
Updated style to fit the other windows style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1320
diff
changeset
|
23 border: 0, |
f1e348109ebb
Updated style to fit the other windows style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1320
diff
changeset
|
24 |
1284
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
25 record: null, |
1279
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
26 |
1314
8ace34d9352a
changed behaviour of ortserstellung window on save; fix update (form)
Maximilian Krambach <mkrambach@intevation.de>
parents:
1313
diff
changeset
|
27 trackResetOnLoad: true, |
8ace34d9352a
changed behaviour of ortserstellung window on save; fix update (form)
Maximilian Krambach <mkrambach@intevation.de>
parents:
1313
diff
changeset
|
28 |
1279
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
29 initComponent: function() { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
30 var i18n = Lada.getApplication().bundle; |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
31 var me = this; |
1284
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
32 this.items = [{ |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
33 xtype: 'netzbetreiber', |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
34 editable: false, |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
35 readOnly: true, |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
36 submitValue: true, |
1289
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
37 border: 0, |
1284
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
38 fieldLabel: i18n.getMsg('netzbetreiberId'), |
1289
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
39 labelWidth: 125, |
1288
08085b7d1d0b
Ortszuordnung: Search, new orte, display and validity check
Maximilian Krambach <mkrambach@intevation.de>
parents:
1284
diff
changeset
|
40 value: Lada.netzbetreiber[0] |
1306 | 41 }, { |
1309
1bcc3a62e909
insert and preset OrtId field on Orterstellung
Maximilian Krambach <mkrambach@intevation.de>
parents:
1306
diff
changeset
|
42 xtype: 'textfield', |
1bcc3a62e909
insert and preset OrtId field on Orterstellung
Maximilian Krambach <mkrambach@intevation.de>
parents:
1306
diff
changeset
|
43 name: 'ortId', |
1bcc3a62e909
insert and preset OrtId field on Orterstellung
Maximilian Krambach <mkrambach@intevation.de>
parents:
1306
diff
changeset
|
44 maxLength: 10, |
1bcc3a62e909
insert and preset OrtId field on Orterstellung
Maximilian Krambach <mkrambach@intevation.de>
parents:
1306
diff
changeset
|
45 labelWidth: 125, |
1bcc3a62e909
insert and preset OrtId field on Orterstellung
Maximilian Krambach <mkrambach@intevation.de>
parents:
1306
diff
changeset
|
46 fieldLabel: i18n.getMsg('orte.ortId') |
1bcc3a62e909
insert and preset OrtId field on Orterstellung
Maximilian Krambach <mkrambach@intevation.de>
parents:
1306
diff
changeset
|
47 }, { |
1284
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
48 xtype: 'checkbox', |
1321
f1e348109ebb
Updated style to fit the other windows style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1320
diff
changeset
|
49 labelWidth: 125, |
1284
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
50 name: 'aktiv', |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
51 fieldLabel: 'aktiv:' |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
52 },{ |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
53 xtype: 'staat', |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
54 labelWidth: 125, |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
55 fieldLabel: i18n.getMsg('staat'), |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
56 name: 'staatId', |
1306 | 57 forceSelection: true, |
1284
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
58 listeners: { |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
59 change: { |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
60 fn: function() { me.checkCommitEnabled() } |
1279
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
61 } |
1284
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
62 } |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
63 }, { |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
64 xtype: 'verwaltungseinheit', |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
65 labelWidth: 125, |
1297 | 66 fieldLabel: i18n.getMsg('orte.verwaltungseinheit'), |
1289
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
67 forceSelection: true, |
1337
7194964183f4
Ortserstellung controller separated from form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1331
diff
changeset
|
68 name: 'gemId' |
1284
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
69 }, { |
1331
b9f0bb189c25
Use koordinaten art combobox as input field in create ort window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1323
diff
changeset
|
70 xtype: 'koordinatenart', |
1284
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
71 labelWidth: 125, |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
72 fieldLabel: i18n.getMsg('orte.kda'), |
1337
7194964183f4
Ortserstellung controller separated from form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1331
diff
changeset
|
73 name: 'kdaId' |
1284
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
74 }, { |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
75 xtype: 'numfield', |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
76 labelWidth: 125, |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
77 fieldLabel: i18n.getMsg('orte.koordx'), |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
78 name: 'koordXExtern', |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
79 allowDecimals: true, |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
80 decimalPrecision: 5, |
1337
7194964183f4
Ortserstellung controller separated from form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1331
diff
changeset
|
81 maxLength: 22 |
1284
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
82 }, { |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
83 xtype: 'numfield', |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
84 labelWidth: 125, |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
85 fieldLabel: i18n.getMsg('orte.koordy'), |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
86 name: 'koordYExtern', |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
87 allowDecimals: true, |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
88 decimalPrecision: 5, |
1337
7194964183f4
Ortserstellung controller separated from form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1331
diff
changeset
|
89 maxLength: 22 |
1284
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
90 }, { |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
91 xtype: 'numfield', |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
92 labelWidth: 125, |
1289
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
93 fieldLabel: i18n.getMsg('orte.hoeheLand'), |
1284
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
94 name: 'hoeheLand', |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
95 maxLength: 10, |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
96 allowDecimals: true |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
97 }, { |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
98 xtype: 'tfield', |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
99 labelWidth: 125, |
1310
9b50bf4c218b
Set textfield lengths according to database schema.
Tom Gottfried <tom@intevation.de>
parents:
1309
diff
changeset
|
100 maxLength: 15, |
1284
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
101 name: 'kurztext', |
1289
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
102 fieldLabel: i18n.getMsg('orte.kurztext') |
1284
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
103 },{ |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
104 xtype: 'tfield', |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
105 labelWidth: 125, |
1310
9b50bf4c218b
Set textfield lengths according to database schema.
Tom Gottfried <tom@intevation.de>
parents:
1309
diff
changeset
|
106 maxLength: 100, |
1284
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
107 fieldLabel: i18n.getMsg('orte.langtext'), |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
108 name: 'langtext' |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
109 },{ |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
110 xtype: 'tfield', |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
111 labelWidth: 125, |
1310
9b50bf4c218b
Set textfield lengths according to database schema.
Tom Gottfried <tom@intevation.de>
parents:
1309
diff
changeset
|
112 maxLength: 70, |
1289
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
113 fieldLabel: i18n.getMsg('orte.berichtstext'), |
1284
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
114 name: 'berichtstext' |
1289
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
115 }, { |
1320
3a3148d50b9c
Use new combobox widgets as input elements in create ort window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1314
diff
changeset
|
116 xtype: 'kta', |
1289
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
117 labelWidth: 125, |
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
118 maxLength: 100, |
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
119 name: 'anlageId', |
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
120 fieldLabel: i18n.getMsg('orte.anlageId') |
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
121 }, { |
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
122 xtype: 'tfield', |
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
123 labelWidth: 125, |
1310
9b50bf4c218b
Set textfield lengths according to database schema.
Tom Gottfried <tom@intevation.de>
parents:
1309
diff
changeset
|
124 maxLength: 1, |
1289
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
125 name: 'zone', |
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
126 fieldLabel: i18n.getMsg('orte.zone') |
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
127 },{ |
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
128 xtype: 'tfield', |
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
129 labelWidth: 125, |
1310
9b50bf4c218b
Set textfield lengths according to database schema.
Tom Gottfried <tom@intevation.de>
parents:
1309
diff
changeset
|
130 maxLength: 2, |
1289
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
131 name: 'sektor', |
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
132 fieldLabel: i18n.getMsg('orte.sektor') |
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
133 },{ |
1320
3a3148d50b9c
Use new combobox widgets as input elements in create ort window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1314
diff
changeset
|
134 xtype: 'orttyp', |
1289
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
135 labelWidth: 125, |
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
136 maxLength: 100, |
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
137 name: 'ortTyp', |
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
138 fieldLabel: i18n.getMsg('orte.ortTyp') |
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
139 },{ |
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
140 xtype: 'tfield', |
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
141 labelWidth: 125, |
1310
9b50bf4c218b
Set textfield lengths according to database schema.
Tom Gottfried <tom@intevation.de>
parents:
1309
diff
changeset
|
142 maxLength: 10, |
1289
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
143 name: 'zustaendigkeit', |
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
144 fieldLabel: i18n.getMsg('orte.zustaendigkeit') |
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
145 },{ |
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
146 xtype: 'tfield', |
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
147 labelWidth: 125, |
1310
9b50bf4c218b
Set textfield lengths according to database schema.
Tom Gottfried <tom@intevation.de>
parents:
1309
diff
changeset
|
148 maxLength: 10, |
1289
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
149 name: 'mpArt', |
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
150 fieldLabel: i18n.getMsg('orte.mpArt') |
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
151 },{ |
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
152 xtype: 'tfield', |
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
153 labelWidth: 125, |
1310
9b50bf4c218b
Set textfield lengths according to database schema.
Tom Gottfried <tom@intevation.de>
parents:
1309
diff
changeset
|
154 maxLength: 10, |
1289
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
155 name: 'nutsCode', |
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
156 fieldLabel: i18n.getMsg('orte.nutsCode') |
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
157 },{ |
1320
3a3148d50b9c
Use new combobox widgets as input elements in create ort window.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1314
diff
changeset
|
158 xtype: 'ortszusatz', |
1289
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
159 labelWidth: 125, |
1310
9b50bf4c218b
Set textfield lengths according to database schema.
Tom Gottfried <tom@intevation.de>
parents:
1309
diff
changeset
|
160 maxLength: 7, |
1289
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
161 name: 'ozId', |
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
162 fieldLabel: i18n.getMsg('orte.ozId') |
1284
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
163 }]; |
1289
bfdc00c24baf
Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1288
diff
changeset
|
164 |
1284
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
165 this.dockedItems = [{ |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
166 xtype: 'toolbar', |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
167 dock: 'bottom', |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
168 border: '0, 1, 1, 1', |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
169 style: { |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
170 borderBottom: '1px solid #b5b8c8 !important', |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
171 borderLeft: '1px solid #b5b8c8 !important', |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
172 borderRight: '1px solid #b5b8c8 !important' |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
173 }, |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
174 items: ['->', { |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
175 text: i18n.getMsg('save'), |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
176 action: 'save', |
1321
f1e348109ebb
Updated style to fit the other windows style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1320
diff
changeset
|
177 qtip: 'Daten speichern', |
f1e348109ebb
Updated style to fit the other windows style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1320
diff
changeset
|
178 icon: 'resources/img/dialog-ok-apply.png', |
1284
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
179 disabled: true |
1279
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
180 }, { |
1321
f1e348109ebb
Updated style to fit the other windows style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1320
diff
changeset
|
181 text: i18n.getMsg('discard'), |
f1e348109ebb
Updated style to fit the other windows style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1320
diff
changeset
|
182 qtip: 'Ă„nderungen verwerfen', |
f1e348109ebb
Updated style to fit the other windows style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1320
diff
changeset
|
183 icon: 'resources/img/dialog-cancel.png', |
f1e348109ebb
Updated style to fit the other windows style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1320
diff
changeset
|
184 action: 'revert', |
1337
7194964183f4
Ortserstellung controller separated from form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1331
diff
changeset
|
185 disabled: true |
1279
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
186 }] |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
187 }]; |
1284
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
188 this.callParent(arguments); |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1279
diff
changeset
|
189 this.getForm().loadRecord(this.record); |
1337
7194964183f4
Ortserstellung controller separated from form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1331
diff
changeset
|
190 var controller = Lada.app.getController('Lada.controller.form.Ortserstellung') |
7194964183f4
Ortserstellung controller separated from form
Maximilian Krambach <mkrambach@intevation.de>
parents:
1331
diff
changeset
|
191 controller.checkCommitEnabled(this); |
1295
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
192 }, |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
193 |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
194 setMessages: function(errors, warnings) { |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
195 var key; |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
196 var element; |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
197 var content; |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
198 var i18n = Lada.getApplication().bundle; |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
199 if (warnings) { |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
200 for (key in warnings) { |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
201 element = this.down('component[name=' + key + ']'); |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
202 if (!element) { |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
203 continue; |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
204 } |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
205 content = warnings[key]; |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
206 var warnText = ''; |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
207 for (var i = 0; i < content.length; i++) { |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
208 warnText += i18n.getMsg(content[i].toString()) + '\n'; |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
209 } |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
210 element.showWarnings(warnText); |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
211 } |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
212 } |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
213 if (errors) { |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
214 for (key in errors) { |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
215 element = this.down('component[name=' + key + ']'); |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
216 if (!element) { |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
217 continue; |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
218 } |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
219 content = errors[key]; |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
220 var errorText = ''; |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
221 for (var i = 0; i < content.length; i++) { |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
222 errorText += i18n.getMsg(content[i].toString()) + '\n'; |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
223 } |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
224 element.showErrors(errorText); |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
225 } |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
226 } |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
227 }, |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
228 |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
229 clearMessages: function() { |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
230 // TODO: this is a stub |
171eacf989d8
Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents:
1294
diff
changeset
|
231 } |
1313
c4ac1c09c0b0
another typo
Maximilian Krambach <mkrambach@intevation.de>
parents:
1312
diff
changeset
|
232 }); |