ES5 one-var-declaration-per-line
This commit is contained in:
@ -37,7 +37,6 @@
|
||||
"global-require": 0,
|
||||
"no-throw-literal": 0,
|
||||
"no-extra-bind": 0,
|
||||
"one-var-declaration-per-line": 0,
|
||||
"consistent-return": 0,
|
||||
"no-shadow": 0,
|
||||
"no-underscore-dangle": 0,
|
||||
|
@ -38,9 +38,10 @@ Object.extend(document, (function () {
|
||||
}
|
||||
|
||||
function createWrapper(selector, eventName, handler, context) {
|
||||
var wrapper, c = getWrappersForSelector(selector, eventName);
|
||||
if (c.pluck('handler').include(handler)) return false;
|
||||
wrapper = function (event) {
|
||||
var wrapper,
|
||||
c = getWrappersForSelector(selector, eventName);
|
||||
if(c.pluck('handler').include(handler)) return false;
|
||||
wrapper = function(event) {
|
||||
var element = event.findElement(selector);
|
||||
if (element) handler.call(context || element, event, element);
|
||||
};
|
||||
@ -145,11 +146,12 @@ Object.extend(window.Droppables, {
|
||||
if (drop.onEnter) drop.onEnter(draggable, drop.element);
|
||||
return proceed(drop);
|
||||
}),
|
||||
show: function (point, element) {
|
||||
if (!this.drops.length) return;
|
||||
var drop, affected = [];
|
||||
this.drops.each(function (drop) {
|
||||
if (window.Droppables.isAffected(point, element, drop)) affected.push(drop);
|
||||
show: function(point, element) {
|
||||
if(!this.drops.length) return;
|
||||
var drop,
|
||||
affected = [];
|
||||
this.drops.each(function(drop) {
|
||||
if(window.Droppables.isAffected(point, element, drop)) affected.push(drop);
|
||||
});
|
||||
if (affected.length > 0) drop = window.Droppables.findDeepestChild(affected);
|
||||
if (this.last_active && this.last_active !== drop) this.deactivate(this.last_active, element);
|
||||
|
@ -74,9 +74,15 @@ define([
|
||||
markerHeight = '',
|
||||
containerOffset = element.offset(),
|
||||
viewCollection = that.getCollection(),
|
||||
marker, targetModel, targetView, targetElement,
|
||||
topOffset, leftOffset, isLastBlockInsertion,
|
||||
$targetBlock, margin;
|
||||
marker,
|
||||
targetModel,
|
||||
targetView,
|
||||
targetElement,
|
||||
topOffset,
|
||||
leftOffset,
|
||||
isLastBlockInsertion,
|
||||
$targetBlock,
|
||||
margin;
|
||||
|
||||
if (dropPosition === undefined) return;
|
||||
|
||||
@ -186,7 +192,11 @@ define([
|
||||
),
|
||||
droppableModel = event.draggable.getDropModel(),
|
||||
viewCollection = that.getCollection(),
|
||||
droppedView, droppedModel, index, tempCollection, tempCollection2;
|
||||
droppedView,
|
||||
droppedModel,
|
||||
index,
|
||||
tempCollection,
|
||||
tempCollection2;
|
||||
|
||||
if (dropPosition === undefined) return;
|
||||
|
||||
@ -286,12 +296,16 @@ define([
|
||||
relativeX = eventX - elementPageX,
|
||||
relativeY = eventY - elementPageY,
|
||||
|
||||
relativeOffset, elementLength,
|
||||
relativeOffset,
|
||||
elementLength,
|
||||
|
||||
canAcceptNormalInsertion = this._canAcceptNormalInsertion(),
|
||||
canAcceptSpecialInsertion = this._canAcceptSpecialInsertion(),
|
||||
|
||||
insertionType, index, position, indexAndPosition;
|
||||
insertionType,
|
||||
index,
|
||||
position,
|
||||
indexAndPosition;
|
||||
|
||||
var unsafe = !!is_unsafe;
|
||||
|
||||
@ -364,7 +378,9 @@ define([
|
||||
targetView = this.getChildren().findByModel(this.getCollection().at(index)),
|
||||
orientation = this.view.model.get('orientation'),
|
||||
element = targetView.$el,
|
||||
eventOffset, closeOffset, elementDimension;
|
||||
eventOffset,
|
||||
closeOffset,
|
||||
elementDimension;
|
||||
|
||||
if (orientation === 'vertical') {
|
||||
eventOffset = eventY;
|
||||
@ -398,7 +414,8 @@ define([
|
||||
eventOffset = (orientation === 'vertical') ? eventY : eventX,
|
||||
resultView = this.getChildren().find(function (view) {
|
||||
var element = view.$el,
|
||||
closeOffset, farOffset;
|
||||
closeOffset,
|
||||
farOffset;
|
||||
|
||||
if (orientation === 'vertical') {
|
||||
closeOffset = element.offset().top;
|
||||
|
@ -58,7 +58,9 @@ define([
|
||||
|
||||
$original = jQuery(event.target),
|
||||
$clone = jQuery(clone),
|
||||
centerXOffset, centerYOffset, parentOffset;
|
||||
centerXOffset,
|
||||
centerYOffset,
|
||||
parentOffset;
|
||||
|
||||
$clone.addClass('mailpoet_droppable_active');
|
||||
$clone.css('position', 'absolute');
|
||||
|
@ -67,8 +67,9 @@ define([
|
||||
// and destroy self
|
||||
options.dragBehavior.view.model.destroy();
|
||||
},
|
||||
onDragSubstituteBy: function (behavior) {
|
||||
var WidgetView, node;
|
||||
onDragSubstituteBy: function(behavior) {
|
||||
var WidgetView,
|
||||
node;
|
||||
// When block is being dragged, display the widget icon instead.
|
||||
// This will create an instance of block's widget view and
|
||||
// use it's rendered DOM element instead of the content block
|
||||
|
@ -120,8 +120,9 @@ define([
|
||||
// and destroy self
|
||||
options.dragBehavior.view.model.destroy();
|
||||
},
|
||||
onDragSubstituteBy: function (behavior) {
|
||||
var WidgetView, node;
|
||||
onDragSubstituteBy: function(behavior) {
|
||||
var WidgetView,
|
||||
node;
|
||||
// When block is being dragged, display the widget icon instead.
|
||||
// This will create an instance of block's widget view and
|
||||
// use it's rendered DOM element instead of the content block
|
||||
|
@ -113,7 +113,8 @@ define([
|
||||
// position of the sidebar would be scrollable and not fixed
|
||||
// partially out of visible screen
|
||||
this.$el.parent().each(function () {
|
||||
var calculated_left, self;
|
||||
var calculated_left,
|
||||
self;
|
||||
|
||||
self = jQuery(this);
|
||||
|
||||
|
Reference in New Issue
Block a user