aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2008-07-12 00:16:43 +0000
committerScott González <scott.gonzalez@gmail.com>2008-07-12 00:16:43 +0000
commitd1b099907d1c3425dbae70d573103dca160e98b9 (patch)
tree6b577a370271a504a1dd2723afb235288e02e1e4
parentac6189fd5758e8c98c40d4fc1274cb4202b35cb5 (diff)
downloadjquery-ui-d1b099907d1c3425dbae70d573103dca160e98b9.tar.gz
jquery-ui-d1b099907d1c3425dbae70d573103dca160e98b9.zip
Dialog: If options.title is empty on init, set it to the title attribute of the dialog element.
-rw-r--r--ui/ui.dialog.js4
1 files changed, 3 insertions, 1 deletions
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') || '&nbsp;',
+ title = options.title || '&nbsp;',
uiDialogTitlebar = (this.uiDialogTitlebar =
$('<div class="ui-dialog-titlebar"/>'))
.append('<span class="ui-dialog-title">' + title + '</span>')