moving width to css

This commit is contained in:
Amine Ben hammou
2018-01-29 15:58:18 +00:00
parent 7361613bba
commit 43fbbca050
4 changed files with 992 additions and 81 deletions

View File

@@ -29,3 +29,5 @@
@require 'mp2migrator'
@require '../../../node_modules/react-confirm-alert/src/react-confirm-alert.css'
@require 'newsletter_templates'

View File

@@ -0,0 +1,7 @@
@require 'newsletter_editor/variables'
.mailpoet_template_iframe
position: absolute
z-index: -9999
width: $newsletter-width
max-width: $newsletter-width

View File

@@ -92,10 +92,8 @@ define(
},
saveTemplate: function (response, done) {
const iframe = document.createElement('iframe');
iframe.width = 660;
iframe.src = response.meta.preview_url;
iframe.onload = () => {
setTimeout(() => {
html2canvas(iframe.contentDocument.documentElement).then((thumbnail) => {
document.body.removeChild(iframe);
MailPoet.Ajax.post({
@@ -112,10 +110,9 @@ define(
},
}).then(done).fail(this.showError);
});
}, 500);
};
// just to hide the iframe
iframe.style.cssText ='position: absolute; opacity:0; z-index: -9999';
iframe.className ='mailpoet_template_iframe';
document.body.appendChild(iframe);
},
handleSend: function (e) {

1027
package-lock.json generated

File diff suppressed because it is too large Load Diff