Mercurial > lada > lada-client
comparison app/view/grid/Probenehmer.js @ 1039:77e22ad5cc84
Use user 'funktionen' attribute to set read/write status for stammdaten.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 19 Feb 2016 13:59:24 +0100 |
parents | b21421ba6917 |
children | d859fbfc8a53 |
comparison
equal
deleted
inserted
replaced
1038:1251094e7500 | 1039:77e22ad5cc84 |
---|---|
28 | 28 |
29 initComponent: function() { | 29 initComponent: function() { |
30 var i18n = Lada.getApplication().bundle; | 30 var i18n = Lada.getApplication().bundle; |
31 this.emptyText = i18n.getMsg('pn.emptyGrid'); | 31 this.emptyText = i18n.getMsg('pn.emptyGrid'); |
32 | 32 |
33 this.rowEditing = Ext.create('Ext.grid.plugin.RowEditing', { | 33 if (Ext.Array.contains(Lada.funktionen, 4)) { |
34 clicksToMoveEditor: 1, | 34 this.rowEditing = Ext.create('Ext.grid.plugin.RowEditing', { |
35 autoCancel: false, | 35 clicksToMoveEditor: 1, |
36 disabled: false, | 36 autoCancel: false, |
37 pluginId: 'rowedit' | 37 disabled: false, |
38 }); | 38 pluginId: 'rowedit' |
39 this.plugins = [this.rowEditing]; | 39 }); |
40 this.plugins = [this.rowEditing]; | |
41 } | |
40 | 42 |
41 // TODO: Which docked Items are required? | 43 // TODO: Which docked Items are required? |
42 this.dockedItems = [{ | 44 this.dockedItems = [{ |
43 xtype: 'toolbar', | 45 xtype: 'toolbar', |
44 dock: 'top', | 46 dock: 'top', |
165 }, | 167 }, |
166 | 168 |
167 /** | 169 /** |
168 * This sets the Store of this Grid | 170 * This sets the Store of this Grid |
169 */ | 171 */ |
170 setStore: function(store){ | 172 setStore: function(store) { |
171 var i18n = Lada.getApplication().bundle; | 173 var i18n = Lada.getApplication().bundle; |
174 if (Ext.Array.contains(Lada.funktionen, 4)) { | |
175 this.down('button[action=add]').enable(); | |
176 } | |
172 | 177 |
173 if (store) { | 178 if (store) { |
174 this.removeDocked(Ext.getCmp('ptbar'), true); | 179 this.removeDocked(Ext.getCmp('ptbar'), true); |
175 this.reconfigure(store); | 180 this.reconfigure(store); |
176 this.down('button[action=add]').enable(); | |
177 this.addDocked([{ | 181 this.addDocked([{ |
178 xtype: 'pagingtoolbar', | 182 xtype: 'pagingtoolbar', |
179 id: 'ptbar', | 183 id: 'ptbar', |
180 dock: 'bottom', | 184 dock: 'bottom', |
181 store: store, | 185 store: store, |