[IMP] pre-commit run after update

Includes some manual fixes to silent ESLint warnings.
This commit is contained in:
Jairo Llopis
2020-01-24 13:45:39 +00:00
committed by Mantux11
parent 2c0d1b3af1
commit 5784067517
4 changed files with 60 additions and 47 deletions

View File

@@ -1,26 +1,25 @@
odoo.define('web_dialog_size.web_dialog_size', function (require) {
'use strict';
odoo.define("web_dialog_size.web_dialog_size", function(require) {
"use strict";
var rpc = require('web.rpc');
var Dialog = require('web.Dialog');
var rpc = require("web.rpc");
var Dialog = require("web.Dialog");
var config = rpc.query({
model: 'ir.config_parameter',
method: 'get_web_dialog_size_config',
model: "ir.config_parameter",
method: "get_web_dialog_size_config",
});
Dialog.include({
willStart: function () {
willStart: function() {
var self = this;
return this._super.apply(this, arguments).then(function () {
self.$modal.find('.dialog_button_extend').on('click',
self.proxy('_extending')
);
self.$modal.find('.dialog_button_restore').on('click',
self.proxy('_restore')
);
return config.then(function (r) {
return this._super.apply(this, arguments).then(function() {
self.$modal
.find(".dialog_button_extend")
.on("click", self.proxy("_extending"));
self.$modal
.find(".dialog_button_restore")
.on("click", self.proxy("_restore"));
return config.then(function(r) {
if (r.default_maximize) {
self._extending();
} else {
@@ -30,18 +29,20 @@ odoo.define('web_dialog_size.web_dialog_size', function (require) {
});
},
opened: function () {
return this._super.apply(this, arguments).then(function () {
if (this.$modal) {
this.$modal.draggable({
handle: '.modal-header',
helper: false,
});
}
}.bind(this));
opened: function() {
return this._super.apply(this, arguments).then(
function() {
if (this.$modal) {
this.$modal.draggable({
handle: ".modal-header",
helper: false,
});
}
}.bind(this)
);
},
close: function () {
close: function() {
if (this.$modal) {
var draggable = this.$modal.draggable("instance");
if (draggable) {
@@ -51,20 +52,18 @@ odoo.define('web_dialog_size.web_dialog_size', function (require) {
return this._super.apply(this, arguments);
},
_extending: function () {
var dialog = this.$modal.find('.modal-dialog');
dialog.addClass('dialog_full_screen');
dialog.find('.dialog_button_extend').hide();
dialog.find('.dialog_button_restore').show();
_extending: function() {
var dialog = this.$modal.find(".modal-dialog");
dialog.addClass("dialog_full_screen");
dialog.find(".dialog_button_extend").hide();
dialog.find(".dialog_button_restore").show();
},
_restore: function () {
var dialog = this.$modal.find('.modal-dialog');
dialog.removeClass('dialog_full_screen');
dialog.find('.dialog_button_restore').hide();
dialog.find('.dialog_button_extend').show();
_restore: function() {
var dialog = this.$modal.find(".modal-dialog");
dialog.removeClass("dialog_full_screen");
dialog.find(".dialog_button_restore").hide();
dialog.find(".dialog_button_extend").show();
},
});
});