[FIX] mass_mailing: switch to theme images at 1st theme selection
Without this patch, default images for themes are not used automatically in themes' templates when one is chosen for the 1st time. This was not inducing any bug in standard 10.0 but with custom-made templates, you had to put the correct themes images in the defined template. This allows to just `t-call` snippets instead of having to fully hardcode them in theme templates.
This commit is contained in:
@@ -326,7 +326,6 @@ snippets_editor.Class.include({
|
||||
switch_theme.last = theme_params;
|
||||
|
||||
$body.removeClass(all_classes).addClass(theme_params.className);
|
||||
switch_images(theme_params, $editable_area);
|
||||
|
||||
var $old_layout = $editable_area.find(".o_layout");
|
||||
// This wrapper structure is the only way to have a responsive and
|
||||
@@ -349,8 +348,9 @@ snippets_editor.Class.include({
|
||||
$contents = $editable_area.contents();
|
||||
}
|
||||
|
||||
$editable_area.empty().append($new_layout);
|
||||
$new_wrapper_content.append($contents);
|
||||
switch_images(theme_params, $new_wrapper_content);
|
||||
$editable_area.empty().append($new_layout);
|
||||
$old_layout.remove();
|
||||
|
||||
if (first_choice) {
|
||||
|
||||
Reference in New Issue
Block a user