Mercurial > lada > lada-client
changeset 1033:e4b6b6c5fb89
Use 'owner' attribute to set messung grid and button RO status.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Thu, 18 Feb 2016 11:19:25 +0100 |
parents | fa04558f35cd |
children | 4d4de99bbe53 |
files | app/view/grid/Messung.js app/view/window/ProbeEdit.js |
diffstat | 2 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/app/view/grid/Messung.js Thu Feb 18 11:16:55 2016 +0100 +++ b/app/view/grid/Messung.js Thu Feb 18 11:19:25 2016 +0100 @@ -273,7 +273,9 @@ activateRemoveButton: function(selection, record) { var grid = this; //only enable the remove buttone, when the grid is editable. - if (! grid.readOnly) { + if (! grid.readOnly && + record.get('statusWert') === 0 && + record.get('owner')) { grid.down('button[action=delete]').enable(); } },
--- a/app/view/window/ProbeEdit.js Thu Feb 18 11:16:55 2016 +0100 +++ b/app/view/window/ProbeEdit.js Thu Feb 18 11:19:25 2016 +0100 @@ -137,7 +137,8 @@ success: function(record, response) { this.down('probeform').setRecord(record); this.record = record; - owner = this.record.get('owner'); + var owner = this.record.get('owner'); + var readonly = this.record.get('readonly'); if (owner) { //Always allow to Add Messungen. @@ -152,7 +153,7 @@ } } // If the Probe is ReadOnly, disable Inputfields and grids - if (this.record.get('readonly') === true) { + if (readonly === true || !owner) { this.down('probeform').setReadOnly(true); this.disableChildren(); }