aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/elgglib.php1
-rw-r--r--engine/lib/input.php24
2 files changed, 16 insertions, 9 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index 64bdf9276..5c9479f74 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -2028,6 +2028,7 @@ function elgg_init() {
elgg_register_page_handler('ajax', 'elgg_ajax_page_handler');
elgg_register_js('elgg.autocomplete', 'js/lib/autocomplete.js');
+ elgg_register_js('jquery.ui.autocomplete.html', 'vendors/jquery/jquery.ui.autocomplete.html.js');
elgg_register_js('elgg.userpicker', 'js/lib/userpicker.js');
elgg_register_js('elgg.friendspicker', 'js/lib/friends_picker.js');
elgg_register_js('jquery.easing', 'vendors/jquery/jquery.easing.1.3.packed.js');
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;
}