Mercurial > lada > lada-client
comparison 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 |
comparison
equal
deleted
inserted
replaced
701:f0bc5387abcc | 702:0c8e689f3bcb |
---|---|
32 autoCancel: false, | 32 autoCancel: false, |
33 pluginId: 'rowedit', | 33 pluginId: 'rowedit', |
34 listeners:{ | 34 listeners:{ |
35 // Make row ineditable when readonly is set to true | 35 // Make row ineditable when readonly is set to true |
36 // Normally this would belong into a controller an not the view. | 36 // Normally this would belong into a controller an not the view. |
37 // But the RowEditPlugin is not handled there. | |
37 beforeedit: function(e, o) { | 38 beforeedit: function(e, o) { |
38 if (o.record.get('readonly') == true) { | 39 var readonlywin = o.grid.up('window').record.get('readonly'); |
40 var readonlygrid = o.record.get('readonly'); | |
41 if (readonlywin == true || readonlygrid == true) { | |
39 return false; | 42 return false; |
40 } | 43 } |
41 return true; | 44 return true; |
42 } | 45 } |
43 } | 46 } |