mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Dialog: Fixed #4086: Allow changing the dialogClass option after init.
This commit is contained in:
parent
fb7f7fc393
commit
86a26f17ff
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user