aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-10-12 21:40:18 -0400
committercash <cash.costello@gmail.com>2011-10-12 21:40:18 -0400
commit7effddf7a260e9d731fd33914d6ea3121ddb1d84 (patch)
tree6b8f7c7f66ff3b227084cf737f0de4252a5572b5 /engine/lib
parent28da2f9dcb560687d4904e7629ad38049ed3188a (diff)
downloadelgg-7effddf7a260e9d731fd33914d6ea3121ddb1d84.tar.gz
elgg-7effddf7a260e9d731fd33914d6ea3121ddb1d84.tar.bz2
Simple theme for autocomplete
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/input.php21
1 files changed, 18 insertions, 3 deletions
diff --git a/engine/lib/input.php b/engine/lib/input.php
index e7c3a3d99..ceda2be3b 100644
--- a/engine/lib/input.php
+++ b/engine/lib/input.php
@@ -294,12 +294,17 @@ function input_livesearch_page_handler($page) {
$value = $entity->username;
}
+ $output = elgg_view_list_item(get_entity($entity->guid), array(
+ 'hover' => false,
+ 'class' => 'elgg-autocomplete-item',
+ ));
+
$result = array(
'type' => 'user',
'name' => $entity->name,
'desc' => $entity->username,
'guid' => $entity->guid,
- 'label' => elgg_view_list_item(get_entity($entity->guid), array('hover' => false)),
+ 'label' => $output,
'value' => $value,
);
$results[$entity->name . rand(1, 100)] = $result;
@@ -321,12 +326,17 @@ function input_livesearch_page_handler($page) {
";
if ($entities = get_data($query)) {
foreach ($entities as $entity) {
+ $output = elgg_view_list_item(get_entity($entity->guid), array(
+ 'hover' => false,
+ 'class' => 'elgg-autocomplete-item',
+ ));
+
$result = array(
'type' => 'group',
'name' => $entity->name,
'desc' => strip_tags($entity->description),
'guid' => $entity->guid,
- 'label' => elgg_view_list_item(get_entity($entity->guid)),
+ 'label' => $output,
'value' => $entity->guid,
);
@@ -352,12 +362,17 @@ function input_livesearch_page_handler($page) {
if ($entities = get_data($query)) {
foreach ($entities as $entity) {
+ $output = elgg_view_list_item(get_entity($entity->guid), array(
+ 'hover' => false,
+ 'class' => 'elgg-autocomplete-item',
+ ));
+
$result = array(
'type' => 'user',
'name' => $entity->name,
'desc' => $entity->username,
'guid' => $entity->guid,
- 'label' => elgg_view_list_item(get_entity($entity->guid), array('hover' => false)),
+ 'label' => $output,
'value' => $entity->username,
);
$results[$entity->name . rand(1, 100)] = $result;