aboutsummaryrefslogtreecommitdiff
path: root/views/default/friends/collectiontabs.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/friends/collectiontabs.php')
-rw-r--r--views/default/friends/collectiontabs.php15
1 files changed, 7 insertions, 8 deletions
diff --git a/views/default/friends/collectiontabs.php b/views/default/friends/collectiontabs.php
index 25a3a53b3..1e40dd584 100644
--- a/views/default/friends/collectiontabs.php
+++ b/views/default/friends/collectiontabs.php
@@ -1,7 +1,6 @@
<?php
- global $friendspicker;
- if (!isset($friendspicker)) $friendspicker = 0;
+ $friendspicker = $vars['friendspicker'];
if (isset($vars['members'])) {
$members = implode(',',$vars['members']);
@@ -21,9 +20,9 @@
<div id="friendsPickerNavigationTabs">
<ul>
-<li class="selected"><a href="#" class="collectionmembers<?php echo $friendspicker + 1; ?>">Collection members</a></li>
+<li class="selected"><a href="#" class="collectionmembers<?php echo $friendspicker; ?>">Collection members</a></li>
-<li><a href="#" class="editmembers<?php echo $friendspicker + 1; ?>">Edit collection</a></li>
+<li><a href="#" class="editmembers<?php echo $friendspicker; ?>">Edit collection</a></li>
</ul>
</div>
@@ -31,9 +30,9 @@
<script type="text/javascript">
$(document).ready(function () {
- $('a.collectionmembers<?php echo $friendspicker + 1; ?>').click(function () {
+ $('a.collectionmembers<?php echo $friendspicker; ?>').click(function () {
// load collection members pane
- $('#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; ?>');
+ $('#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 $members; ?>');
// remove selected state from previous tab
$(this).parent().parent().find("li.selected").removeClass("selected");
@@ -43,9 +42,9 @@ $(document).ready(function () {
return false;
});
- $('a.editmembers<?php echo $friendspicker + 1; ?>').click(function () {
+ $('a.editmembers<?php echo $friendspicker; ?>').click(function () {
// load friends picker pane
- $('#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; ?>');
+ $('#friends_picker_placeholder<?php echo $friendspicker; ?>').load('<?php echo $vars['url']; ?>friends/pickercallback.php?username=<?php echo $_SESSION['user']->username; ?>&type=picker&members=<?php echo $members; ?>&friends=<?php echo $friends; ?>&friendspicker=<?php echo $friendspicker; ?>');
// remove selected state from previous tab
$(this).parent().parent().find("li.selected").removeClass("selected");