From 5a0d77b19b94fc15e119813737e5898d505f1803 Mon Sep 17 00:00:00 2001 From: Guillaume Beraudo Date: Tue, 22 May 2018 17:30:37 +0200 Subject: [PATCH 1/3] Remove now useless casts --- src/filter/ruleComponent.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/filter/ruleComponent.js b/src/filter/ruleComponent.js index 3353a454ff58..b320932897ae 100644 --- a/src/filter/ruleComponent.js +++ b/src/filter/ruleComponent.js @@ -227,12 +227,12 @@ exports.RuleController_ = class { * @export */ this.timeRangeMode = { - widget: /** @type {ngeox.TimePropertyWidgetEnum} */ ('datepicker'), + widget: 'datepicker', maxValue: this.createDate_(), minValue: this.createWeekAgoDate_(), maxDefValue: null, minDefValue: null, - mode: /** @type {ngeox.TimePropertyModeEnum} */ ('range'), + mode: 'range', interval: [0, 1, 0, 0] }; @@ -243,12 +243,12 @@ exports.RuleController_ = class { * @export */ this.timeValueMode = { - widget: /** @type {ngeox.TimePropertyWidgetEnum} */ ('datepicker'), + widget: 'datepicker', maxValue: this.createDate_(), minValue: this.createDate_(), maxDefValue: null, minDefValue: null, - mode: /** @type {ngeox.TimePropertyModeEnum} */ ('value'), + mode: 'value', interval: [0, 1, 0, 0] }; From c45c199062bb835c34b067b84a99bcdf925ec734 Mon Sep 17 00:00:00 2001 From: Guillaume Beraudo Date: Tue, 22 May 2018 17:31:16 +0200 Subject: [PATCH 2/3] Handle new time_during value in date picker --- src/filter/rulecomponent.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/filter/rulecomponent.html b/src/filter/rulecomponent.html index 39de87f381a5..ac7b969499a5 100644 --- a/src/filter/rulecomponent.html +++ b/src/filter/rulecomponent.html @@ -26,7 +26,7 @@ ng-switch-when="date|datetime" ng-switch-when-separator="|">
-
+
@@ -237,7 +237,7 @@ ng-switch-when="date|datetime" ng-switch-when-separator="|">
-
+
From {{ $ctrl.timeToDate($ctrl.rule.lowerBoundary) }} to @@ -284,7 +284,7 @@
-
+
Between {{ $ctrl.rule.lowerBoundary }} and From 073e068ddf1563a806ae9e68eb5a0c5d673aa9c1 Mon Sep 17 00:00:00 2001 From: Guillaume Beraudo Date: Tue, 22 May 2018 17:41:57 +0200 Subject: [PATCH 3/3] Depend on datepicker locales (uk, de, fr, it) --- src/misc/datepickerComponent.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/misc/datepickerComponent.js b/src/misc/datepickerComponent.js index 7f12139e1d8d..933558f11bed 100644 --- a/src/misc/datepickerComponent.js +++ b/src/misc/datepickerComponent.js @@ -7,6 +7,12 @@ import ngeoMiscTime from 'ngeo/misc/Time.js'; import 'angular-ui-date'; import 'jquery-ui/themes/base/all.css'; +// FIXME: import the locales in the applications +import 'jquery-ui/ui/i18n/datepicker-fr.js'; +import 'jquery-ui/ui/i18n/datepicker-en-GB.js'; +import 'jquery-ui/ui/i18n/datepicker-de.js'; +import 'jquery-ui/ui/i18n/datepicker-it.js'; + /** * @type {!angular.Module}