diff app/view/window/ProbeEdit.js @ 823:5ed0e6273888

Only enable delete button in grids when an entry was selected
author Dustin Demuth <dustin@intevation.de>
date Fri, 29 May 2015 14:03:18 +0200
parents dd6925ef6028
children 135cd5814b15
line wrap: on
line diff
--- a/app/view/window/ProbeEdit.js	Fri May 29 14:02:21 2015 +0200
+++ b/app/view/window/ProbeEdit.js	Fri May 29 14:03:18 2015 +0200
@@ -169,17 +169,25 @@
             // Disable only when the User is not the owner of the Probe
             // Works in symbiosis with success callback some lines above.
             this.down('fset[name=messungen]').down('messunggrid').setReadOnly(true);
+            this.down('fset[name=messungen]').down('messunggrid').readOnly = true;
         }
         this.down('fset[name=orte]').down('ortgrid').setReadOnly(true);
+        this.down('fset[name=orte]').down('ortgrid').readOnly = true;
         this.down('fset[name=probenzusatzwerte]').down('probenzusatzwertgrid').setReadOnly(true);
+        this.down('fset[name=probenzusatzwerte]').down('probenzusatzwertgrid').readOnly = true;
         this.down('fset[name=pkommentare]').down('pkommentargrid').setReadOnly(true);
+        this.down('fset[name=pkommentare]').down('pkommentargrid').readOnly = true;
     },
 
     enableChildren: function() {
         this.down('fset[name=messungen]').down('messunggrid').setReadOnly(false);
+        this.down('fset[name=messungen]').down('messunggrid').readOnly = false;
         this.down('fset[name=orte]').down('ortgrid').setReadOnly(false);
+        this.down('fset[name=orte]').down('ortgrid').readOnly = false;
         this.down('fset[name=probenzusatzwerte]').down('probenzusatzwertgrid').setReadOnly(false);
+        this.down('fset[name=probenzusatzwerte]').down('probenzusatzwertgrid').readOnly = false;
         this.down('fset[name=pkommentare]').down('pkommentargrid').setReadOnly(false);
+        this.down('fset[name=pkommentare]').down('pkommentargrid').readOnly = false;
     },
 
     setMessages: function(errors, warnings) {

http://lada.wald.intevation.org