From 889597428ad157edf93914eaea423fcece86a4da Mon Sep 17 00:00:00 2001 From: "Audric Onockx (auon)" Date: Fri, 16 Sep 2022 14:00:49 +0000 Subject: [PATCH] [REM] project: remove unused widget HtmlWithActionWidget was used in Project Updates to handle tags in the html description. Since odoo/odoo#72736 removes all those tags, this widget is no longer needed. closes odoo/odoo#100397 Signed-off-by: Laurent Stukkens (ltu) --- .../src/js/widgets/html_with_action_widget.js | 42 ------------------- addons/project/views/project_update_views.xml | 2 +- 2 files changed, 1 insertion(+), 43 deletions(-) delete mode 100644 addons/project/static/src/js/widgets/html_with_action_widget.js diff --git a/addons/project/static/src/js/widgets/html_with_action_widget.js b/addons/project/static/src/js/widgets/html_with_action_widget.js deleted file mode 100644 index e56a79f712d..00000000000 --- a/addons/project/static/src/js/widgets/html_with_action_widget.js +++ /dev/null @@ -1,42 +0,0 @@ -/** @odoo-module **/ - -import { device } from 'web.config'; -import { bus } from 'web.core'; -import fieldRegistry from 'web.field_registry'; -import FieldHtml from 'web_editor.field.html'; - -export const FieldHtmlWithAction = FieldHtml.extend({ - events: Object.assign({}, FieldHtml.prototype.events, { - 'click a[type="object"]': '_onClickObject' - }), - init() { - this._super(...arguments); - if (!device.isMobile) { - bus.on("DOM_updated", this, () => { - const $editable = this.$el.find('.note-editable'); - if ($editable.length) { - const minHeight = window.innerHeight - $editable.offset().top - 30; - $editable.css('min-height', minHeight + 'px'); - } - }); - } - }, - /** - * Handle the click on a link with object as type - * @param {*} event - */ - _onClickObject: async function (event) { - event.preventDefault(); - const action = await this._rpc({ - model: this.model, - method: event.target.name, - args: [this.res_id], - context: this.record.context, - }); - if (action) { - this.do_action(action); - } - } -}); - -fieldRegistry.add('html_with_action', FieldHtmlWithAction); diff --git a/addons/project/views/project_update_views.xml b/addons/project/views/project_update_views.xml index 0e3627e50e1..cdf2206bb99 100644 --- a/addons/project/views/project_update_views.xml +++ b/addons/project/views/project_update_views.xml @@ -46,7 +46,7 @@ - +