PDA

View Full Version : [FIXED][PR3] TriggerField in ToolBar width size



mitchellsimoens
10 Mar 2011, 10:01 AM
I have a Window with a top docked Toolbar. In it I have two DateFields (a date range to filter). The width of the first one takes the entire width. The other one is placed under it. I can specify the width of the fields and they will go next to each other as expected.

If I change them to TextFields, they are place next to each other.


xtype : "toolbar",
dock : "top",
items : [
{
xtype : "datefield",
fieldLabel : "From"
},
"-",
{
xtype : "datefield",
fieldLabel : "To"
}
]

vs


xtype : "toolbar",
dock : "top",
items : [
{
xtype : "textfield",
fieldLabel : "From"
},
"-",
{
xtype : "textfield",
fieldLabel : "To"
}
]

I believe this to be a bug with Ext.layout.component.form.Trigger

Animal
13 Mar 2011, 1:43 AM
This is not labeled [FIXED], so I don't know if anyone has pushed a fix to the repo which I now have....

But I cannot reproduce this here.

If I do



w = new Ext.Window({
title: 'Test',
width: 600,
height: 200,
dockedItems: {
xtype : "toolbar",
dock : "top",
items : [{
xtype : "datefield",
fieldLabel : "From"
},
"-",
{
xtype : "datefield",
fieldLabel : "To"
}]
}
});
w.show()


I get

http://cl.ly/5CSy/Screen_shot_2011-03-13_at_09.41.36.png

mitchellsimoens
13 Mar 2011, 6:06 AM
Just copying and pasting your code, I get this:

http://www.simoens.org/bugs/images/Screen%20shot%202011-03-13%20at%209.03.06%20AM.png

I have tried with my Mac OS X 10.6 with Chrome, Safari, and Firefox

Animal
13 Mar 2011, 8:01 AM
Do you have a doctype? in that page

mitchellsimoens
13 Mar 2011, 8:08 AM
Got this at the top:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

Demo here:

http://www.simoens.org/bugs/Window%20Trigger.html

Had to refresh three times, first two I guess there was a transfer error as things were all messed up but on local it worked no problem, with the error.

Animal
14 Mar 2011, 2:59 AM
It must be something which has been fixed. Because I see the problem when I run your page here. But not when I run the same code served locally with the latest ExtJS code.

I'm going to mark this as fixed, but keep an eye on it when PR4 comes out.

mitchellsimoens
16 Mar 2011, 6:44 AM
Just adding a note that I have tested this with PR4 and it works as expected using this code Animal provided:


w = new Ext.Window({
title: 'Test',
width: 600,
height: 200,
dockedItems: {
xtype : "toolbar",
dock : "top",
items : [{
xtype : "datefield",
fieldLabel : "From"
},
"-",
{
xtype : "datefield",
fieldLabel : "To"
}]
}
});
w.show()