diff options
author | Scott González <scott.gonzalez@gmail.com> | 2009-04-15 02:33:28 +0000 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2009-04-15 02:33:28 +0000 |
commit | 1195854aaad61308e7f5339eed54f92284d7666e (patch) | |
tree | 5991992a73f910d897967559332a15bd774816d8 /ui/ui.dialog.js | |
parent | 3c7b61299333d1ec3f4d4d773b1ec4296129a98e (diff) | |
download | jquery-ui-1195854aaad61308e7f5339eed54f92284d7666e.tar.gz jquery-ui-1195854aaad61308e7f5339eed54f92284d7666e.zip |
Merged in widget-factory branch and added tests. Fixes #4411 - Widget factory should auto detect getters.
Diffstat (limited to 'ui/ui.dialog.js')
-rw-r--r-- | ui/ui.dialog.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/ui/ui.dialog.js b/ui/ui.dialog.js index d8b348c9b..18bdfa6bb 100644 --- a/ui/ui.dialog.js +++ b/ui/ui.dialog.js @@ -137,7 +137,6 @@ $.widget("ui.dialog", { (options.bgiframe && $.fn.bgiframe && uiDialog.bgiframe()); (options.autoOpen && this.open()); - }, destroy: function() { @@ -151,6 +150,8 @@ $.widget("ui.dialog", { this.uiDialog.remove(); (this.originalTitle && this.element.attr('title', this.originalTitle)); + + return this; }, close: function(event) { @@ -172,7 +173,7 @@ $.widget("ui.dialog", { $.ui.dialog.overlay.resize(); self._isOpen = false; - + // adjust the maxZ to allow other modal dialogs to continue to work (see #4309) if (self.options.modal) { var maxZ = 0; @@ -183,6 +184,8 @@ $.widget("ui.dialog", { }); $.ui.dialog.maxZ = maxZ; } + + return self; }, isOpen: function() { @@ -192,7 +195,6 @@ $.widget("ui.dialog", { // the force parameter allows us to move modal dialogs to their correct // position on open moveToTop: function(force, event) { - if ((this.options.modal && !force) || (!this.options.stack && !this.options.modal)) { return this._trigger('focus', event); @@ -209,6 +211,8 @@ $.widget("ui.dialog", { this.uiDialog.css('z-index', ++$.ui.dialog.maxZ); this.element.attr(saveScroll); this._trigger('focus', event); + + return this; }, open: function() { @@ -256,6 +260,8 @@ $.widget("ui.dialog", { this._trigger('open'); this._isOpen = true; + + return this; }, _createButtons: function(buttons) { @@ -519,8 +525,6 @@ $.extend($.ui.dialog, { zIndex: 1000 }, - getter: 'isOpen', - uuid: 0, maxZ: 0, |