blob: cdeb6b79875710098d4b3a59c1b351f53a69926c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
<?php
$friendspicker = $vars['friendspicker'];
$collectionid = $vars['collection']->id;
$ownerid = $vars['owner']->getGUID();
?>
<div id="friendsPickerNavigationTabs">
<ul>
<li class="selected"><a href="#" class="collectionmembers<?php echo $friendspicker; ?>">Collection members</a></li>
<li><a href="#" class="editmembers<?php echo $friendspicker; ?>">Edit collection</a></li>
</ul>
</div>
<script type="text/javascript">
$(document).ready(function () {
$('a.collectionmembers<?php echo $friendspicker; ?>').click(function () {
// load collection members pane
$('#friends_picker_placeholder<?php echo $friendspicker; ?>').load('<?php echo $vars['url']; ?>friends/pickercallback.php?username=<?php echo $_SESSION['user']->username; ?>&type=list&collection=<?php echo $collectionid; ?>');
// remove selected state from previous tab
$(this).parent().parent().find("li.selected").removeClass("selected");
// add selected class to current tab
$(this).parent().addClass("selected");
return false;
});
$('a.editmembers<?php echo $friendspicker; ?>').click(function () {
// load friends picker pane
$('#friends_picker_placeholder<?php echo $friendspicker; ?>').load('<?php echo $vars['url']; ?>friends/pickercallback.php?username=<?php echo $_SESSION['user']->username; ?>&type=picker&collection=<?php echo $collectionid; ?>&friendspicker=<?php echo $friendspicker; ?>');
// remove selected state from previous tab
$(this).parent().parent().find("li.selected").removeClass("selected");
// add selected class to current tab
$(this).parent().addClass("selected");
return false;
});
});
</script>
|