PDA

View Full Version : [FIXED-710][3.2-beta] Collapsed 'south' region is not redrawn correctly on show



Stju
10 Mar 2010, 6:14 PM
I have panel with border layout, and grid with bbar, tbar in south region.

If south region is initially collapsed, then:
1. clicking collapse button to show region , it is not shown correctly (bbar items are missing). Loading data in store invokes loadMask, and after that tbar is gone..
2. if I drag region resize handle, it's being redrawn and rendered correctly.
3. on 3.1.2 everything was okey.


{
region: 'south',
height: 250,
maxHeight: 250,
border: false,
split: true,
title:'xxxxxxx',
iconCls:'ico-plug',
collapsedIconCls: 'ico-plug',
plugins: [Ext.ux.PanelCollapsedTitle],
collapsible: true,
collapsed:true,
cmargins: '2 2 2 2',
layout:'fit',
items: [this.connGrid]
}


Tested on FF3.5.8 and Safari.
Stju

evant
10 Mar 2010, 6:32 PM
Please post a full test case to demonstrate the issue.

Stju
10 Mar 2010, 7:42 PM
test_case.php:


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

<title>test case</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="ext-3.2-beta/resources/css/ext-all.css"/>

<script type="text/javascript" src="ext-3.2-beta/adapter/ext/ext-base-debug.js"></script>
<script type="text/javascript" src="ext-3.2-beta/ext-all-debug.js"></script>

<script type="text/javascript" src="test_component.js"></script>
<script type="text/javascript" src="test_case.js"></script>

</head>
<body>
</body>
</html>


test_case.js


Ext.onReady(function(){
viewport = new Ext.Viewport({
id:'general_viewport',
layout:'border',
autoShow :true,
items:[{
id:'center-panel',
xtype:'tabpanel',
region:'center',
activeTab: 0,
items: {
id:'test-panel',
title: 'Test'
}}]
});

Ext.getCmp('center-panel').add({
id: 'test_case_tab',
title: 'test case tab',
xtype: 'testcase'
}).show();
});


test_component.js


Ext.namespace('Ext.o3mod');
Ext.o3mod.TestCase = Ext.extend(Ext.Panel, {
initComponent: function() {
this.connStore=new Ext.data.DirectStore({
fields: [
{ name: 'id', type: 'int'},
{ name: 'blabla'}
]
});

this.connColModel = new Ext.grid.ColumnModel({
columns: [
{id:'id', header: "ID", dataIndex: 'id'},
{id:'blabla', header: "blabla", dataIndex: 'blabla'}
]
});

this.connGrid = new Ext.grid.GridPanel({
store: this.connStore,
cm: this.connColModel,
tbar: new Ext.Toolbar({
items:[{
iconCls:'toolbar24-new',
scale:'medium'
}]
}),
bbar: new Ext.Toolbar({
items:[{
tooltip:'test',
iconCls:'toolbar24-new'
}]
})
});

this.dummy = new Ext.Panel({
title:'Anything here'
});

var config = Ext.apply(this.initialConfig, {
layout: 'border',
items:[{
region: 'center',
layout:'fit',
items:[this.dummy]
},{
region: 'south',
layout:'fit',
height: 250,
maxHeight: 250,
split: true,
title:'Grid here',
collapsible: true,
collapsed:true,
items: [this.connGrid]
}]
});
Ext.apply(this, config);
Ext.o3mod.TestCase.superclass.initComponent.apply(this);
}
});
Ext.reg('testcase', Ext.o3mod.TestCase);


Open south region and try to resize it (browser window resize helps also..)

evant
11 Mar 2010, 2:16 AM
Ok, confirmed, thanks.

Jamie Avins
11 Mar 2010, 10:53 AM
[type]: fix
[module]: Panel
[id]: #710
[desc]: Fixes #710. Collapsing a panel will now reset lastSize for all subcontainers.

Stju
11 Mar 2010, 11:05 AM
Excellent, works now as expected!
Thank's,
Stju

Jamie Avins
11 Mar 2010, 12:10 PM
Just an FYI that you are overnesting in this example, the GridPanel should be moved up a level. Was a very useful example though to catch a tricky issue.

defcon1
11 Mar 2010, 3:31 PM
Iīve got almost the same problem. I downloaded the 3.2.0-beta today and tried following
(works with 3.1.1):

Web desktop: A window with a borderlayout containing a center region (of course :D) which
is a panel, a west region which is a panel and a south region which is a form panel.
The center and the south are collapsible and if I collapse the south the layout gets broken and
if I click something inside the window the window disappears and the desktop flickers ...

I try to make an example, but not today (itīs past midnight here in germany) ... ;)

Best regards
d1

Stju
11 Mar 2010, 3:48 PM
@Jamie Thank's for pointing out :">