PDA

View Full Version : BasicDialog missing footer with autocreate



tryanDLS
11 Jan 2007, 1:16 PM
Looks like the BasicDialog does not create a footer if it doesn't exist. When doing autoCreate = true, this causes the buttons to be too far down. It does get added when you hit addButton, but this looks to omit the part about wrapping the footer that occurs in the constructor when the footer is present.

BUMP

wioota
2 Apr 2007, 8:24 PM
The addButton call will try to add it but I can't see why autocreate doesn't just add it in there initially... seems to cause related issues of content spilling out the bottom of the dialog.

tryanDLS
2 Apr 2007, 8:54 PM
I believe this was fixed quite a few revs ago. If you can dup this with beta1, please post some sample code.

paulkavan
17 Apr 2007, 10:26 AM
The footer does not get created

I'm using Ext 1.0.


var edit_dialog, status_manager;
edit_dialog = new Ext.LayoutDialog(YAHOO.util.Dom.generateId(), {
title : "Edit",
autoCreate: true,
height: "30em",
width: "40em",
shadow: true,
fixedcenter: true,
center: {
autoScroll: false,
tabPosition: 'top'
}
});

status_manager = edit_dialog.footer.createChild({tag: 'div'});

the status_manager produces the error. The edit_dialog.footer returns null.

Interesting note: adding a button with


edit_dialog.addButton('Close', edit_dialog.hide, edit_dialog);


will create the edit_dialog.footer element.

I'm guessing this is a bug.

tryanDLS
17 Apr 2007, 11:06 AM
I just tried this with the LayoutDialog example, changing it to autoCreate:true and id of a non-existent div. The footer is created correctly.
If you don't add any buttons, then the footer is not built. Not sure that it's a bug, though.

paulkavan
17 Apr 2007, 11:31 AM
I wasn't sure if it was a bug or not. Thanks for the reply.

wioota
22 Apr 2007, 6:52 AM
I guess it makes sense that the footer is created only if there are buttons but its a little bit unexpected when the header and body are there on creation. One of those things that requires the user to dig into the library a bit to work it out.

Maybe a note in the documentation might suffice?

willydee
25 Apr 2007, 5:05 AM
In my opinion a dialog's footer element should be created anyways. (Yester|To)day I tried to add a toolbar to a LayoutDialog's footer, but failed since it didn't exist without having at least one button.

Jack, please consider modifying this behaviour in a forthcoming revision.