Skip to content
This repository
Browse code

Popup: use widget factory to trigger events

  • Loading branch information...
commit e4b0aca0538004aaaad92594287791c99d101995 1 parent 6ec2690
Jasper de Groot authored August 02, 2012

Showing 1 changed file with 4 additions and 4 deletions. Show diff stats Hide diff stats

  1. 8  js/widgets/popup.js
8  js/widgets/popup.js
@@ -88,7 +88,7 @@ define( [ "jquery",
88 88
 		_resizeTimeout: function() {
89 89
 			if ( !this._maybeRefreshTimeout() ) {
90 90
 				// effectively rapid-open the popup while leaving the screen intact
91  
-				this.element.trigger( "popupbeforeposition" );
  91
+				this._trigger( "beforeposition" );
92 92
 				this._ui.container
93 93
 					.removeClass( "ui-selectmenu-hidden" )
94 94
 					.offset( this._placementCoords( this._desiredCoords( undefined, undefined, "window" ) ) )
@@ -476,7 +476,7 @@ define( [ "jquery",
476 476
 			this._ui.container.addClass( "ui-popup-active" );
477 477
 			this._isOpen = true;
478 478
 			this._ui.container.attr( "tabindex", "0" ).focus();
479  
-			this.element.trigger( "popupafteropen" );
  479
+			this._trigger( "afteropen" );
480 480
 		},
481 481
 
482 482
 		_open: function( options ) {
@@ -489,7 +489,7 @@ define( [ "jquery",
489 489
 			transition = options.transition;
490 490
 
491 491
 			// Give applications a chance to modify the contents of the container before it appears
492  
-			this.element.trigger( "popupbeforeposition" );
  492
+			this._trigger( "beforeposition" );
493 493
 
494 494
 			coords = this._placementCoords( this._desiredCoords( options.x, options.y, options.positionTo || this.options.positionTo || "origin" ) );
495 495
 
@@ -544,7 +544,7 @@ define( [ "jquery",
544 544
 
545 545
 		_closePrereqsDone: function() {
546 546
 			this._ui.container.removeAttr( "tabindex" );
547  
-			this.element.trigger( "popupafterclose" );
  547
+			this._trigger( "afterclose" );
548 548
 		},
549 549
 
550 550
 		_close: function() {

0 notes on commit e4b0aca

Please sign in to comment.
Something went wrong with that request. Please try again.