diff options
author | pete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-07-30 17:19:22 +0000 |
---|---|---|
committer | pete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-07-30 17:19:22 +0000 |
commit | 68dcf7974b128c3106db203abb70d56dea2eeb7d (patch) | |
tree | e8cd285e675690e4ccbeb02c5b03fe41b3ca854a /views/default/friends/collectiontabs.php | |
parent | b06376e171d82c821106f8f86a856fb2aea41f7a (diff) | |
download | elgg-68dcf7974b128c3106db203abb70d56dea2eeb7d.tar.gz elgg-68dcf7974b128c3106db203abb70d56dea2eeb7d.tar.bz2 |
pete's collectiontabs code
git-svn-id: https://code.elgg.org/elgg/trunk@1612 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/friends/collectiontabs.php')
-rw-r--r-- | views/default/friends/collectiontabs.php | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/views/default/friends/collectiontabs.php b/views/default/friends/collectiontabs.php index 1e417017f..ab329441b 100644 --- a/views/default/friends/collectiontabs.php +++ b/views/default/friends/collectiontabs.php @@ -1,3 +1,4 @@ +/*
<?php
global $friendspicker;
@@ -24,4 +25,49 @@ <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 +</div>
+*/
+
+<?php
+
+?>
+
+<div id="friendsPickerNavigationTabs">
+<ul>
+<li class="selected"><a href="#" class="collectionmembers">Collection members</a></li>
+
+<li><a href="#" class="editmembers">Edit collection</a></li>
+
+</ul>
+</div>
+
+<script type="text/javascript">
+$(document).ready(function () {
+
+ $('a.collectionmembers').click(function () {
+ // load collection members pane
+ $('#friends_picker_placeholder<?php echo $friendspicker; ?>').load('collectionMembers.php');
+
+ // remove selected state from previous tab
+ $(this).parent().parent().find("#friendsPickerNavigationTabs li").removeClass("selected");
+ // add selected class to current tab
+ $(this).parent().addClass("selected");
+
+ return false;
+ });
+
+ $('a.editmembers').click(function () {
+ // load friends picker pane
+ $('#friends_picker_placeholder<?php echo $friendspicker; ?>').load('friendsPicker.php');
+
+ // remove selected state from previous tab
+ $(this).parent().parent().find("#friendsPickerNavigationTabs li").removeClass("selected");
+ // add selected class to current tab
+ $(this).parent().addClass("selected");
+
+ return false;
+ });
+
+
+});
+</script>
\ No newline at end of file |