aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/input.php
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-10-06 22:27:33 -0400
committercash <cash.costello@gmail.com>2011-10-06 22:27:33 -0400
commit28da2f9dcb560687d4904e7629ad38049ed3188a (patch)
treecc91a2192752458884c262cf762753ff4557c086 /engine/lib/input.php
parent41256f644b02bf4dcb2bc3798bdf470fa93515da (diff)
downloadelgg-28da2f9dcb560687d4904e7629ad38049ed3188a.tar.gz
elgg-28da2f9dcb560687d4904e7629ad38049ed3188a.tar.bz2
using html extension to jquery.ui autocomplete
Diffstat (limited to 'engine/lib/input.php')
-rw-r--r--engine/lib/input.php24
1 files changed, 15 insertions, 9 deletions
diff --git a/engine/lib/input.php b/engine/lib/input.php
index 127113205..e7c3a3d99 100644
--- a/engine/lib/input.php
+++ b/engine/lib/input.php
@@ -288,13 +288,19 @@ function input_livesearch_page_handler($page) {
if ($entities = get_data($query)) {
foreach ($entities as $entity) {
+ if (in_array('groups', $match_on)) {
+ $value = $entity->guid;
+ } else {
+ $value = $entity->username;
+ }
+
$result = array(
'type' => 'user',
'name' => $entity->name,
'desc' => $entity->username,
- 'icon' => '<img class="elgg-livesearch-icon" src="' .
- get_entity($entity->guid)->getIconURL('tiny') . '" />',
- 'guid' => $entity->guid
+ 'guid' => $entity->guid,
+ 'label' => elgg_view_list_item(get_entity($entity->guid), array('hover' => false)),
+ 'value' => $value,
);
$results[$entity->name . rand(1, 100)] = $result;
}
@@ -319,9 +325,9 @@ function input_livesearch_page_handler($page) {
'type' => 'group',
'name' => $entity->name,
'desc' => strip_tags($entity->description),
- 'icon' => '<img class="elgg-livesearch-icon" src="'
- . get_entity($entity->guid)->getIconURL('tiny') . '" />',
- 'guid' => $entity->guid
+ 'guid' => $entity->guid,
+ 'label' => elgg_view_list_item(get_entity($entity->guid)),
+ 'value' => $entity->guid,
);
$results[$entity->name . rand(1, 100)] = $result;
@@ -350,9 +356,9 @@ function input_livesearch_page_handler($page) {
'type' => 'user',
'name' => $entity->name,
'desc' => $entity->username,
- 'icon' => '<img class="elgg-livesearch-icon" src="'
- . get_entity($entity->guid)->getIconURL('tiny') . '" />',
- 'guid' => $entity->guid
+ 'guid' => $entity->guid,
+ 'label' => elgg_view_list_item(get_entity($entity->guid), array('hover' => false)),
+ 'value' => $entity->username,
);
$results[$entity->name . rand(1, 100)] = $result;
}