[IMP] mass_mailing: add extra data to themeParams for custom styling

By adding the `style` attribute to the `.o_layout` element
it can be customized according to the data collected
with `themeParams`, making it possible to add a custom background color
in our template design, for example.

See b7537e1d66b4ca26e12f4be16eb1c30632ecee61

closes odoo/odoo#83701

Signed-off-by: Antoine Guenet <age@odoo.com>
This commit is contained in:
Elisabeth Dickinson
2022-02-28 09:22:23 +00:00
parent a38d2f6ab7
commit 82bf20a700
@@ -269,6 +269,7 @@ var MassMailingFieldHtml = FieldHtml.extend({
}
var $newLayout = $('<div/>', {
class: 'o_layout oe_unremovable oe_unmovable bg-200 ' + themeParams.className,
style: themeParams.layoutStyles,
'data-name': 'Mailing',
}).append($new_wrapper);
@@ -418,7 +419,8 @@ var MassMailingFieldHtml = FieldHtml.extend({
return imagesInfo[filename];
}
return imagesInfo.all;
}
},
layoutStyles: $theme.data('layout-styles'),
};
});
$themes.parent().remove();