From: Scott González Date: Sat, 12 Jul 2008 00:16:43 +0000 (+0000) Subject: Dialog: If options.title is empty on init, set it to the title attribute of the dialo... X-Git-Tag: 1.6rc2~208 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d1b099907d1c3425dbae70d573103dca160e98b9;p=jquery-ui.git Dialog: If options.title is empty on init, set it to the title attribute of the dialog element. --- diff --git a/ui/ui.dialog.js b/ui/ui.dialog.js index 42a06daa5..6cae66d87 100644 --- a/ui/ui.dialog.js +++ b/ui/ui.dialog.js @@ -29,6 +29,8 @@ var setDataSwitch = { $.widget("ui.dialog", { init: function() { + this.options.title = this.options.title || this.element.attr('title'); + var self = this, options = this.options, resizeHandles = typeof options.resizable == 'string' @@ -48,7 +50,7 @@ $.widget("ui.dialog", { height: '100%' }), - title = options.title || uiDialogContent.attr('title') || ' ', + title = options.title || ' ', uiDialogTitlebar = (this.uiDialogTitlebar = $('
')) .append('' + title + '')