diff app/view/window/ProbeEdit.js @ 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 9ac03f461ab4
children 4d4de99bbe53
line wrap: on
line diff
--- 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();
                 }

http://lada.wald.intevation.org