Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit d9fb58c

Browse files
author
Gabriel Schulhof
committed
[popup] Get rid of a bunch of "self" declarations
1 parent b97dec4 commit d9fb58c

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

js/widgets/popup.js

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -505,11 +505,9 @@ define( [ "jquery",
505505
},
506506

507507
_openPrereqsComplete: function() {
508-
var self = this;
509-
510-
self._ui.container.addClass( "ui-popup-active" );
511-
self._isOpen = true;
512-
self._resizeScreen();
508+
this._ui.container.addClass( "ui-popup-active" );
509+
this._isOpen = true;
510+
this._resizeScreen();
513511

514512
// Android appears to trigger the animation complete before the popup
515513
// is visible. Allowing the stack to unwind before applying focus prevents
@@ -614,21 +612,21 @@ define( [ "jquery",
614612
},
615613

616614
_closePrereqsDone: function() {
617-
var self = this, opts = self.options;
615+
var opts = this.options;
618616

619-
self._ui.container.removeAttr( "tabindex" );
617+
this._ui.container.removeAttr( "tabindex" );
620618

621619
// remove nav bindings if they are still present
622620
opts.container.unbind( opts.closeEvents );
623621

624622
// unbind click handlers added when history is disabled
625-
self.element.undelegate( opts.closeLinkSelector, opts.closeLinkEvents );
623+
this.element.undelegate( opts.closeLinkSelector, opts.closeLinkEvents );
626624

627625
// remove the global mutex for popups
628626
$.mobile.popup.active = undefined;
629627

630628
// alert users that the popup is closed
631-
self._trigger( "afterclose" );
629+
this._trigger( "afterclose" );
632630
},
633631

634632
_close: function() {
@@ -683,10 +681,8 @@ define( [ "jquery",
683681
// NOTE the pagebeforechange is bound to catch navigation events that don't
684682
// alter the url (eg, dialogs from popups)
685683
_bindContainerClose: function() {
686-
var self = this;
687-
688-
self.options.container
689-
.one( self.options.closeEvents, $.proxy( self._close, self ));
684+
this.options.container
685+
.one( this.options.closeEvents, $.proxy( this._close, this ));
690686
},
691687

692688
// TODO no clear deliniation of what should be here and

0 commit comments

Comments
 (0)