Mercurial > lada > lada-client
comparison app/view/grid/DatensatzErzeuger.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 |
---|---|
27 border: false, | 27 border: false, |
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('de.emptyGrid'); | 31 this.emptyText = i18n.getMsg('de.emptyGrid'); |
32 | 32 if (Ext.Array.contains(Lada.funktionen, 4)) { |
33 this.rowEditing = Ext.create('Ext.grid.plugin.RowEditing', { | 33 this.rowEditing = Ext.create('Ext.grid.plugin.RowEditing', { |
34 clicksToMoveEditor: 1, | 34 clicksToMoveEditor: 1, |
35 autoCancel: false, | 35 autoCancel: false, |
36 disabled: false, | 36 disabled: false, |
37 pluginId: 'rowedit' | 37 pluginId: 'rowedit' |
38 }); | 38 }); |
39 this.plugins = [this.rowEditing]; | 39 this.plugins = [this.rowEditing]; |
40 | 40 } |
41 // TODO: Which docked Items are required? | 41 // TODO: Which docked Items are required? |
42 this.dockedItems = [{ | 42 this.dockedItems = [{ |
43 xtype: 'toolbar', | 43 xtype: 'toolbar', |
44 dock: 'top', | 44 dock: 'top', |
45 items: [{ | 45 items: [{ |
136 }, | 136 }, |
137 | 137 |
138 /** | 138 /** |
139 * This sets the Store of this Grid | 139 * This sets the Store of this Grid |
140 */ | 140 */ |
141 setStore: function(store){ | 141 setStore: function(store) { |
142 var i18n = Lada.getApplication().bundle; | 142 var i18n = Lada.getApplication().bundle; |
143 if (Ext.Array.contains(Lada.funktionen, 4)) { | |
144 this.down('button[action=add]').enable(); | |
145 } | |
143 | 146 |
144 if (store) { | 147 if (store) { |
145 this.removeDocked(Ext.getCmp('ptbar'), true); | 148 this.removeDocked(Ext.getCmp('ptbar'), true); |
146 this.reconfigure(store); | 149 this.reconfigure(store); |
147 this.down('button[action=add]').enable(); | |
148 this.addDocked([{ | 150 this.addDocked([{ |
149 xtype: 'pagingtoolbar', | 151 xtype: 'pagingtoolbar', |
150 id: 'ptbar', | 152 id: 'ptbar', |
151 dock: 'bottom', | 153 dock: 'bottom', |
152 store: store, | 154 store: store, |