summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/editor
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-07-25 18:38:32 +0200
committerChristophe Simonis <chs@odoo.com>2019-07-25 18:38:32 +0200
commitb82df99d7a86fa3bc2670f00a0ef025263362cda (patch)
tree40e4adacf341e6fe3b441d1272881d0f0738e70e /addons/web_editor/static/src/js/editor
parent7702d07d39eadf700faad67da42bfee10fb0cd93 (diff)
parent5f419d4ad33a56c9c57893b749ab460574481d01 (diff)
[MERGE] forward port branch saas-11.3 up to 5f419d4ad33
Diffstat (limited to 'addons/web_editor/static/src/js/editor')
-rw-r--r--addons/web_editor/static/src/js/editor/snippets.editor.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/editor/snippets.editor.js b/addons/web_editor/static/src/js/editor/snippets.editor.js
index 51beb939648..776d9992bb7 100644
--- a/addons/web_editor/static/src/js/editor/snippets.editor.js
+++ b/addons/web_editor/static/src/js/editor/snippets.editor.js
@@ -340,6 +340,9 @@ var SnippetEditor = Widget.extend({
*/
_onCloneClick: function (ev) {
ev.preventDefault();
+
+ this.trigger_up('snippet_will_be_cloned', {$target: this.$target});
+
var $clone = this.$target.clone(false);
this.trigger_up('request_history_undo_record', {$target: this.$target});
@@ -355,7 +358,7 @@ var SnippetEditor = Widget.extend({
}
},
});
- this.trigger_up('snippet_cloned', {$target: $clone});
+ this.trigger_up('snippet_cloned', {$target: $clone, $origin: this.$target});
},
/**
* Called when the overlay dimensions/positions should be recomputed.