Fix no-multi-assign in ES5
[MAILPOET-1033]
This commit is contained in:
@ -58,7 +58,6 @@
|
|||||||
"space-in-parens": 0,
|
"space-in-parens": 0,
|
||||||
"semi": 0,
|
"semi": 0,
|
||||||
"max-len": 0,
|
"max-len": 0,
|
||||||
"no-multi-assign": 0,
|
|
||||||
"no-trailing-spaces": 0,
|
"no-trailing-spaces": 0,
|
||||||
"global-require": 0,
|
"global-require": 0,
|
||||||
"no-throw-literal": 0,
|
"no-throw-literal": 0,
|
||||||
|
@ -1052,7 +1052,8 @@ function info(value) {
|
|||||||
var noop = function() {};
|
var noop = function() {};
|
||||||
var methods = ['assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 'markTimeline', 'profile', 'profileEnd', 'markTimeline', 'table', 'time', 'timeEnd', 'timeStamp', 'trace', 'warn'];
|
var methods = ['assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 'markTimeline', 'profile', 'profileEnd', 'markTimeline', 'table', 'time', 'timeEnd', 'timeStamp', 'trace', 'warn'];
|
||||||
var length = methods.length;
|
var length = methods.length;
|
||||||
var console = window.console = {};
|
window.console = {};
|
||||||
|
var console = {};
|
||||||
while(length--) {
|
while(length--) {
|
||||||
console[methods[length]] = noop;
|
console[methods[length]] = noop;
|
||||||
}
|
}
|
||||||
|
@ -74,9 +74,10 @@ define(
|
|||||||
// * Rinse & repeat.
|
// * Rinse & repeat.
|
||||||
for ( ; i <= keys_last; i++ ) {
|
for ( ; i <= keys_last; i++ ) {
|
||||||
key = keys[i] === '' ? cur.length : keys[i];
|
key = keys[i] === '' ? cur.length : keys[i];
|
||||||
cur = cur[key] = i < keys_last
|
cur[key] = i < keys_last
|
||||||
? cur[key] || ( keys[i+1] && isNaN( keys[i+1] ) ? {} : [] )
|
? cur[key] || ( keys[i+1] && isNaN( keys[i+1] ) ? {} : [] )
|
||||||
: val;
|
: val;
|
||||||
|
cur = cur[key];
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -89,9 +89,8 @@ define([
|
|||||||
y = (parseFloat(target.getAttribute('data-y')) || 0) + event.dy;
|
y = (parseFloat(target.getAttribute('data-y')) || 0) + event.dy;
|
||||||
|
|
||||||
// translate the element
|
// translate the element
|
||||||
target.style.webkitTransform =
|
target.style.transform = 'translate(' + x + 'px, ' + y + 'px)';
|
||||||
target.style.transform =
|
target.style.webkitTransform = target.style.transform;
|
||||||
'translate(' + x + 'px, ' + y + 'px)';
|
|
||||||
|
|
||||||
// update the posiion attributes
|
// update the posiion attributes
|
||||||
target.setAttribute('data-x', x);
|
target.setAttribute('data-x', x);
|
||||||
@ -99,7 +98,8 @@ define([
|
|||||||
},
|
},
|
||||||
onend: function (event) {
|
onend: function (event) {
|
||||||
var target = event.target;
|
var target = event.target;
|
||||||
target.style.webkitTransform = target.style.transform = '';
|
target.style.transform = '';
|
||||||
|
target.style.webkitTransform = target.style.transform;
|
||||||
target.removeAttribute('data-x');
|
target.removeAttribute('data-x');
|
||||||
target.removeAttribute('data-y');
|
target.removeAttribute('data-y');
|
||||||
jQuery(event.interaction.element).addClass('mailpoet_droppable_active');
|
jQuery(event.interaction.element).addClass('mailpoet_droppable_active');
|
||||||
|
@ -274,7 +274,7 @@ define([
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var theFrame = this._mediaManager = new MediaManager({
|
var theFrame = new MediaManager({
|
||||||
id: 'mailpoet-media-manager',
|
id: 'mailpoet-media-manager',
|
||||||
frame: 'select',
|
frame: 'select',
|
||||||
title: 'Select image',
|
title: 'Select image',
|
||||||
@ -289,8 +289,9 @@ define([
|
|||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
that = this;
|
that = this;
|
||||||
|
this._mediaManager = theFrame;
|
||||||
|
|
||||||
this._mediaManager.on('insert', function() {
|
this._mediaManager.on('insert', function() {
|
||||||
// Append media manager image selections to Images tab
|
// Append media manager image selections to Images tab
|
||||||
var selection = theFrame.state().get('selection');
|
var selection = theFrame.state().get('selection');
|
||||||
selection.each(function(attachment) {
|
selection.each(function(attachment) {
|
||||||
|
Reference in New Issue
Block a user