diff -r d334a616c023 -r e16a97fb364a src/cm/media/js/lib/yui/yui3-3.15.0/build/autocomplete-sources/autocomplete-sources.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/cm/media/js/lib/yui/yui3-3.15.0/build/autocomplete-sources/autocomplete-sources.js Mon Mar 10 15:19:48 2014 +0100 @@ -0,0 +1,475 @@ +YUI.add('autocomplete-sources', function (Y, NAME) { + +/** +Mixes support for JSONP and YQL result sources into AutoCompleteBase. + +@module autocomplete +@submodule autocomplete-sources +**/ + +var ACBase = Y.AutoCompleteBase, + Lang = Y.Lang, + + _SOURCE_SUCCESS = '_sourceSuccess', + + MAX_RESULTS = 'maxResults', + REQUEST_TEMPLATE = 'requestTemplate', + RESULT_LIST_LOCATOR = 'resultListLocator'; + +// Add prototype properties and methods to AutoCompleteBase. +Y.mix(ACBase.prototype, { + /** + Regular expression used to determine whether a String source is a YQL query. + + @property _YQL_SOURCE_REGEX + @type RegExp + @protected + @for AutoCompleteBase + **/ + _YQL_SOURCE_REGEX: /^(?:select|set|use)\s+/i, + + /** + Runs before AutoCompleteBase's `_createObjectSource()` method and augments + it to support additional object-based source types. + + @method _beforeCreateObjectSource + @param {String} source + @protected + @for AutoCompleteBase + **/ + _beforeCreateObjectSource: function (source) { + // If the object is a ` node as + a source. + + @method _createSelectSource + @param {Node} source YUI Node instance wrapping a `