Fix popup dimensions to the viewport and show the close button

This commit is contained in:
Amine Ben hammou
2017-08-11 17:27:07 +00:00
parent f35b66b3cf
commit b92329a6b5
4 changed files with 654 additions and 650 deletions

View File

@@ -45,7 +45,6 @@ body.mailpoet_modal_opened
position: absolute position: absolute
z-index: 25 z-index: 25
top: 48px top: 48px
padding-bottom: 48px
margin: 0 margin: 0
.mailpoet_popup_wrapper .mailpoet_popup_wrapper
@@ -54,6 +53,7 @@ body.mailpoet_modal_opened
position: relative position: relative
width: 100% width: 100%
z-index: 0 z-index: 0
height: 96%
.mailpoet_overlay_hidden .mailpoet_popup_wrapper .mailpoet_overlay_hidden .mailpoet_popup_wrapper
border: 1px solid #333 border: 1px solid #333
@@ -75,6 +75,7 @@ body.mailpoet_modal_opened
.mailpoet_popup_body .mailpoet_popup_body
padding: 10px 10px 10px 10px padding: 10px 10px 10px 10px
height: 92%
// modal panel // modal panel
#mailpoet_modal_overlay.mailpoet_panel_overlay #mailpoet_modal_overlay.mailpoet_panel_overlay

View File

@@ -127,9 +127,6 @@ body
background-color: $primary-background-color background-color: $primary-background-color
border: 1px solid $content-border-color border: 1px solid $content-border-color
#mailpoet_modal_close
display: none
.wrap > .mailpoet_notice, .wrap > .mailpoet_notice,
.notice .notice
.update-nag .update-nag

File diff suppressed because it is too large Load Diff

View File

@@ -272,10 +272,13 @@ define([
}); });
var view = this.previewView.render(); var view = this.previewView.render();
this.previewView.$el.css('height', '100%');
MailPoet.Modal.popup({ MailPoet.Modal.popup({
template: '', template: '',
element: this.previewView.$el, element: this.previewView.$el,
width: '95%',
height: '94%',
title: MailPoet.I18n.t('newsletterPreview'), title: MailPoet.I18n.t('newsletterPreview'),
onCancel: function() { onCancel: function() {
this.previewView.destroy(); this.previewView.destroy();
@@ -340,8 +343,10 @@ define([
getTemplate: function() { return templates.newsletterPreview; }, getTemplate: function() { return templates.newsletterPreview; },
initialize: function(options) { initialize: function(options) {
this.previewUrl = options.previewUrl; this.previewUrl = options.previewUrl;
this.width = App.getConfig().get('newsletterPreview.width'); this.width = '100%';
this.height = App.getConfig().get('newsletterPreview.height') this.height = '100%';
// this.width = App.getConfig().get('newsletterPreview.width');
// this.height = App.getConfig().get('newsletterPreview.height')
}, },
templateContext: function() { templateContext: function() {
return { return {