Mercurial > lada > lada-client
annotate app/view/form/Ortserstellung.js @ 1279:291df0037835
Ortszuordnung window: create, change and display (wip)
author | Maximilian Krambach <mkrambach@intevation.de> |
---|---|
date | Wed, 18 Jan 2017 11:41:50 +0100 |
parents | |
children | faecbb446a04 |
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 * TODO: layout, saving, model |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
12 */ |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
13 Ext.define('Lada.view.form.Ortserstellung', { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
14 extend: 'Ext.form.Panel', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
15 alias: 'widget.ortserstellungsform', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
16 |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
17 model: 'Lada.model.Ortszuordnung',//TODO correct model needed |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
18 requires: [ |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
19 'Lada.view.widget.Verwaltungseinheit', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
20 'Lada.view.widget.Staat' |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
21 ], |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
22 |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
23 width: 900, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
24 height: 700, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
25 bodyStyle: {background: '#fff'}, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
26 layout: 'vbox', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
27 scrollable: true, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
28 margin: '5, 5, 0, 5', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
29 border: 0, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
30 floating: true, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
31 closable: true, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
32 |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
33 /** |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
34 * Preset values |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
35 */ |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
36 presets: null, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
37 |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
38 initComponent: function() { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
39 var i18n = Lada.getApplication().bundle; |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
40 var me = this; |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
41 this.items = [{ //TODO: layout and input types |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
42 title: 'Neuen Messpunkt anlegen', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
43 dockedItems : [{ |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
44 xtype: 'toolbar', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
45 dock: 'bottom', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
46 border: '0, 1, 1, 1', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
47 style: { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
48 borderBottom: '1px solid #b5b8c8 !important', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
49 borderLeft: '1px solid #b5b8c8 !important', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
50 borderRight: '1px solid #b5b8c8 !important' |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
51 }, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
52 items: ['->', { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
53 text: i18n.getMsg('save'), |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
54 disabled: true, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
55 action: 'save', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
56 handler: me.saveOrt |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
57 }, { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
58 text: i18n.getMsg('close'), |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
59 action: 'close', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
60 handler: function() { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
61 me.close(); |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
62 } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
63 }] |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
64 }], |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
65 items : [{ |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
66 xtype: 'netzbetreiber', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
67 editable: false, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
68 readOnly: true, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
69 submitValue: true, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
70 fieldLabel: i18n.getMsg('netzbetreiberId'), |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
71 margin : '0, 5, 5, 5', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
72 labelWidth: 80, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
73 // value: XXX |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
74 // TODO: get netzbetreiber of current user |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
75 }, { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
76 xtype: 'checkbox', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
77 name: 'aktiv', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
78 fieldLabel: 'aktiv:', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
79 value: me.presets.aktiv? me.presets.aktiv:null |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
80 }, { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
81 xtype: 'displayfield', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
82 value: 'D', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
83 labelWidth: 125, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
84 maxLength: 1, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
85 name: 'messpunktart', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
86 fieldLabel: 'Art des Messpunktes:' |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
87 },{ |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
88 xtype: 'displayfield', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
89 labelWidth: 125, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
90 maxLength: 100, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
91 name: 'OrtID', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
92 fieldLabel: 'Ort/Messpunkt-ID:', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
93 // TODO: needed? We can't set it, and it is not yet given |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
94 // for a new messpunkt |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
95 editable: false |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
96 }, { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
97 xtype: 'staat', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
98 labelWidth: 100, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
99 fieldLabel: i18n.getMsg('staat'), |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
100 name: 'staatId', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
101 width: 160, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
102 listeners: { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
103 change: { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
104 fn: function() { me.checkCommitEnabled() } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
105 } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
106 } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
107 }, { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
108 xtype: 'verwaltungseinheit', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
109 labelWidth: 125, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
110 fieldLabel: i18n.getMsg('orte.gemeinde'), |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
111 name: 'gemeinde', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
112 listeners: { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
113 change: { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
114 fn: function() { me.checkCommitEnabled() } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
115 } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
116 } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
117 }, { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
118 xtype: 'displayfield', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
119 labelWidth: 125, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
120 fieldLabel: i18n.getMsg('orte.kda'), |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
121 name: 'kdaId', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
122 listeners: { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
123 change: { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
124 fn: function() { me.checkCommitEnabled() } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
125 } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
126 } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
127 }, { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
128 xtype: 'displayfield', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
129 labelWidth: 125, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
130 fieldLabel: i18n.getMsg('orte.koordx'), |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
131 name: 'koordXExtern', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
132 listeners: { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
133 change: { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
134 fn: function() { me.checkCommitEnabled() } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
135 } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
136 } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
137 }, { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
138 xtype: 'displayfield', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
139 labelWidth: 125, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
140 fieldLabel: i18n.getMsg('orte.koordy'), |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
141 name: 'koordYExtern', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
142 listeners: { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
143 change: { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
144 fn: function() { me.checkCommitEnabled() } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
145 } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
146 } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
147 }, { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
148 xtype: 'displayfield', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
149 labelWidth: 125, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
150 fieldLabel: 'Höhe:', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
151 name: 'hoehe', //TODO: hohe_ueber_NN? |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
152 }, { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
153 xtype: 'displayfield', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
154 labelWidth: 125, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
155 maxLength: 100, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
156 name: 'kurztext', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
157 fieldLabel: 'Kurztext:' |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
158 },{ |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
159 xtype: 'displayfield', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
160 labelWidth: 125, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
161 fieldLabel: i18n.getMsg('orte.langtext'), |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
162 name: 'langtext' |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
163 },{ |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
164 xtype: 'displayfield', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
165 labelWidth: 125, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
166 fieldLabel: 'Berichtstext:', |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
167 name: 'berichtstext' |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
168 }] |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
169 }]; |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
170 //TODO: |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
171 // 'Anlage:'? |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
172 // zone |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
173 // sektor |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
174 // zustaendigkeit |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
175 // Messregime (mpArt) |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
176 // 'Prog.-Punkt:', ? |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
177 // nutsCode |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
178 // Ortszusatz-ID (ozId) |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
179 me.callParent(arguments); |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
180 this.prefillForm(); |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
181 }, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
182 |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
183 /** |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
184 * checks Messpunktart and if the Messpunkt can be committed. |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
185 * Disables the save button if false |
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 // TODO messpunktart is not yet finally defined |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
188 checkCommitEnabled: function() { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
189 var savebutton = this.down('toolbar').down('button[action=save]'); |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
190 var form = this.getForm(); |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
191 if (this.checkCoordinates()) { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
192 form.findField('messpunktart').setValue('D'); |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
193 savebutton.setDisabled(false); |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
194 } else if (form.findField('gemeinde').getValue()) { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
195 form.findField('messpunktart').setValue('V'); |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
196 savebutton.setDisabled(false); |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
197 } else if (form.findField('staatId')) { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
198 form.findField('messpunktart').setValue('S'); |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
199 savebutton.setDisabled(false); |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
200 } else { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
201 form.findField('messpunktart').setValue('D'); |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
202 savebutton.setDisabled(true); |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
203 } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
204 }, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
205 |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
206 /** |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
207 * Validates the coordinate fields kdaId, koordXExtern, koordYExtern |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
208 */ |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
209 checkCoordinates: function() { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
210 var x = this.getForm().findField('koordXExtern').getValue(); |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
211 var y = this.getForm().findField('koordYExtern').getValue(); |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
212 var kda = this.getForm().findField('kdaId').getValue(); |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
213 if (x && y && kda) { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
214 if (kda === 4){ |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
215 if (x > -180 && x < 180 |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
216 && y > -90 && y < 90) { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
217 return true; |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
218 } else { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
219 // TODO: WGS84 (degrees- decimal), coordinates invalid |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
220 return false; |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
221 } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
222 } else if (kda === 5){ |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
223 if (x >= 1000000 && x < 61000000 && |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
224 y > -10000000 && y < 10000000) { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
225 return true; |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
226 } else { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
227 // TODO: UTM, coordinates invalid |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
228 return false; |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
229 } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
230 } else { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
231 // TODO KDA not supported |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
232 return false; |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
233 } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
234 } else { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
235 // TODO: not all fields filled in |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
236 return false; |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
237 } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
238 }, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
239 |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
240 saveOrt: function(){ |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
241 // TODO not yet implemented |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
242 alert("save!"); |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
243 }, |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
244 |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
245 /** |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
246 * Fill the form with values passed by presets. |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
247 // TODO Find a shorter way of setting all these |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
248 */ |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
249 prefillForm: function() { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
250 var form = this.getForm(); |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
251 if (this.presets.aktiv) { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
252 form.findField('aktiv').setValue(this.presets.aktiv); |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
253 } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
254 if (this.presets.staatId) { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
255 // TODO: staatID != staatISO |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
256 form.findField('staatId').setValue(me.presets.staatId); |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
257 } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
258 if (this.presets.gemeinde) { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
259 // TODO: ortId != gemeinde |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
260 form.findField('gemeinde').setValue(this.presets.gemeinde); |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
261 } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
262 if (this.presets.kdaId) { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
263 form.findField('kdaId').setValue(this.presets.kdaId); |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
264 } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
265 if (this.presets.koordXExtern) { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
266 form.findField('koordXExtern').setValue(this.presets.koordXExtern); |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
267 } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
268 if (this.presets.koordYExtern) { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
269 form.findField('koordYExtern').setValue(this.presets.koordYExtern); |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
270 } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
271 if (this.presets.hoehe) { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
272 // TODO hohe_ueber_NN? |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
273 form.findField('hoehe').setValue(me.presets.hoehe); |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
274 } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
275 if (this.presets.kurztext) { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
276 form.findField('kurztext').setValue(this.presets.kurztext); |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
277 } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
278 if (this.presets.langtext) { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
279 form.findField('langtext').setValue(this.presets.langtext); |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
280 } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
281 if (this.presets.berichtstext) { |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
282 form.findField('berichtstext').setValue(this.presets.berichtstext); |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
283 } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
284 } |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
285 }); |
291df0037835
Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
286 |