aboutsummaryrefslogtreecommitdiffstats
path: root/ui/ui.dialog.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2008-08-12 17:06:25 +0000
committerScott González <scott.gonzalez@gmail.com>2008-08-12 17:06:25 +0000
commitb89bb4b1605dc6aeb3c0f0e0e4bfd1b518e7b4ca (patch)
tree6bf890d45c7c12e1988700d8a1a28ec34173e8ca /ui/ui.dialog.js
parent8e2a8e7d855b92072c9ebe83aad677e9da3f8d28 (diff)
downloadjquery-ui-b89bb4b1605dc6aeb3c0f0e0e4bfd1b518e7b4ca.tar.gz
jquery-ui-b89bb4b1605dc6aeb3c0f0e0e4bfd1b518e7b4ca.zip
Dialog: Added isOpen method.
Diffstat (limited to 'ui/ui.dialog.js')
-rw-r--r--ui/ui.dialog.js14
1 files changed, 10 insertions, 4 deletions
diff --git a/ui/ui.dialog.js b/ui/ui.dialog.js
index 33db6ea1f..26c7370cf 100644
--- a/ui/ui.dialog.js
+++ b/ui/ui.dialog.js
@@ -160,7 +160,7 @@ $.widget("ui.dialog", {
}
this.createButtons(options.buttons);
- this.isOpen = false;
+ this._isOpen = false;
(options.bgiframe && $.fn.bgiframe && uiDialog.bgiframe());
(options.autoOpen && this.open());
@@ -260,7 +260,7 @@ $.widget("ui.dialog", {
},
open: function() {
- if (this.isOpen) { return; }
+ if (this._isOpen) { return; }
this.overlay = this.options.modal ? new $.ui.dialog.overlay(this) : null;
(this.uiDialog.next().length && this.uiDialog.appendTo('body'));
@@ -270,7 +270,7 @@ $.widget("ui.dialog", {
this.moveToTop(true);
this.trigger('open', null, { options: this.options });
- this.isOpen = true;
+ this._isOpen = true;
},
// the force parameter allows us to move modal dialogs to their correct
@@ -299,7 +299,7 @@ $.widget("ui.dialog", {
this.trigger('close', null, { options: this.options });
$.ui.dialog.overlay.resize();
- this.isOpen = false;
+ this._isOpen = false;
},
destroy: function() {
@@ -331,6 +331,10 @@ $.widget("ui.dialog", {
.appendTo(uiDialogButtonPane);
});
}
+ },
+
+ isOpen: function() {
+ return this._isOpen;
}
});
@@ -354,6 +358,8 @@ $.extend($.ui.dialog, {
zIndex: 1000
},
+ getter: 'isOpen',
+
overlay: function(dialog) {
this.$el = $.ui.dialog.overlay.create(dialog);
}