From bbf93a80858271b0ebb4760e2b6766313de15225 Mon Sep 17 00:00:00 2001 From: Samuel Degueldre Date: Mon, 23 Dec 2019 13:37:55 +0000 Subject: [PATCH] [FIX] website: fix snippet animations not being destroyed before clone In a80775ce3c7d, some code was refactored to stop using the confusing 'animation' denomination, as in reality they were just public facing widgets that did many things, such as loading data based on data-attributes and other things that were not always animation related. One instance of the animation_stop_demand event was not renamed in the _onSnippetWillBeCloned method, which creates some problems, one of which being that the facebook snippet's iframe wouldn't be destroyed on clone, but since the animation was started after the clone, this would result in one facebook page snippet with two iframes with the facebook page, for a total of 3 instead of 2, and one of these was unconfigurable. This commit renames the event to restore the proper behavior. closes odoo/odoo#42311 X-original-commit: 2a671f47f87e2bb52a5fade11ea6b79070516694 Signed-off-by: Quentin Smetz (qsm) --- addons/website/static/src/js/menu/edit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website/static/src/js/menu/edit.js b/addons/website/static/src/js/menu/edit.js index 7e113516a17..e9bd7d83527 100644 --- a/addons/website/static/src/js/menu/edit.js +++ b/addons/website/static/src/js/menu/edit.js @@ -209,7 +209,7 @@ var EditPageMenu = websiteNavbarData.WebsiteNavbarActionWidget.extend({ * @param {OdooEvent} ev */ _onSnippetWillBeCloned: function (ev) { - this.trigger_up('animation_stop_demand', { + this.trigger_up('widgets_stop_request', { $target: ev.data.$target, }); },