rebasing on master

This commit is contained in:
Amine Ben hammou
2017-09-27 12:29:19 +00:00
parent c29dc8b4c7
commit 4e2e9f6f8f
38 changed files with 249 additions and 249 deletions

View File

@@ -115,9 +115,9 @@ define('modal', ['mailpoet', 'jquery'],
return window.Handlebars.compile(template);
}
},
init: function(options) {
init: function (options) {
var modal;
if(this.initialized === true) {
if (this.initialized === true) {
this.close();
}
// merge options
@@ -134,7 +134,7 @@ define('modal', ['mailpoet', 'jquery'],
if (this.options.type !== null) {
// insert modal depending on its type
if(this.options.type === 'popup') {
if (this.options.type === 'popup') {
modal = this.compileTemplate(
this.templates[this.options.type]
);
@@ -179,8 +179,8 @@ define('modal', ['mailpoet', 'jquery'],
return this;
},
initOverlay: function() {
if(jQuery('#mailpoet_modal_overlay').length === 0) {
initOverlay: function () {
if (jQuery('#mailpoet_modal_overlay').length === 0) {
// insert overlay into the DOM
jQuery('body').append(this.templates.overlay);
// insert loading indicator into overlay
@@ -343,12 +343,12 @@ define('modal', ['mailpoet', 'jquery'],
return this;
},
setPosition: function() {
setPosition: function () {
var screenWidth;
var screenHeight;
var modalWidth;
var modalHeight;
switch(this.options.type) {
switch (this.options.type) {
case 'popup':
screenWidth = jQuery(window).width();
screenHeight = jQuery(window).height();
@@ -438,7 +438,7 @@ define('modal', ['mailpoet', 'jquery'],
.removeClass('mailpoet_modal_highlight');
return this;
},
hideModal: function() {
hideModal: function () {
// set modal as closed
this.opened = false;
@@ -453,7 +453,7 @@ define('modal', ['mailpoet', 'jquery'],
return this;
},
showOverlay: function() {
showOverlay: function () {
jQuery('#mailpoet_modal_overlay').show();
return this;
},