diff -r 322d0feea350 -r 89ef5ed3c48b src/cm/media/js/lib/yui/yui_3.10.3/build/autocomplete-sources/autocomplete-sources.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/cm/media/js/lib/yui/yui_3.10.3/build/autocomplete-sources/autocomplete-sources.js Tue Jul 16 14:29:46 2013 +0200 @@ -0,0 +1,482 @@ +/* +YUI 3.10.3 (build 2fb5187) +Copyright 2013 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ + +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 `