diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-07-25 18:38:32 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-07-25 18:38:32 +0200 |
| commit | b82df99d7a86fa3bc2670f00a0ef025263362cda (patch) | |
| tree | 40e4adacf341e6fe3b441d1272881d0f0738e70e /addons/web_editor/static | |
| parent | 7702d07d39eadf700faad67da42bfee10fb0cd93 (diff) | |
| parent | 5f419d4ad33a56c9c57893b749ab460574481d01 (diff) | |
[MERGE] forward port branch saas-11.3 up to 5f419d4ad33
Diffstat (limited to 'addons/web_editor/static')
| -rw-r--r-- | addons/web_editor/static/src/js/editor/snippets.editor.js | 5 |
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. |
