diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-05-17 15:50:59 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-05-17 15:50:59 +0200 |
| commit | d785adba6c09b0773bdd874182f450ba2ebe7c6d (patch) | |
| tree | 5189f5dc30c84515eda62c4d6a512f552ae8f900 /addons/web/static/src/js | |
| parent | 8968a620105e2e79f2aa9d8db36b5408b89e92ee (diff) | |
| parent | c545783b95b15f65a9798003b614f75685dc434e (diff) | |
[MERGE] forward port branch 12.0 up to c545783b95b
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/chrome/abstract_web_client.js | 6 | ||||
| -rw-r--r-- | addons/web/static/src/js/tools/test_menus.js | 6 | ||||
| -rw-r--r-- | addons/web/static/src/js/widgets/date_picker.js | 7 |
3 files changed, 17 insertions, 2 deletions
diff --git a/addons/web/static/src/js/chrome/abstract_web_client.js b/addons/web/static/src/js/chrome/abstract_web_client.js index 2516b0a7230..2a8e8151560 100644 --- a/addons/web/static/src/js/chrome/abstract_web_client.js +++ b/addons/web/static/src/js/chrome/abstract_web_client.js @@ -491,7 +491,11 @@ var AbstractWebClient = Widget.extend(ServiceProviderMixin, KeyboardNavigationMi new RainbowMan(data).appendTo(this.$el); } else { // For instance keep title blank, as we don't have title in data - this.notification_manager.notify('', data.message, true); + this.call('notification', 'notify', { + title: "", + message: data.message, + sticky: false + }); } } else { throw new Error('Unknown effect type: ' + type); diff --git a/addons/web/static/src/js/tools/test_menus.js b/addons/web/static/src/js/tools/test_menus.js index c7b1846b1e9..7f69c65a13e 100644 --- a/addons/web/static/src/js/tools/test_menus.js +++ b/addons/web/static/src/js/tools/test_menus.js @@ -44,8 +44,12 @@ } } - // Main function that starts orchestration of tests function clickEverywhere(){ + setTimeout(_clickEverywhere, 1000); + } + + // Main function that starts orchestration of tests + function _clickEverywhere(){ console.log("Starting ClickEverywhere test"); var startTime = performance.now(); createWebClientHooks(); diff --git a/addons/web/static/src/js/widgets/date_picker.js b/addons/web/static/src/js/widgets/date_picker.js index 57c935905e5..df9601b3a04 100644 --- a/addons/web/static/src/js/widgets/date_picker.js +++ b/addons/web/static/src/js/widgets/date_picker.js @@ -13,6 +13,7 @@ var DateWidget = Widget.extend({ type_of_date: "date", events: { 'change.datetimepicker': 'changeDatetime', + 'error.datetimepicker': 'errorDatetime', 'change .o_datepicker_input': 'changeDatetime', 'input input': '_onInput', 'keydown': '_onKeydown', @@ -104,6 +105,12 @@ var DateWidget = Widget.extend({ } }, /** + * Library clears the wrong date format so just ignore error + */ + errorDatetime: function (e) { + return false; + }, + /** * Focuses the datepicker input. This function must be called in order to * prevent 'input' events triggered by the lib to bubble up, and to cause * unwanted effects (like triggering 'field_changed' events) |
