annotate app/view/grid/Orte.js @ 1424:44d28e46cc4b

Use latest server version.
author Tom Gottfried <tom@intevation.de>
date Thu, 06 Apr 2017 12:13:45 +0200
parents 3da3772272a5
children
rev   line source
1004
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
2 * Software engineering by Intevation GmbH
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
3 *
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
4 * This file is Free Software under the GNU GPL (v>=3)
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
6 * the documentation coming with IMIS-Labordaten-Application for details.
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
7 */
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
8
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
9 /**
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
10 * Grid to list Orte Stammdaten
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
11 */
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
12 Ext.define('Lada.view.grid.Orte', {
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
13 extend: 'Ext.grid.Panel',
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
14 alias: 'widget.ortstammdatengrid',
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
15
1308
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
16 requires: [
1317
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
17 'Ext.ux.grid.FiltersFeature',
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
18 'Lada.view.widget.KoordinatenArt',
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
19 'Lada.view.widget.Kta',
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
20 'Lada.view.widget.OrtsZusatz',
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
21 'Lada.view.widget.OrtTyp'
1308
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
22 ],
1004
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
23 // minHeight and deferEmptyText are needed to be able to show the
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
24 // emptyText message.
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
25 minHeight: 110,
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
26 viewConfig: {
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
27 deferEmptyText: false
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
28 },
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
29
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
30 recordId: null,
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
31
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
32 warnings: null,
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
33 errors: null,
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
34 readOnly: true,
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
35 allowDeselect: true,
1050
e0b5e64928c9 Use rowediting plugin for orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1049
diff changeset
36 editableGrid: true,
1308
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
37 features: [],
1004
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
38
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
39 initComponent: function() {
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
40 var i18n = Lada.getApplication().bundle;
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
41 this.emptyText = i18n.getMsg('orte.emptyGrid');
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
42
1050
e0b5e64928c9 Use rowediting plugin for orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1049
diff changeset
43 if (this.editableGrid) {
e0b5e64928c9 Use rowediting plugin for orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1049
diff changeset
44 this.rowEditing = Ext.create('Ext.grid.plugin.RowEditing', {
e0b5e64928c9 Use rowediting plugin for orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1049
diff changeset
45 clicksToMoveEditor: 1,
e0b5e64928c9 Use rowediting plugin for orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1049
diff changeset
46 autoCancel: false,
e0b5e64928c9 Use rowediting plugin for orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1049
diff changeset
47 disabled: false,
e0b5e64928c9 Use rowediting plugin for orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1049
diff changeset
48 pluginId: 'rowedit'
e0b5e64928c9 Use rowediting plugin for orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1049
diff changeset
49 });
e0b5e64928c9 Use rowediting plugin for orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1049
diff changeset
50 this.plugins = [this.rowEditing];
e0b5e64928c9 Use rowediting plugin for orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1049
diff changeset
51 }
1049
1bd4c0709bd6 Working version of selectable 'ort' in map and grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1021
diff changeset
52
1308
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
53 filters = {
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
54 ftype: 'filters',
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
55 // encode and local configuration options defined previously for easier reuse
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
56 encode: false, // json encode the filter query
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
57 local: true, // defaults to false (remote filtering)
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
58
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
59 // Filters are most naturally placed in the column definition, but can also be
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
60 // added here.
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
61 filters: [{
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
62 type: 'boolean',
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
63 dataIndex: 'visible'
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
64 }]
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
65 };
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
66 this.features = [filters];
1369
1cc11bada44e fix rowediting trigger in ortstammdatengrid and proper reloading after save
Maximilian Krambach <mkrambach@intevation.de>
parents: 1366
diff changeset
67 var me = this;
1004
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
68 this.columns = [{
1081
5e9a674d7bb4 Added Icon-column to stammdaten grid showing RW-status.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1050
diff changeset
69 xtype: 'actioncolumn',
5e9a674d7bb4 Added Icon-column to stammdaten grid showing RW-status.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1050
diff changeset
70 text: 'RW',
5e9a674d7bb4 Added Icon-column to stammdaten grid showing RW-status.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1050
diff changeset
71 dataIndex: 'readonly',
5e9a674d7bb4 Added Icon-column to stammdaten grid showing RW-status.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1050
diff changeset
72 sortable: false,
5e9a674d7bb4 Added Icon-column to stammdaten grid showing RW-status.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1050
diff changeset
73 width: 30,
5e9a674d7bb4 Added Icon-column to stammdaten grid showing RW-status.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1050
diff changeset
74 getClass: function (val, meta, rec) {
5e9a674d7bb4 Added Icon-column to stammdaten grid showing RW-status.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1050
diff changeset
75 if (rec.get('readonly') === false) {
5e9a674d7bb4 Added Icon-column to stammdaten grid showing RW-status.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1050
diff changeset
76 return 'edit';
5e9a674d7bb4 Added Icon-column to stammdaten grid showing RW-status.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1050
diff changeset
77 }
5e9a674d7bb4 Added Icon-column to stammdaten grid showing RW-status.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1050
diff changeset
78 return 'noedit';
1369
1cc11bada44e fix rowediting trigger in ortstammdatengrid and proper reloading after save
Maximilian Krambach <mkrambach@intevation.de>
parents: 1366
diff changeset
79 },
1cc11bada44e fix rowediting trigger in ortstammdatengrid and proper reloading after save
Maximilian Krambach <mkrambach@intevation.de>
parents: 1366
diff changeset
80 handler: function(grid, rowIndex, colIndex) {
1cc11bada44e fix rowediting trigger in ortstammdatengrid and proper reloading after save
Maximilian Krambach <mkrambach@intevation.de>
parents: 1366
diff changeset
81 var rec = grid.getStore().getAt(rowIndex);
1cc11bada44e fix rowediting trigger in ortstammdatengrid and proper reloading after save
Maximilian Krambach <mkrambach@intevation.de>
parents: 1366
diff changeset
82 if (rec.get('readonly') === false) {
1cc11bada44e fix rowediting trigger in ortstammdatengrid and proper reloading after save
Maximilian Krambach <mkrambach@intevation.de>
parents: 1366
diff changeset
83 me.rowEditing.startEdit(rowIndex, colIndex);
1cc11bada44e fix rowediting trigger in ortstammdatengrid and proper reloading after save
Maximilian Krambach <mkrambach@intevation.de>
parents: 1366
diff changeset
84 }
1081
5e9a674d7bb4 Added Icon-column to stammdaten grid showing RW-status.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1050
diff changeset
85 }
5e9a674d7bb4 Added Icon-column to stammdaten grid showing RW-status.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1050
diff changeset
86 }, {
1135
6408811c5c41 Fix i18n-String.
Tom Gottfried <tom@intevation.de>
parents: 1130
diff changeset
87 header: i18n.getMsg('netzbetreiberId'),
1130
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
88 renderer: function(value) {
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
89 var r = '';
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
90 if (!value || value === '') {
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
91 r = 'Error';
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
92 }
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
93 var store = Ext.data.StoreManager.get('netzbetreiber');
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
94 var record = store.getById(value);
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
95 if (record) {
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
96 r = record.get('netzbetreiber');
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
97 }
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
98 return r;
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
99 },
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
100 editor: {
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
101 xtype: 'combobox',
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
102 store: Ext.data.StoreManager.get('netzbetreiberFiltered'),
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
103 displayField: 'netzbetreiber',
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
104 valueField: 'id',
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
105 allowBlank: false
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
106 },
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
107 dataIndex: 'netzbetreiberId'
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
108 }, {
1004
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
109 header: i18n.getMsg('orte.ortId'),
1415
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
110 width: 60,
1130
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
111 editor: {
1140
450368f67858 Set requiered fields for stammdaten.ort grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1130
diff changeset
112 xtype: 'textfield',
1254
6321530e640e Make it a bit easier to create a valid new Ort.
Tom Gottfried <tom@intevation.de>
parents: 1141
diff changeset
113 maxLength: 10,
1140
450368f67858 Set requiered fields for stammdaten.ort grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1130
diff changeset
114 allowBlank: false
1130
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
115 },
1308
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
116 filter: {
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
117 type: 'string'
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
118 },
1004
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
119 dataIndex: 'ortId'
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
120 }, {
1415
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
121 header: i18n.getMsg('orte.ortTyp'),
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
122 width: 40,
1308
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
123 filter: {
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
124 type: 'string'
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
125 },
1130
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
126 editor: {
1325
35bbbfbe130c Changed ort grid editors from custom to default comboboxes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1317
diff changeset
127 xtype: 'combobox',
1415
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
128 store: Ext.data.StoreManager.get('orttyp'),
1325
35bbbfbe130c Changed ort grid editors from custom to default comboboxes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1317
diff changeset
129 displayField: 'code',
35bbbfbe130c Changed ort grid editors from custom to default comboboxes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1317
diff changeset
130 valueField: 'id'
1317
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
131 },
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
132 renderer: function(value) {
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
133 if (value === undefined ||
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
134 value === null ||
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
135 value === ''
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
136 ) {
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
137 return '';
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
138 }
1415
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
139 var ot = Ext.data.StoreManager.get('orttyp');
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
140 var record = ot.getById(value);
1317
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
141 return record.get('code');
1130
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
142 },
1415
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
143 dataIndex: 'ortTyp'
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
144 }, {
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
145 header: i18n.getMsg('orte.kurztext'),
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
146 filter: {
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
147 type: 'string'
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
148 },
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
149 editor: {
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
150 xtype: 'textfield',
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
151 maxLength: 15,
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
152 allowBlank: false
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
153 },
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
154 dataIndex: 'kurztext'
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
155 }, {
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
156 header: i18n.getMsg('orte.langtext'),
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
157 width: 200,
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
158 filter: {
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
159 type: 'string'
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
160 },
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
161 editor: {
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
162 xtype: 'textfield',
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
163 maxLength: 100,
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
164 allowBlank: false
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
165 },
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
166 dataIndex: 'langtext'
1004
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
167 }, {
1297
5dfd5798cbcc i18n-wording
Tom Gottfried <tom@intevation.de>
parents: 1296
diff changeset
168 header: i18n.getMsg('orte.verwaltungseinheit'),
1004
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
169 dataIndex: 'gemId',
1415
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
170 width: 200,
1308
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
171 filter: {
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
172 type: 'string'
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
173 },
1004
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
174 renderer: function(value) {
1345
da98f0e7c288 Check for empty values in ort grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1325
diff changeset
175 if (value === undefined ||
da98f0e7c288 Check for empty values in ort grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1325
diff changeset
176 value === null ||
da98f0e7c288 Check for empty values in ort grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1325
diff changeset
177 value === ''
da98f0e7c288 Check for empty values in ort grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1325
diff changeset
178 ) {
1130
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
179 return '';
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
180 }
1004
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
181 var store = Ext.data.StoreManager.get('verwaltungseinheiten');
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
182 var record = store.getById(value);
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
183 return record.get('bezeichnung');
1130
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
184 },
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
185 editor: {
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
186 xtype: 'combobox',
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
187 store: Ext.data.StoreManager.get('verwaltungseinheiten'),
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
188 displayField: 'bezeichnung',
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
189 valueField: 'id',
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
190 allowBlank: false
1004
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
191 }
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
192 }, {
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
193 header: i18n.getMsg('orte.staatId'),
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
194 dataIndex: 'staatId',
1415
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
195 width: 50,
1308
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
196 filter: {
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
197 type: 'string'
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
198 },
1004
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
199 renderer: function(value) {
1345
da98f0e7c288 Check for empty values in ort grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1325
diff changeset
200 if (value === undefined ||
da98f0e7c288 Check for empty values in ort grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1325
diff changeset
201 value === null ||
da98f0e7c288 Check for empty values in ort grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1325
diff changeset
202 value === ''
da98f0e7c288 Check for empty values in ort grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1325
diff changeset
203 ) {
1130
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
204 return '';
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
205 }
1004
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
206 var staaten = Ext.data.StoreManager.get('staaten');
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
207 var record = staaten.getById(value);
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
208 return record.get('staatIso');
1130
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
209 },
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
210 editor: {
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
211 xtype: 'combobox',
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
212 store: Ext.data.StoreManager.get('staaten'),
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
213 displayField: 'staatIso',
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
214 valueField: 'id',
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
215 allowBlank: false
1004
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
216 }
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
217 }, {
1415
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
218 header: i18n.getMsg('orte.nutsCode'),
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
219 editor: {
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
220 xtype: 'textfield',
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
221 maxLength: 10
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
222 },
1308
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
223 filter: {
1317
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
224 type: 'string'
1308
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
225 },
1415
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
226 dataIndex: 'nutsCode'
1004
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
227 }, {
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
228 header: i18n.getMsg('orte.ozId'),
1308
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
229 filter: {
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
230 type: 'string'
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
231 },
1317
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
232 editor: {
1325
35bbbfbe130c Changed ort grid editors from custom to default comboboxes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1317
diff changeset
233 xtype: 'combobox',
35bbbfbe130c Changed ort grid editors from custom to default comboboxes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1317
diff changeset
234 store: Ext.data.StoreManager.get('ortszusatz'),
35bbbfbe130c Changed ort grid editors from custom to default comboboxes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1317
diff changeset
235 displayField: 'ozsId',
35bbbfbe130c Changed ort grid editors from custom to default comboboxes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1317
diff changeset
236 valueField: 'ozsId'
1317
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
237 },
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
238 renderer: function(value) {
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
239 if (value === undefined ||
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
240 value === null ||
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
241 value === ''
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
242 ) {
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
243 return '';
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
244 }
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
245 var oz = Ext.data.StoreManager.get('ortszusatz');
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
246 var record = oz.getById(value);
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
247 return record.get('ozsId');
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
248 },
1004
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
249 dataIndex: 'ozId'
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
250 }, {
1415
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
251 header: i18n.getMsg('orte.anlageId'),
1317
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
252 editor: {
1325
35bbbfbe130c Changed ort grid editors from custom to default comboboxes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1317
diff changeset
253 xtype: 'combobox',
1415
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
254 store: Ext.data.StoreManager.get('ktas'),
1325
35bbbfbe130c Changed ort grid editors from custom to default comboboxes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1317
diff changeset
255 displayField: 'code',
35bbbfbe130c Changed ort grid editors from custom to default comboboxes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1317
diff changeset
256 valueField: 'id'
1317
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
257 },
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
258 renderer: function(value) {
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
259 if (value === undefined ||
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
260 value === null ||
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
261 value === ''
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
262 ) {
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
263 return '';
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
264 }
1415
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
265 var store = Ext.data.StoreManager.get('ktas');
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
266 var record = store.getById(value);
1317
46093e6f45d2 Use the new stammdaten to display and edit ort attributes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1308
diff changeset
267 return record.get('code');
1308
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
268 },
1415
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
269 dataIndex: 'anlageId'
1004
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
270 }, {
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
271 header: i18n.getMsg('orte.mpArt'),
1308
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
272 filter: {
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
273 type: 'string'
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
274 },
1130
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
275 editor: {
1254
6321530e640e Make it a bit easier to create a valid new Ort.
Tom Gottfried <tom@intevation.de>
parents: 1141
diff changeset
276 xtype: 'textfield',
6321530e640e Make it a bit easier to create a valid new Ort.
Tom Gottfried <tom@intevation.de>
parents: 1141
diff changeset
277 maxLength: 10
1130
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
278 },
1004
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
279 dataIndex: 'mpArt'
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
280 }, {
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
281 header: i18n.getMsg('orte.zone'),
1308
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
282 filter: {
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
283 type: 'string'
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
284 },
1130
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
285 editor: {
1254
6321530e640e Make it a bit easier to create a valid new Ort.
Tom Gottfried <tom@intevation.de>
parents: 1141
diff changeset
286 xtype: 'textfield',
6321530e640e Make it a bit easier to create a valid new Ort.
Tom Gottfried <tom@intevation.de>
parents: 1141
diff changeset
287 maxLength: 1
1130
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
288 },
1004
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
289 dataIndex: 'zone'
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
290 }, {
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
291 header: i18n.getMsg('orte.sektor'),
1308
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
292 filter: {
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
293 type: 'string'
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
294 },
1130
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
295 editor: {
1254
6321530e640e Make it a bit easier to create a valid new Ort.
Tom Gottfried <tom@intevation.de>
parents: 1141
diff changeset
296 xtype: 'textfield',
6321530e640e Make it a bit easier to create a valid new Ort.
Tom Gottfried <tom@intevation.de>
parents: 1141
diff changeset
297 maxLength: 2
1130
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
298 },
1004
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
299 dataIndex: 'sektor'
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
300 }, {
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
301 header: i18n.getMsg('orte.zustaendigkeit'),
1308
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
302 filter: {
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
303 type: 'string'
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
304 },
1130
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
305 editor: {
1254
6321530e640e Make it a bit easier to create a valid new Ort.
Tom Gottfried <tom@intevation.de>
parents: 1141
diff changeset
306 xtype: 'textfield',
6321530e640e Make it a bit easier to create a valid new Ort.
Tom Gottfried <tom@intevation.de>
parents: 1141
diff changeset
307 maxLength: 10
1130
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
308 },
1004
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
309 dataIndex: 'zustaendigkeit'
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
310 }, {
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
311 header: i18n.getMsg('orte.berichtstext'),
1308
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
312 filter: {
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
313 type: 'string'
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
314 },
1130
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
315 editor: {
1254
6321530e640e Make it a bit easier to create a valid new Ort.
Tom Gottfried <tom@intevation.de>
parents: 1141
diff changeset
316 xtype: 'textfield',
6321530e640e Make it a bit easier to create a valid new Ort.
Tom Gottfried <tom@intevation.de>
parents: 1141
diff changeset
317 maxLength: 70
1130
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
318 },
1004
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
319 dataIndex: 'berichtstext'
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
320 }, {
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
321 header: i18n.getMsg('orte.unscharf'),
1308
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
322 filter: {
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
323 type: 'string'
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
324 },
1130
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
325 editor: {
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
326 xtype: 'textfield'
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
327 },
1004
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
328 dataIndex: 'unscharf'
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
329 }, {
1415
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
330 header: i18n.getMsg('orte.kdaId'),
1308
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
331 filter: {
1415
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
332 type: 'string'
1308
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
333 },
1130
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
334 editor: {
1415
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
335 xtype: 'combobox',
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
336 store: Ext.data.StoreManager.get('koordinatenart'),
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
337 displayField: 'koordinatenart',
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
338 valueField: 'id'
1130
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
339 },
1415
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
340 renderer: function(value) {
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
341 if (value === undefined ||
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
342 value === null ||
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
343 value === ''
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
344 ) {
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
345 return '';
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
346 }
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
347 var kda = Ext.data.StoreManager.get('koordinatenart');
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
348 var record = kda.getById(value);
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
349 return record.get('koordinatenart');
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
350 },
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
351 dataIndex: 'kdaId'
1004
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
352 }, {
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
353 header: i18n.getMsg('orte.koordXExtern'),
1308
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
354 filter: {
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
355 type: 'string'
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
356 },
1130
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
357 editor: {
1140
450368f67858 Set requiered fields for stammdaten.ort grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1130
diff changeset
358 xtype: 'textfield',
1254
6321530e640e Make it a bit easier to create a valid new Ort.
Tom Gottfried <tom@intevation.de>
parents: 1141
diff changeset
359 maxLength: 22,
1140
450368f67858 Set requiered fields for stammdaten.ort grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1130
diff changeset
360 allowBlank: false
1130
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
361 },
1004
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
362 dataIndex: 'koordXExtern'
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
363 }, {
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
364 header: i18n.getMsg('orte.koordYExtern'),
1308
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
365 filter: {
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
366 type: 'string'
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
367 },
1130
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
368 editor: {
1140
450368f67858 Set requiered fields for stammdaten.ort grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1130
diff changeset
369 xtype: 'textfield',
1254
6321530e640e Make it a bit easier to create a valid new Ort.
Tom Gottfried <tom@intevation.de>
parents: 1141
diff changeset
370 maxLength: 22,
1140
450368f67858 Set requiered fields for stammdaten.ort grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1130
diff changeset
371 allowBlank: false
1130
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
372 },
1004
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
373 dataIndex: 'koordYExtern'
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
374 }, {
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
375 header: i18n.getMsg('orte.longitude'),
1308
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
376 filter: {
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
377 type: 'numeric'
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
378 },
1130
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
379 editor: {
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
380 xtype: 'numberfield'
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
381 },
1004
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
382 dataIndex: 'longitude'
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
383 }, {
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
384 header: i18n.getMsg('orte.latitude'),
1308
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
385 filter: {
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
386 type: 'numeric'
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
387 },
1130
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
388 editor: {
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
389 xtype: 'numberfield'
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
390 },
1004
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
391 dataIndex: 'latitude'
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
392 }, {
1415
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
393 header: i18n.getMsg('orte.hoeheLand'),
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
394 filter: {
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
395 type: 'numeric'
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
396 },
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
397 editor: {
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
398 xtype: 'numberfield'
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
399 },
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
400 dataIndex: 'hoeheLand'
3da3772272a5 change column order in ort grid
Michael Stanko <mstanko@bfs.de>
parents: 1369
diff changeset
401 }, {
1137
53d108efab0b Format letzteAenderung in Orte grid.
Tom Gottfried <tom@intevation.de>
parents: 1136
diff changeset
402 header: i18n.getMsg('letzteAenderung'),
1308
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
403 filter: {
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
404 type: 'date'
6075731bc4f1 Added column filter to orte grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1297
diff changeset
405 },
1137
53d108efab0b Format letzteAenderung in Orte grid.
Tom Gottfried <tom@intevation.de>
parents: 1136
diff changeset
406 xtype: 'datecolumn',
53d108efab0b Format letzteAenderung in Orte grid.
Tom Gottfried <tom@intevation.de>
parents: 1136
diff changeset
407 format: 'd.m.Y H:i',
1004
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
408 dataIndex: 'letzteAenderung'
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
409 }];
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
410 this.callParent(arguments);
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
411 },
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
412
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
413 /**
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
414 * This sets the Store of this Grid
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
415 */
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
416 setStore: function(store){
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
417 var i18n = Lada.getApplication().bundle;
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
418
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
419 if (store) {
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
420 this.reconfigure(store);
1021
1df6b6210b42 WIP First Version of a New Window/Panel combination to edit Ortszuordnungen and Orte
Dustin Demuth <dustin@intevation.de>
parents: 1011
diff changeset
421
1df6b6210b42 WIP First Version of a New Window/Panel combination to edit Ortszuordnungen and Orte
Dustin Demuth <dustin@intevation.de>
parents: 1011
diff changeset
422 var ptbar = this.down('pagingtoolbar');
1df6b6210b42 WIP First Version of a New Window/Panel combination to edit Ortszuordnungen and Orte
Dustin Demuth <dustin@intevation.de>
parents: 1011
diff changeset
423 if (ptbar) {
1df6b6210b42 WIP First Version of a New Window/Panel combination to edit Ortszuordnungen and Orte
Dustin Demuth <dustin@intevation.de>
parents: 1011
diff changeset
424 this.removeDocked(ptbar);
1df6b6210b42 WIP First Version of a New Window/Panel combination to edit Ortszuordnungen and Orte
Dustin Demuth <dustin@intevation.de>
parents: 1011
diff changeset
425 }
1df6b6210b42 WIP First Version of a New Window/Panel combination to edit Ortszuordnungen and Orte
Dustin Demuth <dustin@intevation.de>
parents: 1011
diff changeset
426
1df6b6210b42 WIP First Version of a New Window/Panel combination to edit Ortszuordnungen and Orte
Dustin Demuth <dustin@intevation.de>
parents: 1011
diff changeset
427 if (store.pageSize > 0) {
1df6b6210b42 WIP First Version of a New Window/Panel combination to edit Ortszuordnungen and Orte
Dustin Demuth <dustin@intevation.de>
parents: 1011
diff changeset
428 this.addDocked([{
1df6b6210b42 WIP First Version of a New Window/Panel combination to edit Ortszuordnungen and Orte
Dustin Demuth <dustin@intevation.de>
parents: 1011
diff changeset
429 xtype: 'pagingtoolbar',
1df6b6210b42 WIP First Version of a New Window/Panel combination to edit Ortszuordnungen and Orte
Dustin Demuth <dustin@intevation.de>
parents: 1011
diff changeset
430 dock: 'bottom',
1df6b6210b42 WIP First Version of a New Window/Panel combination to edit Ortszuordnungen and Orte
Dustin Demuth <dustin@intevation.de>
parents: 1011
diff changeset
431 store: store,
1df6b6210b42 WIP First Version of a New Window/Panel combination to edit Ortszuordnungen and Orte
Dustin Demuth <dustin@intevation.de>
parents: 1011
diff changeset
432 displayInfo: true
1df6b6210b42 WIP First Version of a New Window/Panel combination to edit Ortszuordnungen and Orte
Dustin Demuth <dustin@intevation.de>
parents: 1011
diff changeset
433 }]);
1df6b6210b42 WIP First Version of a New Window/Panel combination to edit Ortszuordnungen and Orte
Dustin Demuth <dustin@intevation.de>
parents: 1011
diff changeset
434 }
1004
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
435 }
1130
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
436
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
437 if (Ext.Array.contains(Lada.funktionen, 4)) {
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
438 var panel = this.up('ortpanel');
1366
993e542796fd Fixed type error in ortszuordnung when user has 'funktion = 4'
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1345
diff changeset
439 // We are not in stammdaten editor.
993e542796fd Fixed type error in ortszuordnung when user has 'funktion = 4'
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1345
diff changeset
440 if (!panel) {
993e542796fd Fixed type error in ortszuordnung when user has 'funktion = 4'
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1345
diff changeset
441 return;
993e542796fd Fixed type error in ortszuordnung when user has 'funktion = 4'
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1345
diff changeset
442 }
1130
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
443 panel.down('button[action=add]').enable();
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
444 panel.down('button[action=addMap]').enable();
e4952906634d Implemented insert, edit and delete for stammdaten.ort.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
445 }
1049
1bd4c0709bd6 Working version of selectable 'ort' in map and grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1021
diff changeset
446 },
1bd4c0709bd6 Working version of selectable 'ort' in map and grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1021
diff changeset
447
1bd4c0709bd6 Working version of selectable 'ort' in map and grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1021
diff changeset
448 selectOrt: function(map, feature) {
1bd4c0709bd6 Working version of selectable 'ort' in map and grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1021
diff changeset
449 var id = feature[0].data.id;
1bd4c0709bd6 Working version of selectable 'ort' in map and grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1021
diff changeset
450 var record = this.store.getById(id);
1bd4c0709bd6 Working version of selectable 'ort' in map and grid.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1021
diff changeset
451 this.getSelectionModel().select(record);
1293
16a80ca16732 map feature visibility, selection and grid layout
Maximilian Krambach <mkrambach@intevation.de>
parents: 1254
diff changeset
452 var win = this.up('ortszuordnungwindow');
16a80ca16732 map feature visibility, selection and grid layout
Maximilian Krambach <mkrambach@intevation.de>
parents: 1254
diff changeset
453 if (win){
16a80ca16732 map feature visibility, selection and grid layout
Maximilian Krambach <mkrambach@intevation.de>
parents: 1254
diff changeset
454 win.down('ortszuordnungform').setOrt(null, record);
16a80ca16732 map feature visibility, selection and grid layout
Maximilian Krambach <mkrambach@intevation.de>
parents: 1254
diff changeset
455 }
1004
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
456 }
9ac03f461ab4 Introduced Orte into Stammdatengrids, Added Ortszuordnung. THIS COMMIT IS WORK IN PROGRESS, Proben will NOT work after this commit. Orte can not be edited.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
457 });

http://lada.wald.intevation.org