{I" class:ETI"ProcessedAsset;FI"logical_path;TI"$alchemy/alchemy.autocomplete.js;FI" pathname;TI"y/Users/tvd/.rvm/gems/ruby-2.1.2/gems/alchemy_cms-3.0.0/app/assets/javascripts/alchemy/alchemy.autocomplete.js.coffee;FI"content_type;TI"application/javascript;TI" mtime;Tl+9ÚþSI" length;TiGI" digest;TI"%81e5e25210543575afc469abf919f80a;FI" source;TI"G(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: this, text: this }); }); return callback(data); } }; }).call(this); ;TI"dependency_digest;TI"%fed0f4a9bb67216c9bf1c1c930073c48;FI"required_paths;T[I"y/Users/tvd/.rvm/gems/ruby-2.1.2/gems/alchemy_cms-3.0.0/app/assets/javascripts/alchemy/alchemy.autocomplete.js.coffee;FI"dependency_paths;T[{I" path;TI"y/Users/tvd/.rvm/gems/ruby-2.1.2/gems/alchemy_cms-3.0.0/app/assets/javascripts/alchemy/alchemy.autocomplete.js.coffee;FI" mtime;TI"2014-08-28T09:28:57+02:00;TI" digest;TI"%af094899dbaea6bb6b04c052f2e3337e;FI" _version;TI"%1005ed9f20e25fb0a0599a7017dd0e6b;F