3
0
Fork 0

Merge PR #1491 into 12.0

Signed-off-by pedrobaeza
12.0
OCA-git-bot 2020-01-20 11:43:55 +00:00
commit aada4fe59f
1 changed files with 6 additions and 5 deletions

View File

@ -532,14 +532,15 @@ odoo.define('web_responsive', function (require) {
events: _.extend(DocumentViewer.prototype.events, {
'click .o_maximize_btn': '_onClickMaximize',
'click .o_minimize_btn': '_onClickMinimize',
'shown.bs.modal': '_onShownModal',
}),
start: function () {
this.$btnMaximize = this.$('.o_maximize_btn');
this.$btnMinimize = this.$('.o_minimize_btn');
return this._super.apply(this, arguments);
_onShownModal: function () {
// Disable auto-focus to allow to use controls in edit mode.
// This only affects the active modal.
// More info: https://stackoverflow.com/a/14795256
$(document).off('focusin.modal');
},
_onClickMaximize: function () {
this.$el.removeClass('o_responsive_document_viewer');
},