Nov 18, 2008, 1:04 PM
[CLOSED] Collapsed title of South Panel
Any one knows if there is a way to show the title of a collapsed horizontal panel e.g. South or North. I have found an extension on Ext forum for it but I thought there might be a way in coolite. Also how do I add a custom plugin to my South panel for example :
The South Panel
The plugin :
The South Panel
<South>
<ext:Panel ID="Panel5" Collapsible="true" Collapsed="true" runat="server" Height="200" Title="Question Libraries">
<Plugins>
<ext:GenericPlugin runat="server" InstanceOf="Ext.ux.collapsedPanelTitlePlugin()"></ext:GenericPlugin>
</Plugins>
<Content>
</Content>
</ext:Panel>
</South>
Doesn't work.The plugin :
Ext.ux.collapsedPanelTitlePlugin = function() {
this.init = function(p) {
if (p.collapsible) {
var r = p.region;
if ((r == 'north') || (r == 'south')) {
p.on('render', function() {
var ct = p.ownerCt;
ct.on('afterlayout', function() {
if (ct.layout[r].collapsedEl) {
var leftPadding = (p.collapsedIcon ? 24 : 4);
var background = (p.collapsedIcon ? "url('" + p.collapsedIcon + "') no-repeat left center;" : "transparent;");
p.collapsedTitleEl = ct.layout[r].collapsedEl.createChild({
tag: 'div',
style: 'padding-left:' + leftPadding + 'px; margin-left:4px; margin-top:2px; background:' + background,
cls: 'x-panel-collapsed-text',
html: p.collapsedTitle
});
}
}, false, { single: true });
p.on('collapse', function() {
if (ct.layout[r].collapsedEl && !p.collapsedTitleEl) {
var leftPadding = (p.collapsedIcon ? 24 : 4);
var background = (p.collapsedIcon ? "url('" + p.collapsedIcon + "') no-repeat left center;" : "transparent;");
p.collapsedTitleEl = ct.layout[r].collapsedEl.createChild({
tag: 'span',
style: 'padding-left:' + leftPadding + 'px; margin-left:4px; margin-top:2px; background:' + background,
cls: 'x-panel-collapsed-text',
html: p.collapsedTitle
});
}
}, false, { single: true });
});
}
}
};
} // eo collapsedPanelTitlePlugin
Thanks