diff app/view/window/ProbeEdit.js @ 710:f204f30b824a

Handle readonly mode and refresh operations.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 08 Apr 2015 10:50:33 +0200
parents 6f6d2df00130
children baef70abfe71
line wrap: on
line diff
--- a/app/view/window/ProbeEdit.js	Tue Apr 07 17:16:59 2015 +0200
+++ b/app/view/window/ProbeEdit.js	Wed Apr 08 10:50:33 2015 +0200
@@ -140,15 +140,18 @@
                 if (json) {
                     this.setMessages(json.errors, json.warnings);
                 }
+                // If the Probe is ReadOnly, disable Inputfields and grids
+                if (this.record.get('readonly') === true) {
+                    this.down('probeform').setReadOnly(true);
+                    this.disableChildren();
+                }
+                else {
+                    this.down('probeform').setReadOnly(false);
+                    this.enableChildren();
+                }
             },
             scope: this
         });
-
-        // If the Probe is ReadOnly, disable Inputfields and grids
-        if (this.record.get('readonly') == true){
-            this.down('probeform').setReadOnly(true);
-            this.disableChildren();
-        }
     },
 
     enableAddMessungen: function(){

http://lada.wald.intevation.org