Fixed order of tasks in selections with ajax loaded data
This commit is contained in:
parent
0ea7ec6acf
commit
b2fdbde020
3 changed files with 3 additions and 4 deletions
|
@ -1063,7 +1063,8 @@ function _stormtask_get_tree($project_nid, $parent_nid = 0, $depth = -1, $max_de
|
|||
function _stormtask_plain_tree($tree) {
|
||||
$rows = array();
|
||||
foreach ($tree as $item) {
|
||||
$nid = $item->nid;
|
||||
// Using the space character to preserve the order of tree elements:
|
||||
$nid = " $item->nid";
|
||||
$title = htmlspecialchars_decode(check_plain($item->title));
|
||||
if ($item->stepno) $title = check_plain($item->stepno) .' '. $title;
|
||||
if ($nid) $rows[$nid] = str_repeat('--', $item->depth) .' '. $title;
|
||||
|
|
Reference in a new issue