]> source.dussan.org Git - jquery-ui.git/commitdiff
Demos, Tests: Remove use 'that' instead of 'self'. Partial fix for #5404 - remove...
authorScott González <scott.gonzalez@gmail.com>
Sun, 12 Feb 2012 14:14:36 +0000 (09:14 -0500)
committerScott González <scott.gonzalez@gmail.com>
Sun, 12 Feb 2012 14:14:36 +0000 (09:14 -0500)
demos/accordion/hoverintent.html
demos/autocomplete/categories.html
demos/autocomplete/combobox.html
tests/jquery.simulate.js
tests/visual/menu/drilldown.html

index 184951cf2e136deedd15c3b542dcb9eb806131b7..8f628bda8be0f3d25d991f24ca7575c4ededdede 100644 (file)
@@ -29,7 +29,7 @@
                        $( this ).unbind( "mouseover", jQuery.event.special.hoverintent.handler );
                },
                handler: function( event ) {
-                       var self = this,
+                       var that = this,
                                args = arguments,
                                target = $( event.target ),
                                cX, cY, pX, pY;
@@ -54,7 +54,7 @@
                                        // is fired asynchronously and the old event is no longer
                                        // usable (#6028)
                                        event.originalEvent = {};
-                                       jQuery.event.handle.apply( self, args );
+                                       jQuery.event.handle.apply( that, args );
                                } else {
                                        pX = cX;
                                        pY = cY;
index 2eead8ad2e0c80c5faf65c5487707a32d8c90773..90286747807609fc78022362392e95262665557a 100644 (file)
        <script>
        $.widget( "custom.catcomplete", $.ui.autocomplete, {
                _renderMenu: function( ul, items ) {
-                       var self = this,
+                       var that = this,
                                currentCategory = "";
                        $.each( items, function( index, item ) {
                                if ( item.category != currentCategory ) {
                                        ul.append( "<li class='ui-autocomplete-category'>" + item.category + "</li>" );
                                        currentCategory = item.category;
                                }
-                               self._renderItem( ul, item );
+                               that._renderItem( ul, item );
                        });
                }
        });
index aeaee5c4c50da26d4d410278180fba8ca0934303..27ef92d4e392ffdc6065c0e6a5bbf01501e34e05 100644 (file)
@@ -29,7 +29,7 @@
        (function( $ ) {
                $.widget( "ui.combobox", {
                        _create: function() {
-                               var self = this,
+                               var that = this,
                                        select = this.element.hide(),
                                        selected = select.children( ":selected" ),
                                        value = selected.val() ? selected.text() : "";
@@ -85,7 +85,7 @@
                                                },
                                                select: function( event, ui ) {
                                                        ui.item.option.selected = true;
-                                                       self._trigger( "selected", event, {
+                                                       that._trigger( "selected", event, {
                                                                item: ui.item.option
                                                        });
                                                },
index a8740e6b8b7b83185913ee48432a5a8b45e984a1..43614dd0a04f04715975a6e34561973d805cc45b 100644 (file)
@@ -157,8 +157,7 @@ $.extend( $.simulate.prototype, {
        },
 
        drag: function( el ) {
-               var self = this,
-                       center = this.findCenter(this.target),
+               var center = this.findCenter(this.target),
                        options = this.options,
                        x = Math.floor( center.x ),
                        y = Math.floor( center.y ), 
index a2ae9e88ff4bcaf5166596a75c353584fe7c8ad0..781f5d88a759f8483da6c019b31afde54399fb8d 100644 (file)
@@ -21,7 +21,7 @@
                
                $.widget("ui.drilldown", {
                        _init: function() {
-                               var self = this;
+                               var that = this;
                                this.active = this.element.find(">ul").attr("tabindex", 0);
                                
                                // hide submenus and create indicator icons
                                        // disable built-in key handling
                                        input: $(),
                                        focus: function(event, ui) {
-                                               self.activeItem = ui.item;
+                                               that.activeItem = ui.item;
                                        },
                                        select: function(event, ui) {
-                                               if (this != self.active[0]) {
+                                               if (this != that.active[0]) {
                                                        return;
                                                }
                                                var nested = $(">ul", ui.item);
                                                if (nested.length) {
-                                                       self._open(nested);
+                                                       that._open(nested);
                                                } else {
-                                                       self.element.find("h3").text(ui.item.text());
-                                                       self.options.select.apply(this, arguments);
+                                                       that.element.find("h3").text(ui.item.text());
+                                                       that.options.select.apply(this, arguments);
                                                }
                                        }
                                });
@@ -52,7 +52,7 @@
                                                primary: "ui-icon-carat-1-w"
                                        }
                                }).click(function() {
-                                       self.up();
+                                       that.up();
                                        return false;
                                }).hide();
                        },