Sha256: cc41c042d8920383aa9fc5f12b8ecbcd0682c2c5b7393d204224aa7820dab4fb
Contents?: true
Size: 1.5 KB
Versions: 1
Compression:
Stored size: 1.5 KB
Contents
o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1323253607.633606 :@value{ I"length:EFiI"digest; F"%a361496b4b1f5f65fe01bd3bd149b143I"source; FI"function populateFormFieldAutocomplete(data_source, target_field) { $.get(data_source, function(data) { $(target_field).autocomplete({ minLength: 0, source: function(request, response) { // delegate back to autocomplete, but extract the last term response($.ui.autocomplete.filter(data, request.term.split(/,\s*/).pop())); }, focus: function() { // prevent value inserted on focus return false; }, select: function(event, ui) { var terms = this.value.split(/,\s*/); // remove the current input terms.pop(); // add the selected item terms.push( ui.item.value ); // add placeholder to get the comma-and-space at the end terms.push(""); this.value = terms.join(", "); return false; } }); }); }; function formFieldAutocomplete(data_source, target_field) { if ($(target_field)) { populateFormFieldAutocomplete(data_source, target_field); }; }; function groupsAutocomplete() { formFieldAutocomplete('/admin/groups.json', "input.groups-completer"); }; function keywordsAutocomplete() { formFieldAutocomplete('/admin/keywords.json', "input.keywords-completer"); }; $(function() { groupsAutocomplete(); keywordsAutocomplete(); }); ; FI" _version; F"%d2a0df9b52585470542589dbeee6a253
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
noodall-components-quicklinks-1.0.0 | test/dummy/tmp/cache/assets/D54/7F0/sprockets%2Fc100e2dd0a4f78b607e4bb4a6a9a5211 |