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 cabe4eb8cc5..28ac0bd177b 100644 --- a/addons/mass_mailing/static/src/js/mass_mailing_snippets.js +++ b/addons/mass_mailing/static/src/js/mass_mailing_snippets.js @@ -95,36 +95,17 @@ options.registry.mass_mailing_sizing_x = options.Class.extend({ // Adding compatibility for the outlook compliance of mailings. // Commit of such compatibility : a14f89c8663c9cafecb1cc26918055e023ecbe42 -options.registry.BackgroundImage = options.registry.BackgroundImage.extend({ +options.registry.MassMailingBackgroundImage = options.registry.BackgroundImage.extend({ start: function () { this._super(); - if (this.snippets && this.snippets.split('.')[0] === "mass_mailing") { - var $table_target = this.$target.find('table:first'); - if ($table_target.length) { - this.$target = $table_target; - } + const $table_target = this.$target.find('table:first'); + if ($table_target.length) { + this.$target = $table_target; } } }); -options.registry.ImageTools.include({ - - //-------------------------------------------------------------------------- - // Public - //-------------------------------------------------------------------------- - - /** - * @override - */ - async updateUIVisibility() { - await this._super(...arguments); - - // Transform is _very_ badly supported in mail clients. Hide the option. - const transformEl = this.el.querySelector('[data-transform="true"]'); - if (transformEl) { - transformEl.classList.toggle('d-none', true); - } - }, +options.registry.MassMailingImageTools = options.registry.ImageTools.extend({ //-------------------------------------------------------------------------- // Private @@ -138,14 +119,11 @@ options.registry.ImageTools.include({ return color; } const doc = this.options.document; - if (doc && doc.querySelector('.o_mass_mailing_iframe') && !ColorpickerWidget.isCSSColor(color)) { - const tempEl = doc.body.appendChild(doc.createElement('div')); - tempEl.className = `bg-${color}`; - const colorValue = window.getComputedStyle(tempEl).getPropertyValue("background-color").trim(); - tempEl.parentNode.removeChild(tempEl); - return ColorpickerWidget.normalizeCSSColor(colorValue).replace(/"/g, "'"); - } - return this._super(...arguments); + const tempEl = doc.body.appendChild(doc.createElement('div')); + tempEl.className = `bg-${color}`; + const colorValue = window.getComputedStyle(tempEl).getPropertyValue("background-color").trim(); + tempEl.parentNode.removeChild(tempEl); + return ColorpickerWidget.normalizeCSSColor(colorValue).replace(/"/g, "'"); }, }); @@ -402,19 +380,4 @@ options.registry.DesignTab = options.Class.extend({ }, }); -options.registry.Parallax = options.Class.extend({ - - //-------------------------------------------------------------------------- - // Private - //-------------------------------------------------------------------------- - - /** - * @override - */ - async _computeWidgetVisibility(widgetName, params) { - // Parallax is not supported in emails. - return false; - }, -}); - }); diff --git a/addons/mass_mailing/views/snippets_themes.xml b/addons/mass_mailing/views/snippets_themes.xml index 21d34284545..c81fcec1f71 100644 --- a/addons/mass_mailing/views/snippets_themes.xml +++ b/addons/mass_mailing/views/snippets_themes.xml @@ -293,7 +293,31 @@ t-att-data-variable="radius_variable"/> + + + + + + + - - - + diff --git a/addons/web_editor/views/snippets.xml b/addons/web_editor/views/snippets.xml index 250d8f9a8a0..e2324796c56 100644 --- a/addons/web_editor/views/snippets.xml +++ b/addons/web_editor/views/snippets.xml @@ -454,6 +454,7 @@ title="'Title tag' is shown as a tooltip when you hover the picture."/> +
@@ -579,7 +580,7 @@ Reset - + Reset diff --git a/addons/website/views/snippets/s_blockquote.xml b/addons/website/views/snippets/s_blockquote.xml index 63700cef284..3d29ebe2032 100644 --- a/addons/website/views/snippets/s_blockquote.xml +++ b/addons/website/views/snippets/s_blockquote.xml @@ -26,7 +26,7 @@
- + diff --git a/addons/website/views/snippets/s_image_gallery.xml b/addons/website/views/snippets/s_image_gallery.xml index c4eecc806c2..e1971a522cc 100644 --- a/addons/website/views/snippets/s_image_gallery.xml +++ b/addons/website/views/snippets/s_image_gallery.xml @@ -62,7 +62,7 @@ -