aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-09-07 20:10:27 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-09-07 20:10:27 +0000
commit2992d8477c1a14084214c2cd1244561a08bc3ef4 (patch)
tree2754001857d5c86f7b573dc1c5f3ed33ef10787f
parent67957f0d3247f6134d0010e42facc5ab62af61ba (diff)
downloadelgg-2992d8477c1a14084214c2cd1244561a08bc3ef4.tar.gz
elgg-2992d8477c1a14084214c2cd1244561a08bc3ef4.tar.bz2
Updated livesearch page handler to use classes instead of hard coded css.
git-svn-id: https://code.elgg.org/elgg/trunk@3476 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/input.php13
-rw-r--r--views/default/css.php7
2 files changed, 11 insertions, 9 deletions
diff --git a/engine/lib/input.php b/engine/lib/input.php
index 0ec93763b..fd33cb3d7 100644
--- a/engine/lib/input.php
+++ b/engine/lib/input.php
@@ -167,7 +167,7 @@
* @param $page
* @return unknown_type
*/
- function input_autocomplete_page_handler($page) {
+ function input_livesearch_page_handler($page) {
global $CONFIG;
// only return results to logged in users.
if (!$user = get_loggedin_user()) {
@@ -224,8 +224,7 @@
'type' => 'user',
'name' => $entity->name,
'desc' => $entity->username,
- //'icon' => elgg_view('profile/icon', array('entity' => get_entity($entity->guid), 'size' => 'tiny', 'override' => 'true')),
- 'icon' => '<img style="float: left;" src="' . get_entity($entity->guid)->getIcon('tiny') . '" />',
+ 'icon' => '<img class="livesearch_icon" src="' . get_entity($entity->guid)->getIcon('tiny') . '" />',
'guid' => $entity->guid
));
$results[$entity->name . rand(1,100)] = $json;
@@ -251,8 +250,7 @@
'type' => 'group',
'name' => $entity->name,
'desc' => strip_tags($entity->description),
- //'icon' => elgg_view('groups/icon', array('entity' => get_entity($entity->guid), 'size' => 'tiny', 'override' => 'true')),
- 'icon' => '<img style="float: left;" src="' . get_entity($entity->guid)->getIcon('tiny') . '" />',
+ 'icon' => '<img class="livesearch_icon" src="' . get_entity($entity->guid)->getIcon('tiny') . '" />',
'guid' => $entity->guid
));
//$results[$entity->name . rand(1,100)] = "$json|{$entity->guid}";
@@ -280,8 +278,7 @@
'type' => 'user',
'name' => $entity->name,
'desc' => $entity->username,
- //'icon' => elgg_view('profile/icon', array('entity' => get_entity($entity->guid), 'size' => 'tiny', 'override' => 'true')),
- 'icon' => '<img style="float: left;" src="' . get_entity($entity->guid)->getIcon('tiny') . '" />',
+ 'icon' => '<img class="livesearch_icon" src="' . get_entity($entity->guid)->getIcon('tiny') . '" />',
'guid' => $entity->guid
));
$results[$entity->name . rand(1,100)] = $json;
@@ -305,7 +302,7 @@
function input_init() {
// register an endpoint for live search / autocomplete.
- register_page_handler('autocomplete', 'input_autocomplete_page_handler');
+ register_page_handler('livesearch', 'input_livesearch_page_handler');
if (ini_get_bool('magic_quotes_gpc') ) {
diff --git a/views/default/css.php b/views/default/css.php
index 706c5fe50..d61d5a6c4 100644
--- a/views/default/css.php
+++ b/views/default/css.php
@@ -2596,4 +2596,9 @@ a.delete_report_button:hover {
.user_picker .user_picker_entry {
clear: both;
padding: 1em;
-} \ No newline at end of file
+}
+
+.livesearch_icon {
+ float: left;
+ padding-right: 1em;
+} \ No newline at end of file