From 8f4c595f5bfbfe45561d0a016dfd69cadf8e251d Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Fri, 15 Feb 2019 11:08:00 +0000 Subject: [PATCH] [REF] website: remove useless code Part of https://github.com/odoo/odoo/commit/f4ba72a7593b67595852fc52ec0997d3276dbc67 became useless after forward-port in the new editor. Indeed, that commit handled what happened with data-editor-message attributes on save but as the new editor can discard changes without reloading the page, the forward-port of that commit made the code handle the attribute removal on editor *close*. closes odoo/odoo#31143 --- addons/website/static/src/js/menu/edit.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/addons/website/static/src/js/menu/edit.js b/addons/website/static/src/js/menu/edit.js index a3e68873a7b..a67e65f4b9b 100644 --- a/addons/website/static/src/js/menu/edit.js +++ b/addons/website/static/src/js/menu/edit.js @@ -123,19 +123,10 @@ var EditPageMenu = websiteNavbarData.WebsiteNavbarActionWidget.extend({ * expects that the save action is performed. So, this empty action is * defined here so that all users have an 'on_save' related action. * - * As explained above, that action should always be defined in the current - * implementation (even an empty one) but in fact it is also needed to - * remove the data-editor-message attributes which are added when entering - * edition. - * * @private * @todo improve the system to somehow declare required/optional actions */ - _onSave: function () { - if (this.$editorMessageElements) { - this.$editorMessageElements.removeAttr('data-editor-message'); - } - }, + _onSave: function () {}, //-------------------------------------------------------------------------- // Private