comparison app/view/grid/DatensatzErzeuger.js @ 1081:5e9a674d7bb4

Added Icon-column to stammdaten grid showing RW-status.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 13 Apr 2016 18:41:47 +0200
parents d23427c68285
children 677fc5e62055
comparison
equal deleted inserted replaced
1080:15d7b7a9e177 1081:5e9a674d7bb4
61 disabled: true // disabled on startup, will be enabled by controller if necessary 61 disabled: true // disabled on startup, will be enabled by controller if necessary
62 }] 62 }]
63 }]; 63 }];
64 64
65 this.columns = [{ 65 this.columns = [{
66 xtype: 'actioncolumn',
67 text: 'RW',
68 dataIndex: 'readonly',
69 sortable: false,
70 width: 30,
71 getClass: function (val, meta, rec) {
72 console.log(rec.get('statusEdit'));
73 if (rec.get('readonly') === false) {
74 return 'edit';
75 }
76 return 'noedit';
77 },
78 handler: function(grid, rowIndex, colIndex) {
79 var rec = grid.getStore().getAt(rowIndex);
80 grid.fireEvent('itemdblclick', grid, rec);
81 }
82 }, {
66 header: i18n.getMsg('netzbetreiberId'), 83 header: i18n.getMsg('netzbetreiberId'),
67 dataIndex: 'netzbetreiberId', 84 dataIndex: 'netzbetreiberId',
68 renderer: function(value) { 85 renderer: function(value) {
69 var r = ''; 86 var r = '';
70 if (!value || value === '') { 87 if (!value || value === '') {

http://lada.wald.intevation.org