aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-05-09 16:07:49 -0400
committerScott González <scott.gonzalez@gmail.com>2012-05-09 20:20:15 -0400
commit71c0562f5187f27c868eab5ba7e0bc519c02d54a (patch)
tree8288c8093bb16406229bc060d9a89bafc58c024e
parent84c8ba014e4dc51d136d8a8856f6f88bb1a6f2ad (diff)
downloadjquery-ui-71c0562f5187f27c868eab5ba7e0bc519c02d54a.tar.gz
jquery-ui-71c0562f5187f27c868eab5ba7e0bc519c02d54a.zip
Selectable: Remove uses of self var; use that var.
-rw-r--r--ui/jquery.ui.selectable.js28
1 files changed, 14 insertions, 14 deletions
diff --git a/ui/jquery.ui.selectable.js b/ui/jquery.ui.selectable.js
index 3244e654e..f8a0134f8 100644
--- a/ui/jquery.ui.selectable.js
+++ b/ui/jquery.ui.selectable.js
@@ -24,7 +24,7 @@ $.widget("ui.selectable", $.ui.mouse, {
tolerance: 'touch'
},
_create: function() {
- var self = this;
+ var that = this;
this.element.addClass("ui-selectable");
@@ -33,7 +33,7 @@ $.widget("ui.selectable", $.ui.mouse, {
// cache selectee children based on filter
var selectees;
this.refresh = function() {
- selectees = $(self.options.filter, self.element[0]);
+ selectees = $(that.options.filter, that.element[0]);
selectees.addClass("ui-selectee");
selectees.each(function() {
var $this = $(this);
@@ -75,7 +75,7 @@ $.widget("ui.selectable", $.ui.mouse, {
},
_mouseStart: function(event) {
- var self = this;
+ var that = this;
this.opos = [event.pageX, event.pageY];
@@ -110,7 +110,7 @@ $.widget("ui.selectable", $.ui.mouse, {
selectee.$element.addClass('ui-unselecting');
selectee.unselecting = true;
// selectable UNSELECTING callback
- self._trigger("unselecting", event, {
+ that._trigger("unselecting", event, {
unselecting: selectee.element
});
}
@@ -128,11 +128,11 @@ $.widget("ui.selectable", $.ui.mouse, {
selectee.selected = doSelect;
// selectable (UN)SELECTING callback
if (doSelect) {
- self._trigger("selecting", event, {
+ that._trigger("selecting", event, {
selecting: selectee.element
});
} else {
- self._trigger("unselecting", event, {
+ that._trigger("unselecting", event, {
unselecting: selectee.element
});
}
@@ -143,7 +143,7 @@ $.widget("ui.selectable", $.ui.mouse, {
},
_mouseDrag: function(event) {
- var self = this;
+ var that = this;
this.dragged = true;
if (this.options.disabled)
@@ -159,7 +159,7 @@ $.widget("ui.selectable", $.ui.mouse, {
this.selectees.each(function() {
var selectee = $.data(this, "selectable-item");
//prevent helper from being selected if appendTo: selectable
- if (!selectee || selectee.element == self.element[0])
+ if (!selectee || selectee.element == that.element[0])
return;
var hit = false;
if (options.tolerance == 'touch') {
@@ -182,7 +182,7 @@ $.widget("ui.selectable", $.ui.mouse, {
selectee.$element.addClass('ui-selecting');
selectee.selecting = true;
// selectable SELECTING callback
- self._trigger("selecting", event, {
+ that._trigger("selecting", event, {
selecting: selectee.element
});
}
@@ -202,7 +202,7 @@ $.widget("ui.selectable", $.ui.mouse, {
selectee.unselecting = true;
}
// selectable UNSELECTING callback
- self._trigger("unselecting", event, {
+ that._trigger("unselecting", event, {
unselecting: selectee.element
});
}
@@ -215,7 +215,7 @@ $.widget("ui.selectable", $.ui.mouse, {
selectee.$element.addClass('ui-unselecting');
selectee.unselecting = true;
// selectable UNSELECTING callback
- self._trigger("unselecting", event, {
+ that._trigger("unselecting", event, {
unselecting: selectee.element
});
}
@@ -227,7 +227,7 @@ $.widget("ui.selectable", $.ui.mouse, {
},
_mouseStop: function(event) {
- var self = this;
+ var that = this;
this.dragged = false;
@@ -238,7 +238,7 @@ $.widget("ui.selectable", $.ui.mouse, {
selectee.$element.removeClass('ui-unselecting');
selectee.unselecting = false;
selectee.startselected = false;
- self._trigger("unselected", event, {
+ that._trigger("unselected", event, {
unselected: selectee.element
});
});
@@ -248,7 +248,7 @@ $.widget("ui.selectable", $.ui.mouse, {
selectee.selecting = false;
selectee.selected = true;
selectee.startselected = true;
- self._trigger("selected", event, {
+ that._trigger("selected", event, {
selected: selectee.element
});
});