From 2447aa071c65e99f9981059637054734f3951e0b Mon Sep 17 00:00:00 2001 From: ben Date: Fri, 20 Feb 2009 17:49:05 +0000 Subject: The friends picker now highlights tabs when creating a collection if a user is present there. Also, the separate friends picker in the notification plugin is also now internationalised. git-svn-id: https://code.elgg.org/elgg/trunk@2872 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/friends/picker.php | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'views/default/friends/picker.php') diff --git a/views/default/friends/picker.php b/views/default/friends/picker.php index 877a07782..5b7227c99 100644 --- a/views/default/friends/picker.php +++ b/views/default/friends/picker.php @@ -24,7 +24,11 @@ $internalname = "friend"; } else { $internalname = $vars['internalname']; - } + } + + // Are we highlighting default or all? + if (empty($vars['highlight'])) $vars['highlight'] = 'default'; + if ($vars['highlight'] != 'all') $vars['highlight'] = 'default'; // Initialise values if (!isset($vars['value'])) { @@ -165,10 +169,20 @@ //echo "

" . $user->name . "

"; $label = elgg_view("profile/icon",array('entity' => $friend, 'size' => 'tiny', 'override' => true)); - $options[$label] = $friend->getGUID(); + $options[$label] = $friend->getGUID(); + + if ($vars['highlight'] == 'all' + && !in_array($letter,$activeletters)) { + $activeletters[] = $letter; + } + + if (in_array($friend->getGUID(),$vars['value'])) { $checked = "checked = \"checked\""; - if (!in_array($letter,$activeletters)) + if ( + !in_array($letter,$activeletters) + && $vars['highlight'] == 'default' + ) $activeletters[] = $letter; } else { $checked = ""; -- cgit v1.2.3