summaryrefslogtreecommitdiff
path: root/rt/share/html/NoAuth/js/userautocomplete.js
diff options
context:
space:
mode:
Diffstat (limited to 'rt/share/html/NoAuth/js/userautocomplete.js')
-rw-r--r--rt/share/html/NoAuth/js/userautocomplete.js20
1 files changed, 18 insertions, 2 deletions
diff --git a/rt/share/html/NoAuth/js/userautocomplete.js b/rt/share/html/NoAuth/js/userautocomplete.js
index 3c3f5fe07..b2b0f765a 100644
--- a/rt/share/html/NoAuth/js/userautocomplete.js
+++ b/rt/share/html/NoAuth/js/userautocomplete.js
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -105,6 +105,22 @@ jQuery(function() {
if (queryargs.length)
options.source += "?" + queryargs.join("&");
- jQuery(input).autocomplete(options);
+ jQuery(input)
+ .addClass('autocompletes-user')
+ .autocomplete(options)
+ .data("autocomplete")
+ ._renderItem = function(ul, item) {
+ var rendered = jQuery("<a/>");
+
+ if (item.html == null)
+ rendered.text( item.label );
+ else
+ rendered.html( item.html );
+
+ return jQuery("<li/>")
+ .data( "item.autocomplete", item )
+ .append( rendered )
+ .appendTo( ul );
+ };
}
});