Mercurial > lada > lada-client
diff app/view/grid/Ortszuordnung.js @ 1257:9a428be3907b
add action button in Messung grid and Ortszuordnung grid
author | Michael Stanko <mstanko@bfs.de> |
---|---|
date | Mon, 21 Nov 2016 08:07:54 +0100 |
parents | 981339d774b8 |
children | 3d83bcb02ee3 |
line wrap: on
line diff
--- a/app/view/grid/Ortszuordnung.js Fri Nov 18 19:46:15 2016 +0100 +++ b/app/view/grid/Ortszuordnung.js Mon Nov 21 08:07:54 2016 +0100 @@ -46,6 +46,22 @@ }] }]; this.columns = [{ + xtype: 'actioncolumn', + text: '', + dataIndex: 'readonly', + sortable: false, + width: 30, + getClass: function (val, meta, rec) { + if (rec.get('readonly') === false) { + return 'edit'; + } + return 'noedit'; + }, + handler: function(grid, rowIndex, colIndex) { + var rec = grid.getStore().getAt(rowIndex); + grid.fireEvent('itemdblclick', grid, rec); + } + }, { header: 'Typ', dataIndex: 'ortszuordnungTyp', flex: 1, @@ -53,6 +69,15 @@ allowBlank: false } }, { + header: 'Ort-ID', + dataIndex: 'ortId', + flex: 2, + renderer: function(value) { + var store = Ext.data.StoreManager.get('orte'); + var record = store.getById(value); + return record.get('ortId'); + } + }, { header: 'Staat', dataIndex: 'ortId', flex: 1, @@ -86,9 +111,14 @@ return record2.get('bezeichnung'); } }, { - header: 'Ortszusatztext', - flex: 6, - dataIndex: 'ortszusatztext' + header: 'Anlage', + dataIndex: 'ortId', + flex: 3, + renderer: function(value) { + var store = Ext.data.StoreManager.get('orte'); + var record = store.getById(value); + return record.get('anlageId'); + } }]; this.listeners = { select: {