diff app/view/form/Messung.js @ 997:c943340176d4

Disable the statusresetbutton
author Dustin Demuth <dustin@intevation.de>
date Fri, 08 Jan 2016 14:43:41 +0100
parents abc2e9fe5069
children d8e74bd89d6b
line wrap: on
line diff
--- a/app/view/form/Messung.js	Fri Jan 08 14:34:27 2016 +0100
+++ b/app/view/form/Messung.js	Fri Jan 08 14:43:41 2016 +0100
@@ -170,6 +170,7 @@
         var i18n = Lada.getApplication().bundle;
         var msg = i18n.getMsg('load.statuswert');
         var textfield = this.down('[name=status]');
+        var messwin = this.up('window');
 
         if(textfield) {
             textfield.setRawValue(msg);
@@ -192,6 +193,17 @@
                 }
                 this.setStatusWert(sw);
                 this.setStatusStufe(ss);
+
+                // Enable / Disable the statusreset button of the statusgrid of the messungform
+                if (messwin.record.get('statusEdit') === true &&
+                        sw != 0 &&
+                        sw != 4) {
+                    messwin.enableStatusReset();
+                }
+                else {
+                    messwin.disableStatusReset();
+                }
+
             },
             scope: this
         });

http://lada.wald.intevation.org