comparison app/view/widget/DynamicGrid.js @ 1082:dbd435256f77

Open status edit window and send status objects.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 13 Apr 2016 19:04:15 +0200
parents 2a5d42045c63
children a73726bba79c
comparison
equal deleted inserted replaced
1081:5e9a674d7bb4 1082:dbd435256f77
78 name: 'owner' 78 name: 'owner'
79 })); 79 }));
80 fields.push(new Ext.data.Field({ 80 fields.push(new Ext.data.Field({
81 name: 'readonly' 81 name: 'readonly'
82 })); 82 }));
83 fields.push(new Ext.data.Field({
84 name: 'statusEdit'
85 }));
83 86
84 resultColumns.push({ 87 resultColumns.push({
85 xtype: 'actioncolumn', 88 xtype: 'actioncolumn',
86 text: 'RW', 89 text: 'RW',
87 dataIndex: 'readonly', 90 dataIndex: 'readonly',
88 sortable: false, 91 sortable: false,
89 tooltip: 'Probe öffnen', 92 tooltip: 'Probe öffnen',
90 width: 30, 93 width: 30,
91 getClass: function (val, meta, rec) { 94 getClass: function (val, meta, rec) {
92 if ( rec.get('readonly') === false && rec.get('owner') === true) { 95 if (rec.get('readonly') === false &&
96 rec.get('owner') === true &&
97 !rec.get('statusEdit')) {
98 console.log('edit' + rec.get('statusEdit'));
93 return 'edit'; 99 return 'edit';
94 } 100 }
95 else { 101 else if (rec.get('readonly') === false &&
96 return 'noedit'; 102 rec.get('owner') === true &&
103 rec.get('statusEdit')) {
104 return 'editstatus';
97 } 105 }
106 else if (rec.get('readonly') === true &&
107 rec.get('statusEdit')) {
108 return 'noeditstatus';
109 }
110 return 'noedit';
98 }, 111 },
99 handler: function(grid, rowIndex, colIndex) { 112 handler: function(grid, rowIndex, colIndex) {
100 var rec = grid.getStore().getAt(rowIndex); 113 var rec = grid.getStore().getAt(rowIndex);
101 grid.fireEvent('itemdblclick', grid, rec); 114 grid.fireEvent('itemdblclick', grid, rec);
102 } 115 }

http://lada.wald.intevation.org