{I" class:ETI"ProcessedAsset;FI"logical_path;TI"$alchemy/alchemy.autocomplete.js;FI" pathname;TI"/Users/tvd/.rvm/gems/ruby-2.1.5/gems/alchemy_cms-3.1.0.beta2/app/assets/javascripts/alchemy/alchemy.autocomplete.js.coffee;FI"content_type;TI"application/javascript;TI" mtime;Tl+š’TI" length;TiOI" digest;TI"%50d7479389de2a8732fe2b394a11978d;FI" source;TI"O(function() { if (typeof window.Alchemy === 'undefined') { window.Alchemy = {}; } Alchemy.Autocomplete = { tags: function(scope) { var field, url; field = $('[data-autocomplete]', scope); url = field.data('autocomplete'); return field.select2({ tags: true, tokenSeparators: [","], minimumInputLength: 1, openOnEnter: false, createSearchChoice: this._createResultItem, ajax: { url: url, dataType: 'json', data: function(term, page) { return { term: term }; }, results: function(data, page) { return { results: data }; } }, initSelection: this._initializeSelection }); }, _createResultItem: function(term, data) { if ($(data).filter(function() { return this.text.localeCompare(term) === 0; }).length === 0) { return { id: term, text: term }; } }, _initializeSelection: function(element, callback) { var data; data = []; $(element.val().split(",")).each(function() { return data.push({ id: $.trim(this), text: this }); }); return callback(data); } }; }).call(this); ;TI"dependency_digest;TI"%0a06b62bf21042205da670015e11f2ff;FI"required_paths;T[I"/Users/tvd/.rvm/gems/ruby-2.1.5/gems/alchemy_cms-3.1.0.beta2/app/assets/javascripts/alchemy/alchemy.autocomplete.js.coffee;FI"dependency_paths;T[{I" path;TI"/Users/tvd/.rvm/gems/ruby-2.1.5/gems/alchemy_cms-3.1.0.beta2/app/assets/javascripts/alchemy/alchemy.autocomplete.js.coffee;FI" mtime;TI"2014-12-17T23:15:54+01:00;TI" digest;TI"%99efb077f166cc082d3930db8f2d4f4c;FI" _version;TI"%e4fae582d35919173aa703e1ae9b242e;F