unfold all folders within current path

This commit is contained in:
Uwe Steinmann 2020-12-28 19:43:36 +01:00
parent 144d35849b
commit ac03479391

View File

@ -1871,7 +1871,8 @@ $(document).ready(function() {
}
foreach($subfolders as $subfolder) {
$node = array('label'=>$subfolder->getName(), 'id'=>$subfolder->getID(), 'load_on_demand'=>(1 && ($subfolder->hasSubFolders() || ($subfolder->hasDocuments() && $showdocs))) ? true : false, 'is_folder'=>true);
if(/*$expandtree>=$level ||*/ $pathfolder->getID() == $subfolder->getID()) {
/* if the subfolder is in the path then further unfold the tree. */
if(/*$expandtree>=$level ||*/ $path && ($path[0]->getID() == $subfolder->getID())) {
$node['children'] = jqtree($path, $subfolder, $user, $accessmode, $showdocs, $expandtree, $orderby, $level+1);
if($showdocs) {
$documents = $subfolder->getDocuments(isset($orderby[0]) ? $orderby[0] : '', $orderdir);