Mercurial > lada > lada-client
diff 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 |
line wrap: on
line diff
--- a/app/view/grid/Probenehmer.js Fri Feb 19 13:58:43 2016 +0100 +++ b/app/view/grid/Probenehmer.js Fri Feb 19 13:59:24 2016 +0100 @@ -30,13 +30,15 @@ var i18n = Lada.getApplication().bundle; this.emptyText = i18n.getMsg('pn.emptyGrid'); - this.rowEditing = Ext.create('Ext.grid.plugin.RowEditing', { - clicksToMoveEditor: 1, - autoCancel: false, - disabled: false, - pluginId: 'rowedit' - }); - this.plugins = [this.rowEditing]; + if (Ext.Array.contains(Lada.funktionen, 4)) { + this.rowEditing = Ext.create('Ext.grid.plugin.RowEditing', { + clicksToMoveEditor: 1, + autoCancel: false, + disabled: false, + pluginId: 'rowedit' + }); + this.plugins = [this.rowEditing]; + } // TODO: Which docked Items are required? this.dockedItems = [{ @@ -167,13 +169,15 @@ /** * This sets the Store of this Grid */ - setStore: function(store){ + setStore: function(store) { var i18n = Lada.getApplication().bundle; + if (Ext.Array.contains(Lada.funktionen, 4)) { + this.down('button[action=add]').enable(); + } if (store) { this.removeDocked(Ext.getCmp('ptbar'), true); this.reconfigure(store); - this.down('button[action=add]').enable(); this.addDocked([{ xtype: 'pagingtoolbar', id: 'ptbar',