PDA

View Full Version : .show() wont show accordion item after hidden?



joefox
17 Feb 2010, 6:42 PM
I have the function below that will "show" an accordion item after its been hidden, however the first .hide work great, however the items below wont show if they are set to "yes"



{
region:'west',
id:'west-panel',
title:'Main Menu',
split:true,
width: 200,
minSize: 175,
maxSize: 400,
collapsible: true,
margins:'5 0 0 5',
layout:'accordion',
layoutConfig:{
animate:true
},
defaults:{
collapsed:true
},
items: [{
contentEl: 'se_project_entry_mm',
title:'SE - Projects Menu',
id:'se_project_mm',
border:false
},{
contentEl: 'admin_daily_log_mm',
title:'Admin - Projects Menu',
id:'admin_project_mm',
border:false
},{
contentEl: 'support_mm',
title:'Support - Main Menu',
id:'support_mm',
border:false
},{
contentEl: 'your_information_main_menu',
title:'Your Account',
border:false,
autoScroll:true, // Allow Scrolling
iconCls:'nav'
}]
}







function hide_main_menu_tabs(se_mm,aprj_mm,sp_mm)
{
Ext.getCmp('se_project_mm').hide();
Ext.getCmp('admin_project_mm').hide();
Ext.getCmp('support_mm').hide();
Ext.getCmp('west-panel').doLayout();

if(se_mm == "on"){Ext.getCmp('se_project_mm').show();Ext.getCmp('west-panel').doLayout();}
if(aprj_mm == "on"){Ext.getCmp('admin_project_mm').show();Ext.getCmp('west-panel').doLayout();}
if(sp_mm == "on"){Ext.getCmp('support_mm').show();Ext.getCmp('west-panel').doLayout();}
}