diff options
Diffstat (limited to 'views')
-rw-r--r-- | views/default/friends/collection.php | 12 | ||||
-rw-r--r-- | views/default/friends/collectiontabs.php | 2 |
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();
}
|