aboutsummaryrefslogtreecommitdiff
path: root/views/default/friends/collectiontabs.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-30 16:59:43 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-30 16:59:43 +0000
commit3921f1eaa710f5b76d2ca222b0b16bef215b0f3a (patch)
tree5d42af1e55b53c40bf0400f0244ca06b12887cb2 /views/default/friends/collectiontabs.php
parent0b56fd406382b703833c673976c94dc5a87ab7e6 (diff)
downloadelgg-3921f1eaa710f5b76d2ca222b0b16bef215b0f3a.tar.gz
elgg-3921f1eaa710f5b76d2ca222b0b16bef215b0f3a.tar.bz2
AJAX improvements to picker
git-svn-id: https://code.elgg.org/elgg/trunk@1610 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/friends/collectiontabs.php')
-rw-r--r--views/default/friends/collectiontabs.php21
1 files changed, 19 insertions, 2 deletions
diff --git a/views/default/friends/collectiontabs.php b/views/default/friends/collectiontabs.php
index fabd9857b..1e417017f 100644
--- a/views/default/friends/collectiontabs.php
+++ b/views/default/friends/collectiontabs.php
@@ -1,10 +1,27 @@
<?php
+ global $friendspicker;
+ if (!isset($friendspicker)) $friendspicker = 0;
+
+ if (isset($vars['members'])) {
+ $members = implode(',',$vars['members']);
+ } else {
+ $members = "";
+ }
+
+ $friends = "";
+ if (isset($vars['friends'])) {
+ foreach($friends as $friend) {
+ if (!empty($friends)) $friends .= ",";
+ $friends .= $friend->getGUID();
+ }
+ }
+
?>
<div id="friendsPickerNavigationTabs">
<ul>
-<li class="selected"><a href="#">Collection members</a></li>
-<li><a href="#">Edit collection</a></li>
+<li class="selected"><a href='#' onclick='$("#friends_picker_placeholder<?php echo $friendspicker + 1; ?>").load("<?php echo $vars['url']; ?>friends/pickercallback.php?username=<?php echo $_SESSION['user']->username; ?>&type=list&members=<?php echo $members; ?>"); return false;'>Collection members</a></li>
+<li><a href="#" onclick='$("#friends_picker_placeholder<?php echo $friendspicker + 1; ?>").load("<?php echo $vars['url']; ?>friends/pickercallback.php?username=<?php echo $_SESSION['user']->username; ?>&type=picker&members=<?php echo $members; ?>&friends=<?php echo $friends; ?>"); return false;'>Edit collection</a></li>
</ul>
</div> \ No newline at end of file