annotate app/view/form/Ortserstellung.js @ 1414:6f9985b4cf47

Added tag 2.6 for changeset fc0ec9cde3aa
author Tom Gottfried <tom@intevation.de>
date Mon, 27 Mar 2017 17:08:13 +0200
parents d2a0cb1e5596
children
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
c86fd6976264 Fix indentation.
Tom Gottfried <tom@intevation.de>
parents: 1297
diff changeset
41 }, {
1357
b96d98f0cb71 Fix handling of errors and warnings in Ortserstellung form.
Tom Gottfried <tom@intevation.de>
parents: 1352
diff changeset
42 xtype: 'tfield',
1309
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',
1339
1a2cd9bef6d7 messprogramm zuordnung now functional
Maximilian Krambach <mkrambach@intevation.de>
parents: 1337
diff changeset
57 forceSelection: true
1284
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
58 }, {
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
59 xtype: 'verwaltungseinheit',
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
60 labelWidth: 125,
1297
5dfd5798cbcc i18n-wording
Tom Gottfried <tom@intevation.de>
parents: 1295
diff changeset
61 fieldLabel: i18n.getMsg('orte.verwaltungseinheit'),
1289
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
62 forceSelection: true,
1337
7194964183f4 Ortserstellung controller separated from form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1331
diff changeset
63 name: 'gemId'
1284
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
64 }, {
1331
b9f0bb189c25 Use koordinaten art combobox as input field in create ort window.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1323
diff changeset
65 xtype: 'koordinatenart',
1284
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
66 labelWidth: 125,
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
67 fieldLabel: i18n.getMsg('orte.kda'),
1337
7194964183f4 Ortserstellung controller separated from form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1331
diff changeset
68 name: 'kdaId'
1284
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
69 }, {
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
70 xtype: 'numfield',
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.koordx'),
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
73 name: 'koordXExtern',
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
74 allowDecimals: true,
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
75 decimalPrecision: 5,
1337
7194964183f4 Ortserstellung controller separated from form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1331
diff changeset
76 maxLength: 22
1284
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
77 }, {
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
78 xtype: 'numfield',
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
79 labelWidth: 125,
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
80 fieldLabel: i18n.getMsg('orte.koordy'),
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
81 name: 'koordYExtern',
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
82 allowDecimals: true,
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
83 decimalPrecision: 5,
1337
7194964183f4 Ortserstellung controller separated from form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1331
diff changeset
84 maxLength: 22
1284
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
85 }, {
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
86 xtype: 'numfield',
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
87 labelWidth: 125,
1289
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
88 fieldLabel: i18n.getMsg('orte.hoeheLand'),
1284
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
89 name: 'hoeheLand',
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
90 maxLength: 10,
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
91 allowDecimals: true
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
92 }, {
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
93 xtype: 'tfield',
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
94 labelWidth: 125,
1310
9b50bf4c218b Set textfield lengths according to database schema.
Tom Gottfried <tom@intevation.de>
parents: 1309
diff changeset
95 maxLength: 15,
1284
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
96 name: 'kurztext',
1289
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
97 fieldLabel: i18n.getMsg('orte.kurztext')
1284
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
98 },{
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
99 xtype: 'tfield',
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
100 labelWidth: 125,
1310
9b50bf4c218b Set textfield lengths according to database schema.
Tom Gottfried <tom@intevation.de>
parents: 1309
diff changeset
101 maxLength: 100,
1284
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
102 fieldLabel: i18n.getMsg('orte.langtext'),
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
103 name: 'langtext'
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
104 },{
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
105 xtype: 'tfield',
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
106 labelWidth: 125,
1310
9b50bf4c218b Set textfield lengths according to database schema.
Tom Gottfried <tom@intevation.de>
parents: 1309
diff changeset
107 maxLength: 70,
1289
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
108 fieldLabel: i18n.getMsg('orte.berichtstext'),
1284
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
109 name: 'berichtstext'
1289
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
110 }, {
1320
3a3148d50b9c Use new combobox widgets as input elements in create ort window.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1314
diff changeset
111 xtype: 'kta',
1289
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
112 labelWidth: 125,
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
113 maxLength: 100,
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
114 name: 'anlageId',
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
115 fieldLabel: i18n.getMsg('orte.anlageId')
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
116 }, {
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
117 xtype: 'tfield',
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
118 labelWidth: 125,
1310
9b50bf4c218b Set textfield lengths according to database schema.
Tom Gottfried <tom@intevation.de>
parents: 1309
diff changeset
119 maxLength: 1,
1289
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
120 name: 'zone',
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
121 fieldLabel: i18n.getMsg('orte.zone')
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
122 },{
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
123 xtype: 'tfield',
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
124 labelWidth: 125,
1310
9b50bf4c218b Set textfield lengths according to database schema.
Tom Gottfried <tom@intevation.de>
parents: 1309
diff changeset
125 maxLength: 2,
1289
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
126 name: 'sektor',
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
127 fieldLabel: i18n.getMsg('orte.sektor')
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
128 },{
1320
3a3148d50b9c Use new combobox widgets as input elements in create ort window.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1314
diff changeset
129 xtype: 'orttyp',
1289
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
130 labelWidth: 125,
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
131 maxLength: 100,
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
132 name: 'ortTyp',
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
133 fieldLabel: i18n.getMsg('orte.ortTyp')
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
134 },{
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
135 xtype: 'tfield',
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
136 labelWidth: 125,
1310
9b50bf4c218b Set textfield lengths according to database schema.
Tom Gottfried <tom@intevation.de>
parents: 1309
diff changeset
137 maxLength: 10,
1289
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
138 name: 'zustaendigkeit',
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
139 fieldLabel: i18n.getMsg('orte.zustaendigkeit')
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
140 },{
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
141 xtype: 'tfield',
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
142 labelWidth: 125,
1310
9b50bf4c218b Set textfield lengths according to database schema.
Tom Gottfried <tom@intevation.de>
parents: 1309
diff changeset
143 maxLength: 10,
1289
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
144 name: 'mpArt',
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
145 fieldLabel: i18n.getMsg('orte.mpArt')
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
146 },{
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
147 xtype: 'tfield',
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
148 labelWidth: 125,
1310
9b50bf4c218b Set textfield lengths according to database schema.
Tom Gottfried <tom@intevation.de>
parents: 1309
diff changeset
149 maxLength: 10,
1289
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
150 name: 'nutsCode',
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
151 fieldLabel: i18n.getMsg('orte.nutsCode')
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
152 },{
1320
3a3148d50b9c Use new combobox widgets as input elements in create ort window.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1314
diff changeset
153 xtype: 'ortszusatz',
1289
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
154 labelWidth: 125,
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
155 name: 'ozId',
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
156 fieldLabel: i18n.getMsg('orte.ozId')
1284
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
157 }];
1289
bfdc00c24baf Ortszuordnung for messprogramm and probe using same form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1288
diff changeset
158
1284
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
159 this.dockedItems = [{
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
160 xtype: 'toolbar',
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
161 dock: 'bottom',
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
162 border: '0, 1, 1, 1',
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
163 style: {
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
164 borderBottom: '1px solid #b5b8c8 !important',
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
165 borderLeft: '1px solid #b5b8c8 !important',
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
166 borderRight: '1px solid #b5b8c8 !important'
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
167 },
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
168 items: ['->', {
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
169 text: i18n.getMsg('save'),
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
170 action: 'save',
1321
f1e348109ebb Updated style to fit the other windows style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1320
diff changeset
171 qtip: 'Daten speichern',
f1e348109ebb Updated style to fit the other windows style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1320
diff changeset
172 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
173 disabled: true
1279
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff changeset
174 }, {
1321
f1e348109ebb Updated style to fit the other windows style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1320
diff changeset
175 text: i18n.getMsg('discard'),
f1e348109ebb Updated style to fit the other windows style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1320
diff changeset
176 qtip: 'Ă„nderungen verwerfen',
f1e348109ebb Updated style to fit the other windows style.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1320
diff changeset
177 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
178 action: 'revert',
1337
7194964183f4 Ortserstellung controller separated from form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1331
diff changeset
179 disabled: true
1279
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff changeset
180 }]
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff changeset
181 }];
1284
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
182 this.callParent(arguments);
faecbb446a04 Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents: 1279
diff changeset
183 this.getForm().loadRecord(this.record);
1295
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
184 },
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
185
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
186 setMessages: function(errors, warnings) {
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
187 var key;
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
188 var element;
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
189 var content;
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
190 var i18n = Lada.getApplication().bundle;
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
191 if (warnings) {
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
192 for (key in warnings) {
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
193 element = this.down('component[name=' + key + ']');
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
194 if (!element) {
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
195 continue;
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
196 }
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
197 content = warnings[key];
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
198 var warnText = '';
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
199 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
200 warnText += i18n.getMsg(content[i].toString()) + '\n';
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
201 }
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
202 element.showWarnings(warnText);
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
203 }
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 if (errors) {
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
206 for (key in errors) {
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
207 element = this.down('component[name=' + key + ']');
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
208 if (!element) {
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
209 continue;
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
210 }
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
211 content = errors[key];
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
212 var errorText = '';
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
213 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
214 errorText += i18n.getMsg(content[i].toString()) + '\n';
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
215 }
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
216 element.showErrors(errorText);
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
217 }
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 },
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
220
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
221 clearMessages: function() {
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
222 // TODO: this is a stub
171eacf989d8 Show error and warnings in new forms
Maximilian Krambach <mkrambach@intevation.de>
parents: 1294
diff changeset
223 }
1313
c4ac1c09c0b0 another typo
Maximilian Krambach <mkrambach@intevation.de>
parents: 1312
diff changeset
224 });

http://lada.wald.intevation.org