aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorRichard Worth <rdworth@gmail.com>2010-01-27 10:31:17 +0000
committerRichard Worth <rdworth@gmail.com>2010-01-27 10:31:17 +0000
commit3eaf9daacaefa5f9f3ac469e4136c9f12cad5b9e (patch)
tree9fa320354225182337521dbf83037936a2dbec95 /ui
parent6de9b51c578a6201d6a1e46d91c5381403f20b45 (diff)
downloadjquery-ui-3eaf9daacaefa5f9f3ac469e4136c9f12cad5b9e.tar.gz
jquery-ui-3eaf9daacaefa5f9f3ac469e4136c9f12cad5b9e.zip
Deprecated beforeclose option instead of removing it for now, fixes reopened #4669 - Dialog: beforeclose option should be beforeClose.
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.dialog.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js
index 8c7eee234..98dfd3cf9 100644
--- a/ui/jquery.ui.dialog.js
+++ b/ui/jquery.ui.dialog.js
@@ -137,6 +137,13 @@ $.widget("ui.dialog", {
.html(title)
.prependTo(uiDialogTitlebar);
+ //handling of deprecated beforeclose (vs beforeClose) option
+ //Ticket #4669 http://dev.jqueryui.com/ticket/4669
+ //TODO: remove in 1.9pre
+ if ($.isFunction(options.beforeclose) && !$.isFunction(options.beforeClose)) {
+ options.beforeClose = options.beforeclose;
+ }
+
uiDialogTitlebar.find("*").add(uiDialogTitlebar).disableSelection();
(options.draggable && $.fn.draggable && self._makeDraggable());
@@ -451,6 +458,12 @@ $.widget("ui.dialog", {
resize = false;
switch (key) {
+ //handling of deprecated beforeclose (vs beforeClose) option
+ //Ticket #4669 http://dev.jqueryui.com/ticket/4669
+ //TODO: remove in 1.9pre
+ case "beforeclose":
+ key = "beforeClose";
+ break;
case "buttons":
self._createButtons(value);
break;