diff options
author | Scott González <scott.gonzalez@gmail.com> | 2008-09-19 02:07:54 +0000 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2008-09-19 02:07:54 +0000 |
commit | 90d7b7f7087a4c18d3648775ba062e95aab9ff77 (patch) | |
tree | 946f1d52af13d452894df5d8dd61d24096547edc /ui/ui.dialog.js | |
parent | 7651fb4158018cac461ce008013f60e7fa0d5e54 (diff) | |
download | jquery-ui-90d7b7f7087a4c18d3648775ba062e95aab9ff77.tar.gz jquery-ui-90d7b7f7087a4c18d3648775ba062e95aab9ff77.zip |
Dialog: Fixed #3087: Added beforeclose callback for dialogs (can prevent closing the dialog by returning false).
Diffstat (limited to 'ui/ui.dialog.js')
-rw-r--r-- | ui/ui.dialog.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/ui.dialog.js b/ui/ui.dialog.js index 57bad1193..cc4f37762 100644 --- a/ui/ui.dialog.js +++ b/ui/ui.dialog.js @@ -135,6 +135,10 @@ $.widget("ui.dialog", { }, close: function() { + if (false === this._trigger('beforeclose', null, { options: this.options })) { + return; + } + (this.overlay && this.overlay.destroy()); this.uiDialog .hide(this.options.hide) |