mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Dialog: If options.title is empty on init, set it to the title attribute of the dialog element.
This commit is contained in:
parent
ac6189fd57
commit
d1b099907d
@ -29,6 +29,8 @@ var setDataSwitch = {
|
|||||||
|
|
||||||
$.widget("ui.dialog", {
|
$.widget("ui.dialog", {
|
||||||
init: function() {
|
init: function() {
|
||||||
|
this.options.title = this.options.title || this.element.attr('title');
|
||||||
|
|
||||||
var self = this,
|
var self = this,
|
||||||
options = this.options,
|
options = this.options,
|
||||||
resizeHandles = typeof options.resizable == 'string'
|
resizeHandles = typeof options.resizable == 'string'
|
||||||
@ -48,7 +50,7 @@ $.widget("ui.dialog", {
|
|||||||
height: '100%'
|
height: '100%'
|
||||||
}),
|
}),
|
||||||
|
|
||||||
title = options.title || uiDialogContent.attr('title') || ' ',
|
title = options.title || ' ',
|
||||||
uiDialogTitlebar = (this.uiDialogTitlebar =
|
uiDialogTitlebar = (this.uiDialogTitlebar =
|
||||||
$('<div class="ui-dialog-titlebar"/>'))
|
$('<div class="ui-dialog-titlebar"/>'))
|
||||||
.append('<span class="ui-dialog-title">' + title + '</span>')
|
.append('<span class="ui-dialog-title">' + title + '</span>')
|
||||||
|
Loading…
Reference in New Issue
Block a user