aboutsummaryrefslogtreecommitdiff
path: root/views/default/friends
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-31 09:01:22 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-31 09:01:22 +0000
commit27145bbf5a57d66f148b4324c659202bb7d78c92 (patch)
tree4feddac7a63eee2812c7a6ce0336edbcbb32b27f /views/default/friends
parent04a1bcfd1f9e98b7fe5e5a8230385385d0c41631 (diff)
downloadelgg-27145bbf5a57d66f148b4324c659202bb7d78c92.tar.gz
elgg-27145bbf5a57d66f148b4324c659202bb7d78c92.tar.bz2
Friends picker tab initialisation updates
git-svn-id: https://code.elgg.org/elgg/trunk@1621 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/friends')
-rw-r--r--views/default/friends/collection.php12
-rw-r--r--views/default/friends/collectiontabs.php2
2 files changed, 13 insertions, 1 deletions
diff --git a/views/default/friends/collection.php b/views/default/friends/collection.php
index 4c8daa795..2d6fedac4 100644
--- a/views/default/friends/collection.php
+++ b/views/default/friends/collection.php
@@ -37,8 +37,20 @@
// individual collection panels
if($friends = $vars['collection']->entities){
$members = $vars['collection']->members;
+ $implodedmemberslist = implode(',',$members);
$content = elgg_view('friends/collectiontabs', array('members' => $members, 'friends' => $friends, 'collection' => $vars['collection']));
echo elgg_view('friends/picker',array('entities' => $friends, 'value' => $members, 'content' => $content, 'replacement' => ''));
+ global $friendspicker;
+ ?>
+
+<script type="text/javascript">
+$(document).ready(function () {
+
+ $('#friends_picker_placeholder<?php echo $friendspicker; ?>').load('<?php echo $vars['url']; ?>friends/pickercallback.php?username=<?php echo $_SESSION['user']->username; ?>&type=list&members=<?php echo $implodedmemberslist; ?>');
+
+ });
+</script>
+ <?php
}
// close friends_picker div and the accordian list item
diff --git a/views/default/friends/collectiontabs.php b/views/default/friends/collectiontabs.php
index 28f9692d8..25a3a53b3 100644
--- a/views/default/friends/collectiontabs.php
+++ b/views/default/friends/collectiontabs.php
@@ -11,7 +11,7 @@
$friends = "";
if (isset($vars['friends'])) {
- foreach($friends as $friend) {
+ foreach($vars['friends'] as $friend) {
if (!empty($friends)) $friends .= ",";
$friends .= $friend->getGUID();
}