diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-03-29 18:10:57 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-03-29 18:10:57 +0100 |
| commit | 2a06f4dcf3ab03d3d0b6ed14d6ccd12140063b27 (patch) | |
| tree | c3bf62aedae655cdaddb61f6b86703c2a1d9448d /addons/web/static/src/js | |
| parent | 1a5ab9265425934a717fd6d57260146a524c208a (diff) | |
| parent | 09fb2469b490d48ce937a41a63447e099b93c637 (diff) | |
[MERGE] forward port branch 12.0 up to 09fb2469b49
Diffstat (limited to 'addons/web/static/src/js')
| -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 7c06a7d818d..2b771ba9772 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'); |
