Skip to content
Permalink
Browse files

Dialog: If options.title is empty on init, set it to the title attrib…

…ute of the dialog element.
  • Loading branch information
scottgonzalez committed Jul 12, 2008
1 parent ac6189f commit d1b099907d1c3425dbae70d573103dca160e98b9
Showing with 3 additions and 1 deletion.
  1. +3 −1 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 =
$('<div class="ui-dialog-titlebar"/>'))
.append('<span class="ui-dialog-title">' + title + '</span>')

0 comments on commit d1b0999

Please sign in to comment.
You can’t perform that action at this time.