aboutsummaryrefslogtreecommitdiffstats
path: root/ui/ui.dialog.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2008-07-10 02:45:49 +0000
committerScott González <scott.gonzalez@gmail.com>2008-07-10 02:45:49 +0000
commit4f412c60ea8dbf11b9447e838b815214ab3ca1a2 (patch)
tree0a13d3c5e24fcfbd0e026605455e74006f004a83 /ui/ui.dialog.js
parentd70f4f7620b97b119bba5a8cdf8f6fd1d7d5475c (diff)
downloadjquery-ui-4f412c60ea8dbf11b9447e838b815214ab3ca1a2.tar.gz
jquery-ui-4f412c60ea8dbf11b9447e838b815214ab3ca1a2.zip
Dialog: Use new trigger method from the widget factory.
Diffstat (limited to 'ui/ui.dialog.js')
-rw-r--r--ui/ui.dialog.js26
1 files changed, 5 insertions, 21 deletions
diff --git a/ui/ui.dialog.js b/ui/ui.dialog.js
index 83f39b003..663713ad4 100644
--- a/ui/ui.dialog.js
+++ b/ui/ui.dialog.js
@@ -267,14 +267,7 @@ $.widget("ui.dialog", {
(this.options.autoResize && this.size());
this.moveToTop(true);
- // CALLBACK: open
- var openEV = this.fakeEvent('dialogopen');
- var openUI = {
- options: this.options
- };
- this.uiDialogTitlebarClose.focus();
- this.element.triggerHandler("dialogopen", [openEV, openUI], this.options.open);
-
+ this.trigger('open', null, { options: this.options });
this.isOpen = true;
},
@@ -284,9 +277,7 @@ $.widget("ui.dialog", {
if ((this.options.modal && !force)
|| (!this.options.stack && !this.options.modal)) {
- return this.element.triggerHandler("dialogfocus",
- [this.fakeEvent('dialogfocus'), { options: this.options }],
- this.options.focus);
+ return this.trigger('focus', null, { options: this.options });
}
var maxZ = this.options.zIndex, options = this.options;
@@ -296,21 +287,14 @@ $.widget("ui.dialog", {
(this.overlay && this.overlay.$el.css('z-index', ++maxZ));
this.uiDialog.css('z-index', ++maxZ);
- this.element.triggerHandler("dialogfocus",
- [this.fakeEvent('dialogfocus'), { options: this.options }],
- this.options.focus);
+ this.trigger('focus', null, { options: this.options });
},
close: function() {
(this.overlay && this.overlay.destroy());
this.uiDialog.hide(this.options.hide);
-
- // CALLBACK: close
- var closeEV = this.fakeEvent('dialogclose');
- var closeUI = {
- options: this.options
- };
- this.element.triggerHandler("dialogclose", [closeEV, closeUI], this.options.close);
+
+ this.trigger('close', null, { options: this.options });
$.ui.dialog.overlay.resize();
this.isOpen = false;