summaryrefslogtreecommitdiff
path: root/modules/organize/views
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-08-30 14:40:55 -0700
committerBharat Mediratta <bharat@menalto.com>2009-08-30 14:40:55 -0700
commitc615918829fae1496a09886ef929869fce9b9f6a (patch)
tree98727ea88312652d4f0ea6a4181b0d5b7da2f0e2 /modules/organize/views
parentd1ade6620e814ecf536dfde17c95593a311d1c2c (diff)
Manage the selection so we don't automatically select an album
whenever we expand a tree.
Diffstat (limited to 'modules/organize/views')
-rw-r--r--modules/organize/views/organize_tree.html.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/organize/views/organize_tree.html.php b/modules/organize/views/organize_tree.html.php
index a99d2337..59f683ef 100644
--- a/modules/organize/views/organize_tree.html.php
+++ b/modules/organize/views/organize_tree.html.php
@@ -4,14 +4,14 @@
<span class="ui-icon ui-icon-minus">
</span>
<span class="gAlbumText
- <?= $album->id == $selected->id ? "selected" : "" ?>
+ <?= $selected && $album->id == $selected->id ? "selected" : "" ?>
"
ref="<?= $album->id ?>">
<?= p::clean($album->title) ?>
</span>
<ul>
<? foreach ($album->children(null, 0, array("type" => "album")) as $child): ?>
- <? if ($child->is_descendant($selected)): ?>
+ <? if ($selected && $child->is_descendant($selected)): ?>
<?= View::factory("organize_tree.html", array("selected" => $selected, "album" => $child)); ?>
<? else: ?>
<li class="gOrganizeAlbum ui-icon-left <?= access::can("edit", $child) ? "" : "gViewOnly" ?>"