diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-03-29 19:47:46 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-03-29 19:47:46 +0100 |
| commit | 28cce6ce3a42fab2b4ab185aed024850e7492a86 (patch) | |
| tree | 47d9f742a4fae5e78c6ab2b9eb4ed5052f32325c /addons/web/static/src | |
| parent | 98e4540fe9adab8bd0d77fbff7906a5b7fbd01a3 (diff) | |
| parent | c0cf4049b2a4a7c51169ea88569fd7f89e503a59 (diff) | |
[MERGE] forward port branch saas-12.1 up to c0cf4049b2a
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/core/dialog.js | 10 | ||||
| -rw-r--r-- | addons/web/static/src/js/views/calendar/calendar_model.js | 6 |
2 files changed, 9 insertions, 7 deletions
diff --git a/addons/web/static/src/js/core/dialog.js b/addons/web/static/src/js/core/dialog.js index 83eded92c8a..3c1013c2944 100644 --- a/addons/web/static/src/js/core/dialog.js +++ b/addons/web/static/src/js/core/dialog.js @@ -229,13 +229,13 @@ var Dialog = Widget.extend({ this.$modal.remove(); } - if (!isFocusSet) { - var modals = $('body > .modal').filter(':visible'); - if (modals.length) { + var modals = $('body > .modal').filter(':visible'); + if (modals.length) { + if (!isFocusSet) { modals.last().focus(); - // Keep class modal-open (deleted by bootstrap hide fnct) on body to allow scrolling inside the modal - $('body').addClass('modal-open'); } + // Keep class modal-open (deleted by bootstrap hide fnct) on body to allow scrolling inside the modal + $('body').addClass('modal-open'); } }, /** diff --git a/addons/web/static/src/js/views/calendar/calendar_model.js b/addons/web/static/src/js/views/calendar/calendar_model.js index aaf52057ad6..101588dcc93 100644 --- a/addons/web/static/src/js/views/calendar/calendar_model.js +++ b/addons/web/static/src/js/views/calendar/calendar_model.js @@ -75,9 +75,11 @@ return AbstractModel.extend({ .utc(); } else { // default hours in the user's timezone - start.hours(7).add(-this.getSession().getTZOffset(start), 'minutes'); - end.hours(19).add(-this.getSession().getTZOffset(end), 'minutes'); + start.hours(7); + end.hours(19); } + start.add(-this.getSession().getTZOffset(start), 'minutes'); + end.add(-this.getSession().getTZOffset(end), 'minutes'); } } else { start.add(-this.getSession().getTZOffset(start), 'minutes'); |
