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($("", {style: "width: " + width + "px;"})); - }); - } - }, - onRemove: function () { - this._super.apply(this, arguments); - - // If we are removing a td or th element which was not alone on its row ... - if (this.$target.is("td, th") && this.$target.siblings().length > 0) { - var $trs = this.$target.closest("table").children("thead, tbody, tfoot").addBack().children("tr").not(this.$target.parent()); - if ($trs.length) { // ... if there are other rows in the table ... - var $last_tds = $trs.children(":last-child"); - if (_.reduce($last_tds, function (memo, td) { return memo + (td.innerHTML || ""); }, "").trim() === "") { - $last_tds.remove(); // ... remove the potential full empty column in the table - } else { - this.$target.parent().append(""); // ... else, if there is no full empty column, append an empty col in the current row - } - } - } - }, -}); - // Adding compatibility for the outlook compliance of mailings. // Commit of such compatibility : a14f89c8663c9cafecb1cc26918055e023ecbe42 options.registry.BackgroundImage = options.registry.BackgroundImage.extend({ diff --git a/addons/mass_mailing/views/snippets_themes.xml b/addons/mass_mailing/views/snippets_themes.xml index 2bc29ff4237..2af82cdf676 100644 --- a/addons/mass_mailing/views/snippets_themes.xml +++ b/addons/mass_mailing/views/snippets_themes.xml @@ -372,10 +372,6 @@ data-selector="img, .mv, .col_mv, td, th" data-exclude=".o_mail_no_resize, .o_mail_no_options"/> -
-