diff options
author | Andy Staudacher <andy.st@gmail.com> | 2010-02-18 17:54:29 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-02-18 16:19:17 -0800 |
commit | 22bc871e2b04633c7c50bdd86ae73c8e41aaaaae (patch) | |
tree | a079bc02c9d85c17bab2375d5af0d436b5f4114d /modules | |
parent | 45910ffdc051ab4298269f1398f43d00517d4884 (diff) |
Fix for tickets #1024 and #1025: Fix formatting of album tree list in the organize dialog, and (magically) drag and drop move to another album works as well again. Tested in FF3.5, Chrome5 on Ubuntu Linux.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/organize/views/organize_tree.html.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/modules/organize/views/organize_tree.html.php b/modules/organize/views/organize_tree.html.php index 33d7b4c9..044b6858 100644 --- a/modules/organize/views/organize_tree.html.php +++ b/modules/organize/views/organize_tree.html.php @@ -3,24 +3,27 @@ ref="<?= $album->id ?>"> <span class="ui-icon ui-icon-minus g-left"> </span> - <span class="g-organize-album-text g-left <?= $selected && $album->id == $selected->id ? "ui-state-focus" : "" ?>" + <span class="g-organize-album-text <?= $selected && $album->id == $selected->id ? "ui-state-focus" : "" ?>" ref="<?= $album->id ?>"> <?= html::clean($album->title) ?> </span> - <ul class="g-left"> - <? foreach ($album->children(null, null, array(array("type", "=", "album"))) as $child): ?> + <? $child_albums = $album->viewable()->children(null, null, array(array("type", "=", "album"))); ?> + <? if (!empty($child_albums)): ?> + <ul> + <? foreach ($child_albums as $child): ?> <? if ($selected && $child->contains($selected)): ?> <?= View::factory("organize_tree.html", array("selected" => $selected, "album" => $child)); ?> <? else: ?> <li class="g-organize-album ui-icon-left <?= access::can("edit", $child) ? "" : "g-view-only" ?>" ref="<?= $child->id ?>"> <span class="ui-icon ui-icon-plus g-left"></span> - <span class="g-organize-album-text g-left <?= $selected && $child->id == $selected->id ? "ui-state-focus" : "" ?>" ref="<?= $child->id ?>"> + <span class="g-organize-album-text <?= $selected && $child->id == $selected->id ? "ui-state-focus" : "" ?>" ref="<?= $child->id ?>"> <?= html::clean($child->title) ?> </span> </li> <? endif ?> <? endforeach ?> </ul> + <? endif ?> </li> |