annotate app/view/grid/DatensatzErzeuger.js @ 1075:d23427c68285

Use filtered set of netzbetreiber for stammdatengrids.
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 07 Apr 2016 14:49:24 +0200
parents ca204e91012f
children 5e9a674d7bb4
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 DatensatzErzeuger 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.DatensatzErzeuger', {
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.datensatzerzeugergrid',
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('de.emptyGrid');
1039
77e22ad5cc84 Use user 'funktionen' attribute to set read/write status for stammdaten.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 984
diff changeset
32 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
33 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
34 clicksToMoveEditor: 1,
77e22ad5cc84 Use user 'funktionen' attribute to set read/write status for stammdaten.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 984
diff changeset
35 autoCancel: false,
1060
070255c0db28 Do not show a tooltip for empty data fields.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1058
diff changeset
36 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
37 disabled: false,
77e22ad5cc84 Use user 'funktionen' attribute to set read/write status for stammdaten.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 984
diff changeset
38 pluginId: 'rowedit'
77e22ad5cc84 Use user 'funktionen' attribute to set read/write status for stammdaten.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 984
diff changeset
39 });
77e22ad5cc84 Use user 'funktionen' attribute to set read/write status for stammdaten.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 984
diff changeset
40 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
41 }
975
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
42 // TODO: Which docked Items are required?
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
43 this.dockedItems = [{
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
44 xtype: 'toolbar',
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
45 dock: 'top',
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
46 items: [{
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
47 xtype: 'tbtext',
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
48 id: 'tbtitle',
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
49 text: i18n.getMsg('de.gridTitle')
984
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
50 },
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
51 '->',
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 text: i18n.getMsg('de.button.add'),
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
54 icon: 'resources/img/list-add.png',
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
55 action: 'add',
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
56 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
57 }, {
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
58 text: i18n.getMsg('de.button.delete'),
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
59 icon: 'resources/img/list-remove.png',
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
60 action: 'delete',
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
61 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
62 }]
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
63 }];
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 this.columns = [{
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
66 header: i18n.getMsg('netzbetreiberId'),
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
67 dataIndex: 'netzbetreiberId',
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
68 renderer: function(value) {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
69 var r = '';
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
70 if (!value || value === '') {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
71 r = 'Error';
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
72 }
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
73 var store = Ext.data.StoreManager.get('netzbetreiber');
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
74 var record = store.getById(value);
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
75 if (record) {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
76 r = record.get('netzbetreiber');
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
77 }
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
78 return r;
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
79 },
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
80 editor: {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
81 xtype: 'combobox',
1075
d23427c68285 Use filtered set of netzbetreiber for stammdatengrids.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1074
diff changeset
82 store: Ext.data.StoreManager.get('netzbetreiberFiltered'),
975
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
83 displayField: 'netzbetreiber',
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
84 valueField: 'id',
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
85 allowBlank: false
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
86 }
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
87 }, {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
88 header: i18n.getMsg('daErzeugerId'),
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
89 dataIndex: 'daErzeugerId',
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
90 editor: {
1058
ce1928e6e828 Updated editors in stammdaten grids.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1051
diff changeset
91 xtype: 'textfield',
975
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
92 allowBlank: false
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
93 }
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
94 }, {
982
d8b0b23047b1 Added GridEditor Plugin
Dustin Demuth <dustin@intevation.de>
parents: 981
diff changeset
95 header: i18n.getMsg('bezeichnung'),
d8b0b23047b1 Added GridEditor Plugin
Dustin Demuth <dustin@intevation.de>
parents: 981
diff changeset
96 dataIndex: 'bezeichnung',
d8b0b23047b1 Added GridEditor Plugin
Dustin Demuth <dustin@intevation.de>
parents: 981
diff changeset
97 editor: {
984
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
98 allowBlank: false,
982
d8b0b23047b1 Added GridEditor Plugin
Dustin Demuth <dustin@intevation.de>
parents: 981
diff changeset
99 xtype: 'textfield'
d8b0b23047b1 Added GridEditor Plugin
Dustin Demuth <dustin@intevation.de>
parents: 981
diff changeset
100 }
d8b0b23047b1 Added GridEditor Plugin
Dustin Demuth <dustin@intevation.de>
parents: 981
diff changeset
101 }, {
975
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
102 header: i18n.getMsg('mstId'),
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
103 dataIndex: 'mstId',
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
104 renderer: function(value) {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
105 var r = '';
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
106 if (!value || value === '') {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
107 r = 'Error';
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
108 }
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
109 var store = Ext.data.StoreManager.get('messstellen');
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
110 var record = store.getById(value);
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
111 if (record) {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
112 r = record.get('messStelle');
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 return r;
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
115 },
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
116 editor: {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
117 xtype: 'combobox',
984
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
118 store: Ext.data.StoreManager.get('messstellen'),
975
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
119 displayField: 'messStelle',
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
120 valueField: 'id',
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
121 allowBlank: false
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 }, {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
124 header: i18n.getMsg('letzteAenderung'),
1045
d859fbfc8a53 Set date format for stammdaten grids.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1039
diff changeset
125 xtype: 'datecolumn',
d859fbfc8a53 Set date format for stammdaten grids.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1039
diff changeset
126 format: 'd.m.Y H:i',
975
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
127 dataIndex: 'letzteAenderung'
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
128 }];
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
129 this.listeners = {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
130 select: {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
131 fn: this.activateRemoveButton,
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
132 scope: this
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
133 },
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
134 deselect: {
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
135 fn: this.deactivateRemoveButton,
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
136 scope: this
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
137 }
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
138 };
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
139 this.callParent(arguments);
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
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
142 /**
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
143 * This sets the Store of this Grid
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
144 */
1039
77e22ad5cc84 Use user 'funktionen' attribute to set read/write status for stammdaten.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 984
diff changeset
145 setStore: function(store) {
975
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
146 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
147 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
148 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
149 }
975
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
150
984
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
151 if (store) {
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
152 this.removeDocked(Ext.getCmp('ptbar'), true);
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
153 this.reconfigure(store);
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
154 this.addDocked([{
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
155 xtype: 'pagingtoolbar',
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
156 id: 'ptbar',
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
157 dock: 'bottom',
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
158 store: store,
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
159 displayInfo: true
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
160 }]);
b21421ba6917 added buttons for datensatzerzeuger, pobenehmer, added controllers
Dustin Demuth <dustin@intevation.de>
parents: 982
diff changeset
161 }
975
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
162 }
fb99332bb48e Severe changes concerning the Resultgrids.
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
163 });

http://lada.wald.intevation.org