diff options
author | cash <cash.costello@gmail.com> | 2011-10-06 22:27:33 -0400 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2011-10-06 22:27:33 -0400 |
commit | 28da2f9dcb560687d4904e7629ad38049ed3188a (patch) | |
tree | cc91a2192752458884c262cf762753ff4557c086 /views/default/input | |
parent | 41256f644b02bf4dcb2bc3798bdf470fa93515da (diff) | |
download | elgg-28da2f9dcb560687d4904e7629ad38049ed3188a.tar.gz elgg-28da2f9dcb560687d4904e7629ad38049ed3188a.tar.bz2 |
using html extension to jquery.ui autocomplete
Diffstat (limited to 'views/default/input')
-rw-r--r-- | views/default/input/autocomplete.php | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/views/default/input/autocomplete.php b/views/default/input/autocomplete.php index 421541e24..e58eb1ae8 100644 --- a/views/default/input/autocomplete.php +++ b/views/default/input/autocomplete.php @@ -8,7 +8,7 @@ * @todo This currently only works for ONE AUTOCOMPLETE TEXT FIELD on a page. * * @uses $vars['value'] Current value for the text input - * @uses $vars['match_on'] Array | str What to match on. all|array(groups|users|friends|subtype) + * @uses $vars['match_on'] Array | str What to match on. all|array(groups|users|friends) * @uses $vars['match_owner'] Bool. Match only entities that are owned by logged in user. * @uses $vars['class'] Additional CSS class */ @@ -26,15 +26,19 @@ $defaults = array( $vars = array_merge($defaults, $vars); -$ac_url_params = http_build_query(array( - 'match_on' => $vars['match_on'], - 'match_owner' => $vars['match_owner'], -)); - -unset($vars['match_on']); -unset($vars['match_owner']); +$params = array(); +if (isset($vars['match_on'])) { + $params['match_on'] = $vars['match_on']; + unset($vars['match_on']); +} +if (isset($vars['match_owner'])) { + $params['match_owner'] = $vars['match_owner']; + unset($vars['match_owner']); +} +$ac_url_params = http_build_query($params); elgg_load_js('elgg.autocomplete'); +elgg_load_js('jquery.ui.autocomplete.html'); ?> |