Mercurial > lada > lada-client
diff 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 |
line wrap: on
line diff
--- a/app/view/widget/DynamicGrid.js Wed Apr 13 18:41:47 2016 +0200 +++ b/app/view/widget/DynamicGrid.js Wed Apr 13 19:04:15 2016 +0200 @@ -80,6 +80,9 @@ fields.push(new Ext.data.Field({ name: 'readonly' })); + fields.push(new Ext.data.Field({ + name: 'statusEdit' + })); resultColumns.push({ xtype: 'actioncolumn', @@ -89,12 +92,22 @@ tooltip: 'Probe öffnen', width: 30, getClass: function (val, meta, rec) { - if ( rec.get('readonly') === false && rec.get('owner') === true) { + if (rec.get('readonly') === false && + rec.get('owner') === true && + !rec.get('statusEdit')) { + console.log('edit' + rec.get('statusEdit')); return 'edit'; } - else { - return 'noedit'; + else if (rec.get('readonly') === false && + rec.get('owner') === true && + rec.get('statusEdit')) { + return 'editstatus'; } + else if (rec.get('readonly') === true && + rec.get('statusEdit')) { + return 'noeditstatus'; + } + return 'noedit'; }, handler: function(grid, rowIndex, colIndex) { var rec = grid.getStore().getAt(rowIndex);