Simple javascript function to open all the collapsible panels
function OpenAll(sender)
{
if(sender == 'ctl00_CPH_CustomerCP')
{
var ids = ['ctl00_CPH_LiabilitiesCP','ctl00_CPH_IncomeCP'];
}
else if(sender == 'ctl00_CPH_LiabilitiesCP')
{
var ids = ['ctl00_CPH_CustomerCP','ctl00_CPH_IncomeCP'];
}
else if(sender == 'ctl00_CPH_IncomeCP')
{
var ids = ['ctl00_CPH_CustomerCP','ctl00_CPH_LiabilitiesCP'];
}
for (var i = 0; i < ids.length; i++)
{
var ctrl = $object(ids[i]);
if (!ctrl) continue;
// Musze sprawdzic wszystkie mozliwe zachowania
var behaviors = ctrl.get_behaviors();
for (var j = 0; j < behaviors.length; j++)
{
// Sprawdzam czy mamy CP o podanej nazwie
var behavior = behaviors[j];
if (Object.getTypeName(behavior) == 'AtlasControlToolkit.CollaspablePanelBehavior')
{
behavior._doOpen();
}
}
}
}
0 Comments:
Post a Comment
<< Home