63b7fb6d8982a8aeec3b0de4fa10fe2be796ab26 |
|
12-Nov-2010 |
Ryan Grove <ryan@wonko.com> |
Refactor the way results are passed to filters, highlighters, and formatters. [Fixes #2529522]
Previously, result filters received an array of raw results,
highlighters received an array of text result strings, and formatters
received several arrays containing different result formats.
This commit changes this behavior: filters, highlighters, and formatters
now all receive a single array of result objects. Each object has
several properties (display, highlighted, raw, text) representing the
various formats of a given result.
Filters are expected to return an array of result objects. Highlighters
should return an array of highlighted result text strings. Formatters
should return an array of HTML strings or Node instances. |
8a473112ab5d8c74fb79ef0553ba5f038fe3bde3 |
|
29-Sep-2010 |
Ryan Grove <ryan@wonko.com> |
AutoComplete source may now be set to a YQL query string.
When the source is a string, AutoComplete will detect whether it's a YQL
query or a URL. If it's a URL, it'll be loaded via the jsonp module. If
it's a YQL query, the query will be executed via the yql module.
That means the following implementation code is all that's needed to
instantiate a working AutoCompleteList widget that displays search
suggestions as you type:
var ac = new Y.AutoComplete({
inputNode: '#foo',
source: 'select * from search.suggest where query="{query}"'
}).render();
The necessary module (either jsonp or yql) must already be loaded;
AutoComplete doesn't pull them in by default in order to avoid
increasing its dependency payload unnecessarily. |