comparison 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
comparison
equal deleted inserted replaced
1256:f961f94495c8 1257:9a428be3907b
44 icon: 'resources/img/list-remove.png', 44 icon: 'resources/img/list-remove.png',
45 action: 'delete' 45 action: 'delete'
46 }] 46 }]
47 }]; 47 }];
48 this.columns = [{ 48 this.columns = [{
49 xtype: 'actioncolumn',
50 text: '',
51 dataIndex: 'readonly',
52 sortable: false,
53 width: 30,
54 getClass: function (val, meta, rec) {
55 if (rec.get('readonly') === false) {
56 return 'edit';
57 }
58 return 'noedit';
59 },
60 handler: function(grid, rowIndex, colIndex) {
61 var rec = grid.getStore().getAt(rowIndex);
62 grid.fireEvent('itemdblclick', grid, rec);
63 }
64 }, {
49 header: 'Typ', 65 header: 'Typ',
50 dataIndex: 'ortszuordnungTyp', 66 dataIndex: 'ortszuordnungTyp',
51 flex: 1, 67 flex: 1,
52 editor: { 68 editor: {
53 allowBlank: false 69 allowBlank: false
70 }
71 }, {
72 header: 'Ort-ID',
73 dataIndex: 'ortId',
74 flex: 2,
75 renderer: function(value) {
76 var store = Ext.data.StoreManager.get('orte');
77 var record = store.getById(value);
78 return record.get('ortId');
54 } 79 }
55 }, { 80 }, {
56 header: 'Staat', 81 header: 'Staat',
57 dataIndex: 'ortId', 82 dataIndex: 'ortId',
58 flex: 1, 83 flex: 1,
84 var gemid = record.get('gemId'); 109 var gemid = record.get('gemId');
85 var record2 = gemeinden.getById(gemid); 110 var record2 = gemeinden.getById(gemid);
86 return record2.get('bezeichnung'); 111 return record2.get('bezeichnung');
87 } 112 }
88 }, { 113 }, {
89 header: 'Ortszusatztext', 114 header: 'Anlage',
90 flex: 6, 115 dataIndex: 'ortId',
91 dataIndex: 'ortszusatztext' 116 flex: 3,
117 renderer: function(value) {
118 var store = Ext.data.StoreManager.get('orte');
119 var record = store.getById(value);
120 return record.get('anlageId');
121 }
92 }]; 122 }];
93 this.listeners = { 123 this.listeners = {
94 select: { 124 select: {
95 fn: this.activateRemoveButton, 125 fn: this.activateRemoveButton,
96 scope: this 126 scope: this

http://lada.wald.intevation.org