mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-06-07 03:59:12 -04:00
When generating the tree, don't mark nodes with no children as a leaf
because that confuses the TreeDropZone JS into thinking that it can't ever have children.
This commit is contained in:
@@ -169,7 +169,7 @@ class Organize_Controller extends Controller {
|
||||
"editable" => false,
|
||||
"expandable" => false,
|
||||
"id" => $child->id,
|
||||
"leaf" => $child->children_count(array(array("type", "=", "album"))) == 0,
|
||||
"leaf" => false,
|
||||
"text" => $child->title,
|
||||
"nodeType" => "async");
|
||||
|
||||
@@ -178,6 +178,11 @@ class Organize_Controller extends Controller {
|
||||
$node["children"] = $this->_get_tree($child, $selected);
|
||||
$node["expanded"] = true;
|
||||
}
|
||||
|
||||
if ($child->children_count(array(array("type", "=", "album"))) == 0) {
|
||||
$node["children"] = array();
|
||||
$node["expanded"] = true;
|
||||
}
|
||||
$tree[] = $node;
|
||||
}
|
||||
return $tree;
|
||||
|
||||
Reference in New Issue
Block a user