From d1b099907d1c3425dbae70d573103dca160e98b9 Mon Sep 17 00:00:00 2001 From: Scott González Date: Sat, 12 Jul 2008 00:16:43 +0000 Subject: Dialog: If options.title is empty on init, set it to the title attribute of the dialog element. --- ui/ui.dialog.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 + '') -- cgit v1.2.3