Dialog: Fixed #4086: Allow changing the dialogClass option after init.

This commit is contained in:
Scott González 2009-02-07 14:28:14 +00:00
parent fb7f7fc393
commit 86a26f17ff

View File

@ -25,7 +25,13 @@ var setDataSwitch = {
resizeStart: "start.resizable",
resize: "drag.resizable",
resizeStop: "stop.resizable"
};
},
uiDialogClasses =
'ui-dialog ' +
'ui-widget ' +
'ui-widget-content ' +
'ui-corner-all ';
$.widget("ui.dialog", {
@ -41,13 +47,7 @@ $.widget("ui.dialog", {
uiDialog = (this.uiDialog = $('<div/>'))
.appendTo(document.body)
.hide()
.addClass(
'ui-dialog ' +
'ui-widget ' +
'ui-widget-content ' +
'ui-corner-all ' +
options.dialogClass
)
.addClass(uiDialogClasses + options.dialogClass)
.css({
position: 'absolute',
overflow: 'hidden',
@ -402,6 +402,11 @@ $.widget("ui.dialog", {
case "closeText":
this.uiDialogTitlebarCloseText.text(value);
break;
case "dialogClass":
this.uiDialog
.removeClass(this.options.dialogClass)
.addClass(uiDialogClasses + value);
break;
case "draggable":
(value
? this._makeDraggable()