From 384e516218375000461aa3fcb0ac1b9eaa960fb3 Mon Sep 17 00:00:00 2001 From: Julien Mougenot Date: Tue, 25 Feb 2020 12:52:41 +0000 Subject: [REF] web: Update generic files General cleaning of some helpers and generic files. The idea is that they are less likely to be entirely re-written in the near future so this is a way to keep the code clean, readable and compliant to the current standards. Changes include: - Use of async/await when possible - Use of const/let instead of var - Removal of underscore.js - Use of native JS instead of jQuery when possible The logic of the affected code remains the same. --- addons/web/static/src/js/chrome/action_mixin.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'addons/web/static/src/js/chrome') diff --git a/addons/web/static/src/js/chrome/action_mixin.js b/addons/web/static/src/js/chrome/action_mixin.js index 1ca87c15ef3..a704e5736a0 100644 --- a/addons/web/static/src/js/chrome/action_mixin.js +++ b/addons/web/static/src/js/chrome/action_mixin.js @@ -20,9 +20,9 @@ odoo.define('web.ActionMixin', function (require) { * @module web.ActionMixin */ - var core = require('web.core'); + const core = require('web.core'); - var ActionMixin = { + const ActionMixin = { template: 'Action', /** @@ -79,7 +79,7 @@ odoo.define('web.ActionMixin', function (require) { renderElement: function () { this._super.apply(this, arguments); if (this.contentTemplate) { - var content = core.qweb.render(this.contentTemplate, { widget: this }); + const content = core.qweb.render(this.contentTemplate, { widget: this }); this.$('.o_content').append(content); } }, @@ -223,7 +223,7 @@ odoo.define('web.ActionMixin', function (require) { */ _onGetControllerQueryParams: function (ev) { ev.stopPropagation(); - var state = this.getOwnedQueryParams(); + const state = this.getOwnedQueryParams(); ev.data.callback(state || {}); }, }; -- cgit v1.2.3