commadelimited/autoComplete.js — pull request #23 by neilcoplin (2012-06-15 16:18:54+00:00)
Title: Combination update - IE8 Support, XHR cancelling, Custom Icon Support

New pull request is a combination of three things...

1) Support for Ajax calls in IE8 were hindered by the binding event. The binding event was changed from input.autocomplete to keyup.autocomplete.

(Code changes on new line 120)

2) XHR Cancelling - When an ajax call is made, the widget will now store the request to an internal table with the ID of the widget being the key value. If another call is made with the same ID (ie, same widget), then the previous request will be cancelled before the new request is made. When a call completes (regardless of success), this entry in the table is cleared out. Since this request required changing the .get() call to a .ajax call, I've also added support (and a default) for using GET or POST requests, just in case someone really wanted to use POST. Though the default is GET.

In the function that handles the ajax call cancelling, it will also temporarily post a "Searching..." result until the call finishes. If needed, this can be made such that is more customizable (ie, different text or a custom icon) if we think it's needed. This function also sets a ui-search-active class on the containing fieldset, such that the developer can use it for styling hooks as desired.

(Code changes on new lines 15, 17, 25, 59, and 84-112)

3) Custom Icon Support - Added the ability to set a custom icon on the results listview.

(Code changes on new lines 16, 32 and 34)