[MERGE] forward port branch saas-11.3 up to 5f419d4ad3

This commit is contained in:
Christophe Simonis
2019-07-25 18:38:32 +02:00
7 changed files with 47 additions and 12 deletions
@@ -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.