The last step is to modify the "expandAll" and "collapseAll" functions in the "drag-drop-folder-tree.js" within the "js" folder.
Find the functions:
expandAll : function()
{
var menuItems = document.getElementById(this.idOfTree).getElementsByTagName('LI');
for(var no=0;no<menuItems.length;no++){
var subItems = menuItems[no].getElementsByTagName('UL');
if(subItems.length>0 && subItems[0].style.display!='block'){
JSTreeObj.showHideNode(false,menuItems[no].id);
}
}
}
,
collapseAll : function()
{
var menuItems = document.getElementById(this.idOfTree).getElementsByTagName('LI');
for(var no=0;no<menuItems.length;no++){
var subItems = menuItems[no].getElementsByTagName('UL');
if(subItems.length>0 && subItems[0].style.display=='block'){
JSTreeObj.showHideNode(false,menuItems[no].id);
}
}
}
and replace with this:
expandAll : function(nameOfTree)
{
var menuItems = document.getElementById(nameOfTree).getElementsByTagName('LI');
for(var no=0;no<menuItems.length;no++){
var subItems = menuItems[no].getElementsByTagName('UL');
if(subItems.length>0 && subItems[0].style.display!='block'){
JSTreeObj.showHideNode(false,menuItems[no].id);
}
}
}
,
collapseAll : function(nameOfTree)
{
var menuItems = document.getElementById(nameOfTree).getElementsByTagName('LI');
for(var no=0;no<menuItems.length;no++){
var subItems = menuItems[no].getElementsByTagName('UL');
if(subItems.length>0 && subItems[0].style.display=='block'){
JSTreeObj.showHideNode(false,menuItems[no].id);
}
}
}
Here we have basically replaced the referece to the folder tree which was done by id to it's exact name.