From 156a089a11ab59f80a465cef74a9ebeabf6cf412 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Thu, 4 Aug 2016 14:33:34 +0200 Subject: [PATCH] [FIX] website: properly duplicate FAQ Roller questions /!\ This is a backport from saas-10 When duplicating a question in the FAQ Roller snippet, the cloned question was opening the original answer instead of its own answer. --- addons/website/static/src/js/website.snippets.editor.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/website/static/src/js/website.snippets.editor.js b/addons/website/static/src/js/website.snippets.editor.js index 0da262f145e..aa101feb764 100644 --- a/addons/website/static/src/js/website.snippets.editor.js +++ b/addons/website/static/src/js/website.snippets.editor.js @@ -729,7 +729,9 @@ options.registry.collapse = options.Class.extend(preventParentEmpty).extend({ this.create_ids(this.$target); }, on_clone: function ($clone) { - this._super(); + this._super.apply(this, arguments); + $clone.find('[data-toggle="collapse"]').removeAttr('data-target').removeData('target'); + $clone.find('.panel-collapse').removeAttr('id'); this.create_ids($clone); }, on_move: function () {