ES5 one-var

This commit is contained in:
Amine Ben hammou
2017-09-25 09:39:00 +00:00
parent a11d6d7868
commit c3ea088fca
27 changed files with 584 additions and 593 deletions

View File

@ -345,13 +345,13 @@ define('modal', ['mailpoet', 'jquery'],
setPosition: function () {
switch (this.options.type) {
case 'popup':
var screenWidth = jQuery(window).width(),
screenHeight = jQuery(window).height(),
modalWidth = jQuery('.mailpoet_' + this.options.type + '_wrapper').width(),
modalHeight = jQuery('.mailpoet_' + this.options.type + '_wrapper').height();
var screenWidth = jQuery(window).width();
var screenHeight = jQuery(window).height();
var modalWidth = jQuery('.mailpoet_'+ this.options.type +'_wrapper').width();
var modalHeight = jQuery('.mailpoet_'+ this.options.type +'_wrapper').height();
var top = Math.max(48, parseInt((screenHeight / 2) - (modalHeight / 2))),
left = Math.max(0, parseInt((screenWidth / 2) - (modalWidth / 2)));
var top = Math.max(48, parseInt((screenHeight / 2) - (modalHeight / 2)));
var left = Math.max(0, parseInt((screenWidth / 2) - (modalWidth / 2)));
// set position of popup depending on screen dimensions.
jQuery('#mailpoet_popup').css({