[FIX] (website_)mass_mailing: restore popup design
Compatibility: rebuilding a correct modal from user database content. Since the first version, the modal is saved in databases directly but has never used a correct structure. While it was working with BS3, it is not with BS4. This was breaking the design and prevented the modal to be able to close. task-1889341 closes odoo/odoo#28589
This commit is contained in:
@@ -152,7 +152,6 @@ fieldset[disabled] #o_newsletter_popup .btn.btn-success.active {
|
||||
}
|
||||
#o_newsletter_popup .o_popup_modal_content {
|
||||
border-radius: 2px;
|
||||
margin: 20px;
|
||||
box-shadow: 0 0 20px rgba(255, 255, 255, 0.11);
|
||||
-webkit-box-shadow: 0 0 20px rgba(255, 255, 255, 0.11);
|
||||
border: 1px solid #767676;
|
||||
|
||||
@@ -67,8 +67,23 @@ sAnimation.registry.newsletter_popup = sAnimation.Class.extend({
|
||||
selector: ".o_newsletter_popup",
|
||||
start: function () {
|
||||
var self = this;
|
||||
|
||||
// Compatibility: rebuilding a correct modal from user database
|
||||
// content. Since the first version, the modal is saved in databases
|
||||
// directly but has never used a correct structure. While it was working
|
||||
// with BS3, it is not with BS4.
|
||||
// TODO review the newsletter popup creation, save and loading.
|
||||
var $modal = this.$('.modal');
|
||||
if ($modal.is('.modal-dialog')) {
|
||||
$modal.removeClass('modal-md modal-dialog');
|
||||
var $modalContent = $modal.find('.modal-content');
|
||||
$modalContent.wrapAll($('<div/>', {class: 'modal-dialog'}));
|
||||
}
|
||||
|
||||
var popupcontent = self.$target.find(".o_popup_content_dev").empty();
|
||||
if (!self.$target.data('list-id')) return;
|
||||
if (!self.$target.data('list-id')) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._rpc({
|
||||
route: '/website_mass_mailing/get_content',
|
||||
|
||||
Reference in New Issue
Block a user