comparison app/view/grid/MessprogrammKategorie.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 15d8c64049d1
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('mk.emptyGrid'); 31 this.emptyText = i18n.getMsg('mk.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',
113 }, 115 },
114 116
115 /** 117 /**
116 * This sets the Store of this Grid 118 * This sets the Store of this Grid
117 */ 119 */
118 setStore: function(store){ 120 setStore: function(store) {
119 var i18n = Lada.getApplication().bundle; 121 var i18n = Lada.getApplication().bundle;
122 if (Ext.Array.contains(Lada.funktionen, 4)) {
123 this.down('button[action=add]').enable();
124 }
120 125
121 this.removeDocked(Ext.getCmp('ptbar'), true); 126 this.removeDocked(Ext.getCmp('ptbar'), true);
122 this.reconfigure(store); 127 this.reconfigure(store);
123 this.addDocked([{ 128 this.addDocked([{
124 xtype: 'pagingtoolbar', 129 xtype: 'pagingtoolbar',

http://lada.wald.intevation.org