aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-24 18:31:06 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-24 18:31:06 +0000
commit0d6edb46963e86c29b4d9917a48986b7d27aea40 (patch)
tree5d29598b696be12a6d6df36b2d593d731defed41
parent11ecd7e47bd20ec4083e926b0c64586e83193416 (diff)
downloadelgg-0d6edb46963e86c29b4d9917a48986b7d27aea40.tar.gz
elgg-0d6edb46963e86c29b4d9917a48986b7d27aea40.tar.bz2
Tabs on the friend picker now work.
git-svn-id: https://code.elgg.org/elgg/trunk@1515 36083f99-b078-4883-b0ff-0f9b5a30f544
-rwxr-xr-xjavascript/friendsPickerv1.js10
-rw-r--r--views/default/friends/picker.php9
2 files changed, 12 insertions, 7 deletions
diff --git a/javascript/friendsPickerv1.js b/javascript/friendsPickerv1.js
index 3ecf4bfc3..843b2ff9d 100755
--- a/javascript/friendsPickerv1.js
+++ b/javascript/friendsPickerv1.js
@@ -89,11 +89,11 @@ jQuery.fn.friendsPicker = function(settings) {
});
// manually add class to corresponding tab for panels that have content - needs to be automated eventually
- $("div#friendsPickerNavigation" + j + " li.tab3 a").addClass("tabHasContent");
- $("div#friendsPickerNavigation" + j + " li.tab6 a").addClass("tabHasContent");
- $("div#friendsPickerNavigation" + j + " li.tab9 a").addClass("tabHasContent");
- $("div#friendsPickerNavigation" + j + " li.tab17 a").addClass("tabHasContent");
- $("div#friendsPickerNavigation" + j + " li.tab22 a").addClass("tabHasContent");
+ //$("div#friendsPickerNavigation" + j + " li.tab3 a").addClass("tabHasContent");
+ //$("div#friendsPickerNavigation" + j + " li.tab6 a").addClass("tabHasContent");
+ //$("div#friendsPickerNavigation" + j + " li.tab9 a").addClass("tabHasContent");
+ //$("div#friendsPickerNavigation" + j + " li.tab17 a").addClass("tabHasContent");
+ //$("div#friendsPickerNavigation" + j + " li.tab22 a").addClass("tabHasContent");
// generate link to 'all friends in collection' - removed for now
//$("div#friendsPickerNavigation" + j).append("<div class='friendsPickerNavigationAll'><a href='#' >Collection members<\/a></div><br />");
diff --git a/views/default/friends/picker.php b/views/default/friends/picker.php
index c545a643a..a226f24e1 100644
--- a/views/default/friends/picker.php
+++ b/views/default/friends/picker.php
@@ -132,15 +132,20 @@
});
</script>
<script>
+ jQuery(window).bind("load", function() {
// manually add class to corresponding tab for panels that have content - needs to be automated eventually
<?php
-
if (sizeof($users) > 0)
+ $chararray = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
foreach($users as $letter => $gumph) {
+ $tab = strpos($chararray, $letter) + 1;
+ if (is_array($gumph) && sizeof($gumph)) {
?>
- $("div#friendsPickerNavigation" + j + " li.tab3 <?php echo $letter; ?>").addClass("tabHasContent");
+ $("div#friendsPickerNavigation<?php echo $friendspicker - 1; ?> li.tab<?php echo $tab; ?> a").addClass("tabHasContent");
<?php
+ }
}
?>
+ });
</script> \ No newline at end of file