onBeforeFolderToggle

fires before a tree branch will be opened or closed (the Timeline view, 'tree' mode only)

boolean onBeforeFolderToggle(object| boolean section,boolean isOpen,boolean allSections);
sectionobject| booleanthe configuration object of the branch to open/close.
Takes the true value, if all branches will be closed/opened at once by the closeAllSections()/openAllSections() methods.
isOpenbooleanindicates whether the branch will be opened (true) or closed (false)
allSectionsbooleantakes the true value, if all tree branches will be closed/opened at once by the closeAllSections()/openAllSections() methods, false - if only one branch will be opened/closed.
booleandefines whether the default action of the event will be triggered (true) or canceled (false)

Available only in PRO Edition

Example

scheduler.attachEvent("onBeforeFolderToggle", function(section,isOpen,allSections){
    //any custom logic here
    return true;
});

See also
Back to top