Dialog: Fixed #3013: Force dialog titlebars to have a full line height when no title is provided (after initialization).

This commit is contained in:
Scott González 2008-07-12 00:14:19 +00:00
parent 3bc322fd37
commit ac6189fd57
2 changed files with 3 additions and 3 deletions

View File

@ -376,9 +376,9 @@ test("stack", function() {
test("title", function() {
expect(4);
function titleText() {
return dlg().find(".ui-dialog-title").text();
return dlg().find(".ui-dialog-title").html();
}
el = $('<div/>').dialog(); equals(titleText(), "", "[default]"); el.remove();
el = $('<div/>').dialog(); equals(titleText(), "&nbsp;", "[default]"); el.remove();
el = $('<div title="foo"/>').dialog(); equals(titleText(), "foo", "title in element attribute"); el.remove();
el = $('<div/>').dialog({ title: 'foo' }); equals(titleText(), "foo", "title in init options"); el.remove();
el = $('<div title="foo"/>').dialog({ title: 'bar' }); equals(titleText(), "bar", "title in init options should override title in element attribute"); el.remove();

View File

@ -184,7 +184,7 @@ $.widget("ui.dialog", {
this.uiDialog.resizable(value ? 'enable' : 'disable');
break;
case "title":
$(".ui-dialog-title", this.uiDialogTitlebar).text(value);
$(".ui-dialog-title", this.uiDialogTitlebar).html(value || '&nbsp;');
break;
case "width":
this.uiDialog.width(value);