- form as an iframe: increased marginY - fixed issue with page titles (old themes using wp_title hook) - redirect on reinstall instead of showing a message (to avoid being able to re-save old settings)
24 lines
471 B
JavaScript
24 lines
471 B
JavaScript
define('iframe', ['mailpoet', 'jquery'], function(MailPoet, jQuery) {
|
|
'use strict';
|
|
MailPoet.Iframe = {
|
|
marginY: 20,
|
|
autoSize: function(iframe) {
|
|
if(!iframe) return;
|
|
|
|
this.setSize(
|
|
iframe,
|
|
iframe.contentWindow.document.body.scrollHeight
|
|
);
|
|
},
|
|
setSize: function(iframe, i) {
|
|
if(!iframe) return;
|
|
|
|
iframe.style.height = (
|
|
parseInt(i) + this.marginY
|
|
) + "px";
|
|
}
|
|
};
|
|
|
|
return MailPoet;
|
|
});
|