Skip to content
Permalink
Browse files

All: Convert single quotes to double quotes.

  • Loading branch information...
mikesherov committed Dec 25, 2012
1 parent 63d624f commit 74d7eac2daabce0411e98ed9d59dada551cdd911
@@ -8,6 +8,7 @@
"latedef": true,
"noarg": true,
"onevar": true,
"quotmark": "double",
"trailing": true,
"undef": true,
"unused": true,
@@ -69,17 +69,17 @@ $.fn.extend({

scrollParent: function() {
var scrollParent;
if (($.ui.ie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
if (($.ui.ie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) {
scrollParent = this.parents().filter(function() {
return (/(relative|absolute|fixed)/).test($.css(this,'position')) && (/(auto|scroll)/).test($.css(this,'overflow')+$.css(this,'overflow-y')+$.css(this,'overflow-x'));
return (/(relative|absolute|fixed)/).test($.css(this,"position")) && (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));
}).eq(0);
} else {
scrollParent = this.parents().filter(function() {
return (/(auto|scroll)/).test($.css(this,'overflow')+$.css(this,'overflow-y')+$.css(this,'overflow-x'));
return (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));
}).eq(0);
}

return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent;
return (/fixed/).test(this.css("position")) || !scrollParent.length ? $(document) : scrollParent;
},

zIndex: function( zIndex ) {

Large diffs are not rendered by default.

@@ -466,7 +466,7 @@ $.widget( "ui.dialog", {
// .ui-resizable has position: relative defined in the stylesheet
// but dialogs have to use absolute or fixed positioning
position = this.uiDialog.css("position"),
resizeHandles = typeof handles === 'string' ?
resizeHandles = typeof handles === "string" ?
handles :
"n,e,s,w,se,sw,ne,nw";

Large diffs are not rendered by default.

@@ -24,13 +24,13 @@ $.widget("ui.droppable", {
version: "@VERSION",
widgetEventPrefix: "drop",
options: {
accept: '*',
accept: "*",
activeClass: false,
addClasses: true,
greedy: false,
hoverClass: false,
scope: 'default',
tolerance: 'intersect'
scope: "default",
tolerance: "intersect"
},
_create: function() {

@@ -70,7 +70,7 @@ $.widget("ui.droppable", {

_setOption: function(key, value) {

if(key === 'accept') {
if(key === "accept") {
this.accept = $.isFunction(value) ? value : function(d) {
return d.is(value);
};
@@ -84,7 +84,7 @@ $.widget("ui.droppable", {
this.element.addClass(this.options.activeClass);
}
if(draggable){
this._trigger('activate', event, this.ui(draggable));
this._trigger("activate", event, this.ui(draggable));
}
},

@@ -94,7 +94,7 @@ $.widget("ui.droppable", {
this.element.removeClass(this.options.activeClass);
}
if(draggable){
this._trigger('deactivate', event, this.ui(draggable));
this._trigger("deactivate", event, this.ui(draggable));
}
},

@@ -111,7 +111,7 @@ $.widget("ui.droppable", {
if(this.options.hoverClass) {
this.element.addClass(this.options.hoverClass);
}
this._trigger('over', event, this.ui(draggable));
this._trigger("over", event, this.ui(draggable));
}

},
@@ -129,7 +129,7 @@ $.widget("ui.droppable", {
if(this.options.hoverClass) {
this.element.removeClass(this.options.hoverClass);
}
this._trigger('out', event, this.ui(draggable));
this._trigger("out", event, this.ui(draggable));
}

},
@@ -145,7 +145,7 @@ $.widget("ui.droppable", {
}

this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function() {
var inst = $.data(this, 'ui-droppable');
var inst = $.data(this, "ui-droppable");
if(
inst.options.greedy &&
!inst.options.disabled &&
@@ -165,7 +165,7 @@ $.widget("ui.droppable", {
if(this.options.hoverClass) {
this.element.removeClass(this.options.hoverClass);
}
this._trigger('drop', event, this.ui(draggable));
this._trigger("drop", event, this.ui(draggable));
return this.element;
}

@@ -197,18 +197,18 @@ $.ui.intersect = function(draggable, droppable, toleranceMode) {
t = droppable.offset.top, b = t + droppable.proportions.height;

switch (toleranceMode) {
case 'fit':
case "fit":
return (l <= x1 && x2 <= r && t <= y1 && y2 <= b);
case 'intersect':
case "intersect":
return (l < x1 + (draggable.helperProportions.width / 2) && // Right Half
x2 - (draggable.helperProportions.width / 2) < r && // Left Half
t < y1 + (draggable.helperProportions.height / 2) && // Bottom Half
y2 - (draggable.helperProportions.height / 2) < b ); // Top Half
case 'pointer':
case "pointer":
draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left);
draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top);
return isOverAxis( draggableTop, t, droppable.proportions.height ) && isOverAxis( draggableLeft, l, droppable.proportions.width );
case 'touch':
case "touch":
return (
(y1 >= t && y1 <= b) || // Top edge touching
(y2 >= t && y2 <= b) || // Bottom edge touching
@@ -229,7 +229,7 @@ $.ui.intersect = function(draggable, droppable, toleranceMode) {
*/
$.ui.ddmanager = {
current: null,
droppables: { 'default': [] },
droppables: { "default": [] },
prepareOffsets: function(t, event) {

var i, j,
@@ -314,37 +314,37 @@ $.ui.ddmanager = {

var parentInstance, scope, parent,
intersects = $.ui.intersect(draggable, this, this.options.tolerance),
c = !intersects && this.isover ? 'isout' : (intersects && !this.isover ? 'isover' : null);
c = !intersects && this.isover ? "isout" : (intersects && !this.isover ? "isover" : null);
if(!c) {
return;
}

if (this.options.greedy) {
// find droppable parents with same scope
scope = this.options.scope;
parent = this.element.parents(':data(ui-droppable)').filter(function () {
return $.data(this, 'ui-droppable').options.scope === scope;
parent = this.element.parents(":data(ui-droppable)").filter(function () {
return $.data(this, "ui-droppable").options.scope === scope;
});

if (parent.length) {
parentInstance = $.data(parent[0], 'ui-droppable');
parentInstance.greedyChild = (c === 'isover');
parentInstance = $.data(parent[0], "ui-droppable");
parentInstance.greedyChild = (c === "isover");
}
}

// we just moved into a greedy child
if (parentInstance && c === 'isover') {
if (parentInstance && c === "isover") {
parentInstance.isover = false;
parentInstance.isout = true;
parentInstance._out.call(parentInstance, event);
}

this[c] = true;
this[c === 'isout' ? 'isover' : 'isout'] = false;
this[c === "isout" ? "isover" : "isout"] = false;
this[c === "isover" ? "_over" : "_out"].call(this, event);

// we just moved out of a greedy child
if (parentInstance && c === 'isout') {
if (parentInstance && c === "isout") {
parentInstance.isout = false;
parentInstance.isover = true;
parentInstance._over.call(parentInstance, event);
@@ -28,7 +28,7 @@ $.effects.effect.transfer = function( o, done ) {
width: target.innerWidth()
},
startPosition = elem.offset(),
transfer = $( '<div class="ui-effects-transfer"></div>' )
transfer = $( "<div class='ui-effects-transfer'></div>" )
.appendTo( document.body )
.addClass( o.className )
.css({
@@ -818,7 +818,7 @@ $.effects.animateClass = function( value, duration, easing, callback ) {
$.each( arguments, function() {
var el = this.el;
$.each( this.diff, function(key) {
el.css( key, '' );
el.css( key, "" );
});
});

@@ -21,20 +21,20 @@ $( document ).mouseup( function() {
$.widget("ui.mouse", {
version: "@VERSION",
options: {
cancel: 'input,textarea,button,select,option',
cancel: "input,textarea,button,select,option",
distance: 1,
delay: 0
},
_mouseInit: function() {
var that = this;

this.element
.bind('mousedown.'+this.widgetName, function(event) {
.bind("mousedown."+this.widgetName, function(event) {
return that._mouseDown(event);
})
.bind('click.'+this.widgetName, function(event) {
if (true === $.data(event.target, that.widgetName + '.preventClickEvent')) {
$.removeData(event.target, that.widgetName + '.preventClickEvent');
.bind("click."+this.widgetName, function(event) {
if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) {
$.removeData(event.target, that.widgetName + ".preventClickEvent");
event.stopImmediatePropagation();
return false;
}
@@ -46,11 +46,11 @@ $.widget("ui.mouse", {
// TODO: make sure destroying one instance of mouse doesn't mess with
// other instances of mouse
_mouseDestroy: function() {
this.element.unbind('.'+this.widgetName);
this.element.unbind("."+this.widgetName);
if ( this._mouseMoveDelegate ) {
$(document)
.unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
.unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
.unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
.unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
}
},

@@ -88,8 +88,8 @@ $.widget("ui.mouse", {
}

// Click event may never have fired (Gecko & Opera)
if (true === $.data(event.target, this.widgetName + '.preventClickEvent')) {
$.removeData(event.target, this.widgetName + '.preventClickEvent');
if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) {
$.removeData(event.target, this.widgetName + ".preventClickEvent");
}

// these delegates are required to keep context
@@ -100,8 +100,8 @@ $.widget("ui.mouse", {
return that._mouseUp(event);
};
$(document)
.bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
.bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
.bind("mousemove."+this.widgetName, this._mouseMoveDelegate)
.bind("mouseup."+this.widgetName, this._mouseUpDelegate);

event.preventDefault();

@@ -131,14 +131,14 @@ $.widget("ui.mouse", {

_mouseUp: function(event) {
$(document)
.unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
.unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
.unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
.unbind("mouseup."+this.widgetName, this._mouseUpDelegate);

if (this._mouseStarted) {
this._mouseStarted = false;

if (event.target === this._mouseDownEvent.target) {
$.data(event.target, this.widgetName + '.preventClickEvent', true);
$.data(event.target, this.widgetName + ".preventClickEvent", true);
}

this._mouseStop(event);

0 comments on commit 74d7eac

Please sign in to comment.
You can’t perform that action at this time.