[Lada-commits] [PATCH 2 of 2] It is an error to specify invalid intervals

Wald Commits scm-commit at wald.intevation.org
Tue Sep 20 18:17:10 CEST 2016


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1474388201 -7200
# Node ID 112fd60f1fb427134030eafaf7c1b25b9bd044dc
# Parent  47991f0d783736436e5814f30bcb37392be66194
It is an error to specify invalid intervals.

diff -r 47991f0d7837 -r 112fd60f1fb4 app/controller/form/Messprogramm.js
--- a/app/controller/form/Messprogramm.js	Tue Sep 20 18:14:38 2016 +0200
+++ b/app/controller/form/Messprogramm.js	Tue Sep 20 18:16:41 2016 +0200
@@ -40,15 +40,16 @@
                 select: this.syncOrtWindow
             },
             'messprogrammform datetime textfield': {
-                blur: this.checkDatePeriod
+                change: this.checkDatePeriod
+            },
+            'messprogrammform numfield numberfield': {
+                change: this.checkPeriod
             },
             'messprogrammform [name="teilintervallVon"]': {
                 change: this.synchronizeSlider,
-                blur: this.checkPeriod
             },
             'messprogrammform [name="teilintervallBis"]': {
                 change: this.synchronizeSlider,
-                blur: this.checkPeriod
             },
             'messprogrammform probenintervall combobox': {
                 select: this.updateIntervalls
@@ -284,7 +285,7 @@
                 .down('numberfield[period=end]').getValue();
             if (partners[0] && partners[1] && partners[0] > partners [1]) {
                 var msg = Lada.getApplication().bundle.getMsg('662');
-                field.up('fieldset').showWarningOrError(true, msg, false, '');
+                field.up('fieldset').showWarningOrError(false, '', true, msg);
             } else {
                 field.up('fieldset').clearMessages();
             }
@@ -313,7 +314,7 @@
                     .getValue()
             if (partners[0] && partners[1] && partners[0] > partners [1]) {
                 var msg = Lada.getApplication().bundle.getMsg('662');
-                field.up('fieldset').showWarningOrError(true, msg, false, '');
+                field.up('fieldset').showWarningOrError(false, '', true, msg);
             } else {
                 field.up('fieldset').clearMessages();
             }


More information about the Lada-commits mailing list