ES5 space-before-blocks
This commit is contained in:
@ -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,
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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+']');
|
||||
|
@ -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);
|
||||
});
|
||||
|
@ -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,
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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');
|
||||
}
|
||||
|
Reference in New Issue
Block a user