diff --git a/addons/mass_mailing/static/src/js/mass_mailing_snippets.js b/addons/mass_mailing/static/src/js/mass_mailing_snippets.js index cd6b2a2d232..b4c4cae9a62 100644 --- a/addons/mass_mailing/static/src/js/mass_mailing_snippets.js +++ b/addons/mass_mailing/static/src/js/mass_mailing_snippets.js @@ -81,52 +81,6 @@ options.registry.mass_mailing_sizing_x = options.Class.extend({ }, }); -options.registry.mass_mailing_table_item = options.Class.extend({ - onClone: function (options) { - this._super.apply(this, arguments); - - // If we cloned a td or th element... - if (options.isCurrent && this.$target.is("td, th")) { - // ... and that the td or th element was alone on its row ... - if (this.$target.siblings().length === 1) { - var $tr = this.$target.parent(); - $tr.clone().empty().insertAfter($tr).append(this.$target); // ... move the clone in a new row instead - return; - } - - // ... if not, if the clone neighbor is an empty cell, remove this empty cell (like if the clone content had been put in that cell) - var $next = this.$target.next(); - if ($next.length && $next.text().trim() === "") { - $next.remove(); - return; - } - - // ... if not, insert an empty col in each other row, at the index of the clone - var width = this.$target.width(); - var $trs = this.$target.closest("table").children("thead, tbody, tfoot").addBack().children("tr").not(this.$target.parent()); - _.each($trs.children(":nth-child(" + this.$target.index() + ")"), function (col) { - $(col).after($("