From 7dffca0c05420e9734726a6d053b31305e9cda25 Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 25 Feb 2009 12:00:44 +0000 Subject: Unicode character fix for friends picker. Fixes #281 git-svn-id: https://code.elgg.org/elgg/trunk@2941 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/friends/picker.php | 592 ++++++++++++++++++++------------------- 1 file changed, 303 insertions(+), 289 deletions(-) (limited to 'views/default/friends') diff --git a/views/default/friends/picker.php b/views/default/friends/picker.php index 5b7227c99..50c06b65a 100644 --- a/views/default/friends/picker.php +++ b/views/default/friends/picker.php @@ -1,174 +1,180 @@ -name,0,1)); - if (!substr_count($chararray,$letter)) { - $letter = "*"; - } - if (!isset($users[$letter])) { - $users[$letter] = array(); - } - $users[$letter][$user->name] = $user; - - } - - if (!$callback) { - -?> - -
- - - -
- - - - - - -
- - - -
-
-
-name,0,1)); + else + $letter = strtoupper(substr($user->name,0,1)); + if (!substr_count($chararray,$letter)) { + $letter = "*"; + } + if (!isset($users[$letter])) { + $users[$letter] = array(); + } + $users[$letter][$user->name] = $user; + + } + + if (!$callback) { + +?> + +
+ + + +
+ + + + + + + + + + +
+
+
+ + if (is_callable('mb_substr')) + $letter = mb_substr($chararray,0,1); + else + $letter = substr($chararray,0,1); + $letpos = 0; + while (1 == 1) { +?>
-
-

- -"; - $col = 0; - - foreach($users[$letter] as $friend) { - if ($col == 0) echo ""; - - //echo "

" . $user->name . "

"; - $label = elgg_view("profile/icon",array('entity' => $friend, 'size' => 'tiny', 'override' => true)); + ?>"> +
+

+ +"; + $col = 0; + + foreach($users[$letter] as $friend) { + if ($col == 0) echo ""; + + //echo "

" . $user->name . "

"; + $label = elgg_view("profile/icon",array('entity' => $friend, 'size' => 'tiny', 'override' => true)); $options[$label] = $friend->getGUID(); if ($vars['highlight'] == 'all' @@ -176,138 +182,146 @@ $activeletters[] = $letter; } - - if (in_array($friend->getGUID(),$vars['value'])) { - $checked = "checked = \"checked\""; + + if (in_array($friend->getGUID(),$vars['value'])) { + $checked = "checked = \"checked\""; if ( !in_array($letter,$activeletters) && $vars['highlight'] == 'default' - ) - $activeletters[] = $letter; - } else { - $checked = ""; - } - -?> - - - - name="[]" value="" /> - - - - - -
- -
- - -name; - -?> - -"; - $col = 0; - } - } - if ($col < 3) echo ""; - - echo ""; - - } - -?> - -
-
- + + + + name="[]" value="" /> + + + + + +
+ +
+ + +name; + +?> + +"; + $col = 0; + } + } + if ($col < 3) echo ""; + + echo ""; + + } + +?> + +
+
+ -
- - -
-
- - -
- - - - -
-
- - - -
-
- - - - - - + - - + $("div#friendsPickerNavigation li.tab a").addClass("tabHasContent"); + + }); + + + \ No newline at end of file -- cgit v1.2.3