Switch back to setting nodes as leaves, but fix the drop zone code to

allow dropping on leaves.
This commit is contained in:
Bharat Mediratta
2011-01-06 11:46:15 -08:00
parent 9682b7ea6e
commit fc6907dcfe
2 changed files with 8 additions and 5 deletions

View File

@@ -169,6 +169,7 @@ class Organize_Controller extends Controller {
"editable" => false,
"expandable" => false,
"id" => $child->id,
"leaf" => $child->children_count(array(array("type", "=", "album"))) == 0,
"text" => $child->title,
"nodeType" => "async");
@@ -177,11 +178,6 @@ 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;