]> source.dussan.org Git - jquery-ui.git/commitdiff
Selectable: Remove uses of self var; use that var.
authorScott González <scott.gonzalez@gmail.com>
Wed, 9 May 2012 20:07:49 +0000 (16:07 -0400)
committerScott González <scott.gonzalez@gmail.com>
Thu, 10 May 2012 00:20:15 +0000 (20:20 -0400)
ui/jquery.ui.selectable.js

index 3244e654e32b814dcc1600d178b8625f04c68520..f8a0134f84a1ce0257a9e465fac61b1fb8d1a716 100644 (file)
@@ -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
                        });
                });