%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2012 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)
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 );
+ };
}
});