annotate app/view/grid/Probenehmer.js @ 1129:6f5549e50607

add messung tab to FilterManagement
author Michael Stanko <mstanko@bfs.de>
date Tue, 24 May 2016 15:55:05 +0200
parents 421db8840f49
children 8b35db6b2306
rev   line source
975
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
2 * Software engineering by Intevation GmbH
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
3 *
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
4 * This file is Free Software under the GNU GPL (v>=3)
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
6 * the documentation coming with IMIS-Labordaten-Application for details.
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
7 */
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
8
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
9 /**
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
10 * Grid to list Probenehmer Stammdaten
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
11 */
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
12 Ext.define('Lada.view.grid.Probenehmer', {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
13 extend: 'Ext.grid.Panel',
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
14 alias: 'widget.probenehmergrid',
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
15
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
16 // minHeight and deferEmptyText are needed to be able to show the
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
17 // emptyText message.
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
18 minHeight: 110,
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
19 viewConfig: {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
20 deferEmptyText: false
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
21 },
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
22
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
23 warnings: null,
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
24 errors: null,
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
25 readOnly: true,
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
26 allowDeselect: true,
981
2c394e72ba41 Use the lada-server for stammdatenqueries.
Dustin Demuth <dustin@intevation.de>
parents: 975
diff changeset
27 border: false,
975
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
28
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
29 initComponent: function() {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
30 var i18n = Lada.getApplication().bundle;
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
31 this.emptyText = i18n.getMsg('pn.emptyGrid');
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
32
1039
77e22ad5cc84 Use user 'funktionen' attribute to set read/write status for stammdaten.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 984
diff changeset
33 if (Ext.Array.contains(Lada.funktionen, 4)) {
77e22ad5cc84 Use user 'funktionen' attribute to set read/write status for stammdaten.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 984
diff changeset
34 this.rowEditing = Ext.create('Ext.grid.plugin.RowEditing', {
77e22ad5cc84 Use user 'funktionen' attribute to set read/write status for stammdaten.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 984
diff changeset
35 clicksToMoveEditor: 1,
77e22ad5cc84 Use user 'funktionen' attribute to set read/write status for stammdaten.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 984
diff changeset
36 autoCancel: false,
1060
070255c0db28 Do not show a tooltip for empty data fields.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1058
diff changeset
37 errorSummary: false,
1039
77e22ad5cc84 Use user 'funktionen' attribute to set read/write status for stammdaten.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 984
diff changeset
38 disabled: false,
77e22ad5cc84 Use user 'funktionen' attribute to set read/write status for stammdaten.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 984
diff changeset
39 pluginId: 'rowedit'
77e22ad5cc84 Use user 'funktionen' attribute to set read/write status for stammdaten.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 984
diff changeset
40 });
77e22ad5cc84 Use user 'funktionen' attribute to set read/write status for stammdaten.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 984
diff changeset
41 this.plugins = [this.rowEditing];
77e22ad5cc84 Use user 'funktionen' attribute to set read/write status for stammdaten.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 984
diff changeset
42 }
982
d8b0b23047b1 Added GridEditor Plugin
Dustin Demuth <dustin@intevation.de>
parents: 981
diff changeset
43
975
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
44 // TODO: Which docked Items are required?
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
45 this.dockedItems = [{
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
46 xtype: 'toolbar',
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
47 dock: 'top',
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
48 items: [{
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
49 xtype: 'tbtext',
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
50 id: 'tbtitle',
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
51 text: i18n.getMsg('pn.gridTitle')
984
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
52 },
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
53 '->',
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
54 {
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
55 text: i18n.getMsg('pn.button.add'),
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
56 icon: 'resources/img/list-add.png',
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
57 action: 'add',
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
58 disabled: true // disabled on startup, will be enabled by setStore
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
59 }, {
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
60 text: i18n.getMsg('pn.button.delete'),
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
61 icon: 'resources/img/list-remove.png',
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
62 action: 'delete',
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
63 disabled: true // disabled on startup, will be enabled by controller if necessary
975
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
64 }]
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
65 }];
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
66 this.columns = [{
1081
5e9a674d7bb4 Added Icon-column to stammdaten grid showing RW-status.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1075
diff changeset
67 xtype: 'actioncolumn',
5e9a674d7bb4 Added Icon-column to stammdaten grid showing RW-status.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1075
diff changeset
68 text: 'RW',
5e9a674d7bb4 Added Icon-column to stammdaten grid showing RW-status.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1075
diff changeset
69 dataIndex: 'readonly',
5e9a674d7bb4 Added Icon-column to stammdaten grid showing RW-status.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1075
diff changeset
70 sortable: false,
5e9a674d7bb4 Added Icon-column to stammdaten grid showing RW-status.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1075
diff changeset
71 width: 30,
5e9a674d7bb4 Added Icon-column to stammdaten grid showing RW-status.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1075
diff changeset
72 getClass: function (val, meta, rec) {
5e9a674d7bb4 Added Icon-column to stammdaten grid showing RW-status.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1075
diff changeset
73 console.log(rec.get('statusEdit'));
5e9a674d7bb4 Added Icon-column to stammdaten grid showing RW-status.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1075
diff changeset
74 if (rec.get('readonly') === false) {
5e9a674d7bb4 Added Icon-column to stammdaten grid showing RW-status.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1075
diff changeset
75 return 'edit';
5e9a674d7bb4 Added Icon-column to stammdaten grid showing RW-status.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1075
diff changeset
76 }
5e9a674d7bb4 Added Icon-column to stammdaten grid showing RW-status.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1075
diff changeset
77 return 'noedit';
5e9a674d7bb4 Added Icon-column to stammdaten grid showing RW-status.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1075
diff changeset
78 },
5e9a674d7bb4 Added Icon-column to stammdaten grid showing RW-status.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1075
diff changeset
79 handler: function(grid, rowIndex, colIndex) {
5e9a674d7bb4 Added Icon-column to stammdaten grid showing RW-status.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1075
diff changeset
80 var rec = grid.getStore().getAt(rowIndex);
5e9a674d7bb4 Added Icon-column to stammdaten grid showing RW-status.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1075
diff changeset
81 grid.fireEvent('itemdblclick', grid, rec);
5e9a674d7bb4 Added Icon-column to stammdaten grid showing RW-status.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1075
diff changeset
82 }
5e9a674d7bb4 Added Icon-column to stammdaten grid showing RW-status.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1075
diff changeset
83 }, {
975
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
84 header: i18n.getMsg('netzbetreiberId'),
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
85 dataIndex: 'netzbetreiberId',
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
86 renderer: function(value) {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
87 var r = '';
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
88 if (!value || value === '') {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
89 r = 'Error';
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
90 }
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
91 var store = Ext.data.StoreManager.get('netzbetreiber');
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
92 var record = store.getById(value);
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
93 if (record) {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
94 r = record.get('netzbetreiber');
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
95 }
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
96 return r;
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
97 },
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
98 editor: {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
99 xtype: 'combobox',
1075
d23427c68285 Use filtered set of netzbetreiber for stammdatengrids.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1074
diff changeset
100 store: Ext.data.StoreManager.get('netzbetreiberFiltered'),
975
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
101 displayField: 'netzbetreiber',
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
102 valueField: 'id',
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
103 allowBlank: false
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
104 }
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
105 }, {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
106 header: i18n.getMsg('bearbeiter'),
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
107 dataIndex: 'bearbeiter',
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
108 editor: {
1098
9bfbcad128a3 Set and enforce max text length for stammdaten fields.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1094
diff changeset
109 xtype: 'textfield',
9bfbcad128a3 Set and enforce max text length for stammdaten fields.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1094
diff changeset
110 maxLength: 25,
9bfbcad128a3 Set and enforce max text length for stammdaten fields.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1094
diff changeset
111 enforceMaxLength: true
975
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
112 }
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
113 }, {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
114 header: i18n.getMsg('prnId'),
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
115 dataIndex: 'prnId',
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
116 editor: {
1061
4db4902d11c8 Fixed typo.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1060
diff changeset
117 allowBlank: false,
1094
677fc5e62055 Set and enforce max text length for stammdaten id values.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
118 maxLength: 9,
677fc5e62055 Set and enforce max text length for stammdaten id values.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1081
diff changeset
119 enforceMaxLength: true,
1058
ce1928e6e828 Updated editors in stammdaten grids.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1051
diff changeset
120 xtype: 'textfield'
975
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
121 }
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
122 }, {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
123 header: i18n.getMsg('bemerkung'),
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
124 dataIndex: 'bemerkung',
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
125 editor: {
984
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
126 allowBlank: false,
1098
9bfbcad128a3 Set and enforce max text length for stammdaten fields.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1094
diff changeset
127 xtype: 'textfield',
9bfbcad128a3 Set and enforce max text length for stammdaten fields.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1094
diff changeset
128 maxLength: 60,
9bfbcad128a3 Set and enforce max text length for stammdaten fields.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1094
diff changeset
129 enforceMaxLength: true
975
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
130 }
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
131 }, {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
132 header: i18n.getMsg('kurzBezeichnung'),
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
133 dataIndex: 'kurzBezeichnung',
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
134 editor: {
984
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
135 allowBlank: false,
1098
9bfbcad128a3 Set and enforce max text length for stammdaten fields.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1094
diff changeset
136 xtype: 'textfield',
9bfbcad128a3 Set and enforce max text length for stammdaten fields.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1094
diff changeset
137 maxLength: 10,
9bfbcad128a3 Set and enforce max text length for stammdaten fields.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1094
diff changeset
138 enforceMaxLength: true
975
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
139 }
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
140 }, {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
141 header: i18n.getMsg('ort'),
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
142 dataIndex: 'ort',
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
143 editor: {
1098
9bfbcad128a3 Set and enforce max text length for stammdaten fields.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1094
diff changeset
144 xtype: 'textfield',
9bfbcad128a3 Set and enforce max text length for stammdaten fields.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1094
diff changeset
145 maxLength: 20,
9bfbcad128a3 Set and enforce max text length for stammdaten fields.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1094
diff changeset
146 enforceMaxLength: true
975
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
147 }
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
148 }, {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
149 header: i18n.getMsg('plz'),
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
150 dataIndex: 'plz',
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
151 editor: {
1101
421db8840f49 Adapt PLZ field to data model.
Tom Gottfried <tom@intevation.de>
parents: 1098
diff changeset
152 xtype: 'textfield',
421db8840f49 Adapt PLZ field to data model.
Tom Gottfried <tom@intevation.de>
parents: 1098
diff changeset
153 maxLength: 5,
421db8840f49 Adapt PLZ field to data model.
Tom Gottfried <tom@intevation.de>
parents: 1098
diff changeset
154 enforceMaxLength: true
975
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
155 }
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
156 }, {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
157 header: i18n.getMsg('strasse'),
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
158 dataIndex: 'strasse',
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
159 editor: {
1098
9bfbcad128a3 Set and enforce max text length for stammdaten fields.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1094
diff changeset
160 xtype: 'textfield',
9bfbcad128a3 Set and enforce max text length for stammdaten fields.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1094
diff changeset
161 maxLength: 30,
9bfbcad128a3 Set and enforce max text length for stammdaten fields.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1094
diff changeset
162 enforceMaxLength: true
975
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
163 }
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
164 }, {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
165 header: i18n.getMsg('telefon'),
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
166 dataIndex: 'telefon',
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
167 editor: {
1098
9bfbcad128a3 Set and enforce max text length for stammdaten fields.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1094
diff changeset
168 xtype: 'textfield',
9bfbcad128a3 Set and enforce max text length for stammdaten fields.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1094
diff changeset
169 maxLength: 20,
9bfbcad128a3 Set and enforce max text length for stammdaten fields.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1094
diff changeset
170 enforceMaxLength: true
975
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
171 }
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
172 }, {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
173 header: i18n.getMsg('tp'),
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
174 dataIndex: 'tp',
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
175 editor: {
1098
9bfbcad128a3 Set and enforce max text length for stammdaten fields.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1094
diff changeset
176 xtype: 'textfield',
9bfbcad128a3 Set and enforce max text length for stammdaten fields.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1094
diff changeset
177 maxLength: 3,
9bfbcad128a3 Set and enforce max text length for stammdaten fields.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1094
diff changeset
178 enforceMaxLength: true
975
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
179 }
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
180 }, {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
181 header: i18n.getMsg('typ'),
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
182 dataIndex: 'typ',
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
183 editor: {
1098
9bfbcad128a3 Set and enforce max text length for stammdaten fields.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1094
diff changeset
184 xtype: 'textfield',
9bfbcad128a3 Set and enforce max text length for stammdaten fields.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1094
diff changeset
185 maxLength: 1,
9bfbcad128a3 Set and enforce max text length for stammdaten fields.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1094
diff changeset
186 enforceMaxLength: true
975
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
187 }
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
188 }, {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
189 header: i18n.getMsg('letzteAenderung'),
1045
d859fbfc8a53 Set date format for stammdaten grids.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1039
diff changeset
190 xtype: 'datecolumn',
d859fbfc8a53 Set date format for stammdaten grids.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1039
diff changeset
191 format: 'd.m.Y H:i',
975
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
192 dataIndex: 'letzteAenderung'
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
193 }];
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
194 this.listeners = {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
195 select: {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
196 fn: this.activateRemoveButton,
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
197 scope: this
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
198 },
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
199 deselect: {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
200 fn: this.deactivateRemoveButton,
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
201 scope: this
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
202 }
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
203 };
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
204 this.callParent(arguments);
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
205 },
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
206
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
207 /**
981
2c394e72ba41 Use the lada-server for stammdatenqueries.
Dustin Demuth <dustin@intevation.de>
parents: 975
diff changeset
208 * This sets the Store of this Grid
975
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
209 */
1039
77e22ad5cc84 Use user 'funktionen' attribute to set read/write status for stammdaten.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 984
diff changeset
210 setStore: function(store) {
981
2c394e72ba41 Use the lada-server for stammdatenqueries.
Dustin Demuth <dustin@intevation.de>
parents: 975
diff changeset
211 var i18n = Lada.getApplication().bundle;
1039
77e22ad5cc84 Use user 'funktionen' attribute to set read/write status for stammdaten.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 984
diff changeset
212 if (Ext.Array.contains(Lada.funktionen, 4)) {
77e22ad5cc84 Use user 'funktionen' attribute to set read/write status for stammdaten.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 984
diff changeset
213 this.down('button[action=add]').enable();
77e22ad5cc84 Use user 'funktionen' attribute to set read/write status for stammdaten.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 984
diff changeset
214 }
981
2c394e72ba41 Use the lada-server for stammdatenqueries.
Dustin Demuth <dustin@intevation.de>
parents: 975
diff changeset
215
984
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
216 if (store) {
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
217 this.removeDocked(Ext.getCmp('ptbar'), true);
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
218 this.reconfigure(store);
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
219 this.addDocked([{
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
220 xtype: 'pagingtoolbar',
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
221 id: 'ptbar',
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
222 dock: 'bottom',
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
223 store: store,
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
224 displayInfo: true
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
225 }]);
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
226 }
975
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
227 }
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
228 });
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
229

http://lada.wald.intevation.org