Changeset 437

Show
Ignore:
Timestamp:
07/09/08 19:45:49 (21 months ago)
Author:
scott.gonzalez
Message:

Dialog: Use new trigger method from the widget factory.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/ui/ui.dialog.js

    r434 r437  
    268268                this.moveToTop(true); 
    269269                 
    270                 // CALLBACK: open 
    271                 var openEV = this.fakeEvent('dialogopen'); 
    272                 var openUI = { 
    273                         options: this.options 
    274                 }; 
    275                 this.uiDialogTitlebarClose.focus(); 
    276                 this.element.triggerHandler("dialogopen", [openEV, openUI], this.options.open); 
    277                  
     270                this.trigger('open', null, { options: this.options }); 
    278271                this.isOpen = true; 
    279272        }, 
     
    285278                if ((this.options.modal && !force) 
    286279                        || (!this.options.stack && !this.options.modal)) { 
    287                         return this.element.triggerHandler("dialogfocus", 
    288                                 [this.fakeEvent('dialogfocus'), { options: this.options }], 
    289                                 this.options.focus); 
     280                        return this.trigger('focus', null, { options: this.options }); 
    290281                } 
    291282                 
     
    297288                this.uiDialog.css('z-index', ++maxZ); 
    298289                 
    299                 this.element.triggerHandler("dialogfocus", 
    300                         [this.fakeEvent('dialogfocus'), { options: this.options }], 
    301                         this.options.focus); 
     290                this.trigger('focus', null, { options: this.options }); 
    302291        }, 
    303292         
     
    305294                (this.overlay && this.overlay.destroy()); 
    306295                this.uiDialog.hide(this.options.hide); 
    307  
    308                 // CALLBACK: close 
    309                 var closeEV = this.fakeEvent('dialogclose'); 
    310                 var closeUI = { 
    311                         options: this.options 
    312                 }; 
    313                 this.element.triggerHandler("dialogclose", [closeEV, closeUI], this.options.close); 
     296                 
     297                this.trigger('close', null, { options: this.options }); 
    314298                $.ui.dialog.overlay.resize(); 
    315299