]> source.dussan.org Git - jquery-ui.git/commitdiff
Dialog: If options.title is empty on init, set it to the title attribute of the dialo...
authorScott González <scott.gonzalez@gmail.com>
Sat, 12 Jul 2008 00:16:43 +0000 (00:16 +0000)
committerScott González <scott.gonzalez@gmail.com>
Sat, 12 Jul 2008 00:16:43 +0000 (00:16 +0000)
ui/ui.dialog.js

index 42a06daa5e6893c8a2858797802e37f51a31900f..6cae66d872cbbd9f7fb0c9b5304df76dfa7b9a66 100644 (file)
@@ -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>')