Mercurial > lada > lada-client
diff app/view/grid/Probenzusatzwert.js @ 702:0c8e689f3bcb
Added readonly to models, Probenzusatzwertgrid does now check wheter a record is readonly and disables the roweditor in such a case
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Fri, 27 Mar 2015 10:20:22 +0100 |
parents | 69cb367c0a63 |
children | 9ab7b1eed9f8 |
line wrap: on
line diff
--- a/app/view/grid/Probenzusatzwert.js Fri Mar 27 09:38:13 2015 +0100 +++ b/app/view/grid/Probenzusatzwert.js Fri Mar 27 10:20:22 2015 +0100 @@ -34,8 +34,11 @@ listeners:{ // Make row ineditable when readonly is set to true // Normally this would belong into a controller an not the view. + // But the RowEditPlugin is not handled there. beforeedit: function(e, o) { - if (o.record.get('readonly') == true) { + var readonlywin = o.grid.up('window').record.get('readonly'); + var readonlygrid = o.record.get('readonly'); + if (readonlywin == true || readonlygrid == true) { return false; } return true;