From ac0347939175e8ce6a504324ba4ac6d5bae7ce59 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 28 Dec 2020 19:43:36 +0100 Subject: [PATCH] unfold all folders within current path --- views/bootstrap/class.Bootstrap.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 9d686bbfd..beaa916cc 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -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);