o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1330634906.588452: @value"W {I" class:EFI"ProcessedAsset;FI"logical_path;F""umlaut/search_autocomplete.jsI" pathname;F"O/home/rochkind/umlaut/app/assets/javascripts/umlaut/search_autocomplete.jsI"content_type;FI"application/javascript;FI" mtime;FI"2012-02-29T14:11:58-05:00;FI" length;FiWI" digest;F"%0a88c188d98b6d16fb0389a9f4016229I" source;FI"W/* search_autocomplete.js. Add autocomplete to Umlaut journal title search. */ jQuery(document).ready(function($) { $("form.OpenURL").live("submit", function() { var form = $(this); if ( form.find(".rft_title").val() != $(this).val()) { form.find(".rft_object_id").val(""); form.find(".rft_title").val(""); } }); $("input.title_search").autocomplete({ minLength: 3, source: function(request, response) { var form = $(this.element).closest("form"); $.ajax({ url: form.attr("action").replace("journal_search", "auto_complete_for_journal_title"), dataType: "json", data: form.serialize(), success: function(data) { response($.map(data, function(item) { return { label: item.title, id: item.object_id } })); } }); }, select: function(event, ui) { var form = $(event.target).closest("form"); form.find("input.rft_object_id").val(ui.item.id); form.find("input.rft_title").val( ui.item.label ); form.find("select.sfx_title_search").val("exact"); } }); }); /* select: function(event, ui) { log(ui.item ? ("Selected: " + ui.item.value + ", geonameId: " + ui.item.id) : "Nothing selected, input was " + this.value); } }); */ ; ;FI"dependency_digest;F"%e2708a0be8a3193d505c24e4711e04fbI"required_paths;F["O/home/rochkind/umlaut/app/assets/javascripts/umlaut/search_autocomplete.jsI"dependency_paths;F[{I" path;F"O/home/rochkind/umlaut/app/assets/javascripts/umlaut/search_autocomplete.jsI" mtime;FI"2012-02-29T14:11:58-05:00;FI" digest;F"%2064d3e717bb9e082e5b4e194fe68094I" _version;F"%aa7d0db7619379e13b08335dee027df2