Skip to content
Permalink
Browse files

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

  • Loading branch information
scottgonzalez committed Feb 7, 2009
1 parent fb7f7fc commit 86a26f17ffea542ae9a67f7153484797b66ee8ca
Showing with 23 additions and 18 deletions.
  1. +23 −18 ui/ui.dialog.js
@@ -15,17 +15,23 @@
(function($) {

var setDataSwitch = {
dragStart: "start.draggable",
drag: "drag.draggable",
dragStop: "stop.draggable",
maxHeight: "maxHeight.resizable",
minHeight: "minHeight.resizable",
maxWidth: "maxWidth.resizable",
minWidth: "minWidth.resizable",
resizeStart: "start.resizable",
resize: "drag.resizable",
resizeStop: "stop.resizable"
};
dragStart: "start.draggable",
drag: "drag.draggable",
dragStop: "stop.draggable",
maxHeight: "maxHeight.resizable",
minHeight: "minHeight.resizable",
maxWidth: "maxWidth.resizable",
minWidth: "minWidth.resizable",
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()

0 comments on commit 86a26f1

Please sign in to comment.
You can’t perform that action at this time.