Add different rendering for sidebar widget preview type

[MAILPOET-2743]
This commit is contained in:
Rostislav Wolny
2020-04-16 09:31:35 +02:00
committed by Veljko V
parent e7b4ab1dfe
commit 4cb7ba2424
5 changed files with 75 additions and 1 deletions

View File

@@ -214,5 +214,13 @@ jQuery(($) => {
});
$('.mailpoet_captcha_update').on('click', updateCaptcha);
// Display only form on widget preview page
// This should keep element visible and still placed within the content but hide everything else
const widgetPreview = $('#mailpoet_widget_preview');
if (widgetPreview.length) {
$('#mailpoet_widget_preview').siblings().hide();
$('#mailpoet_widget_preview').parents().siblings().hide();
}
});
});