ES5 space-before-blocks

This commit is contained in:
Amine Ben hammou
2017-09-21 09:02:50 +00:00
parent 1f9bd04308
commit 946bee2194
7 changed files with 6 additions and 7 deletions

View File

@ -36,7 +36,6 @@
"array-bracket-spacing": 0,
"default-case": 0,
"no-lonely-if": 0,
"space-before-blocks": 0,
"no-mixed-operators": 0,
"eqeqeq": 0,
"space-in-parens": 0,

View File

@ -17,7 +17,7 @@
*/
var eventsCache = [];
function track(name, data){
function track(name, data) {
if (typeof window.mixpanel.track !== 'function') {
window.mixpanel.init(window.mixpanelTrackingId);
}

View File

@ -145,7 +145,7 @@ define('date',
var convertedFormat = [];
var escapeToken = false;
for(var index = 0, token = ''; format.charAt(index); index += 1){
for(var index = 0, token = ''; format.charAt(index); index += 1) {
token = format.charAt(index);
if (escapeToken === true) {
convertedFormat.push('['+token+']');

View File

@ -917,7 +917,7 @@ WysijaForm.Block.create = function (createBlock, target) {
if(block.type === 'segment') {
if(block.params.values === undefined) {
var settings_segments = window.jQuery('#mailpoet_form_segments').val();
if(settings_segments !== null && settings_segments.length > 0){
if(settings_segments !== null && settings_segments.length > 0) {
block.params.values = window.mailpoet_segments.filter(function (segment) {
return (settings_segments.indexOf(segment.id) !== -1);
});

View File

@ -28,7 +28,7 @@ define(
coerce_types = { true: !0, false: !1, null: null };
// Iterate over all name=value pairs.
$.each( this.serializeArray(), function (j, v){
$.each( this.serializeArray(), function (j, v) {
var key = v.name,
val = v.value,
cur = obj,

View File

@ -626,7 +626,7 @@ define('modal', ['mailpoet', 'jquery'],
this.destroy();
// restore the previously focused element
if(this.prevFocus !== undefined){
if(this.prevFocus !== undefined) {
this.prevFocus.focus();
}

View File

@ -300,7 +300,7 @@ define([
},
onPostsScroll: function (event) {
var $postsBox = jQuery(event.target);
if($postsBox.scrollTop() + $postsBox.innerHeight() >= $postsBox[0].scrollHeight){
if($postsBox.scrollTop() + $postsBox.innerHeight() >= $postsBox[0].scrollHeight) {
// Load more posts if scrolled to bottom
this.blockModel.trigger('loadMorePosts');
}