Sha256: ad399a090c0bb021b2eececf0c1bec542c2bf596fa22c26ded9aaae9f09cf7c1

Contents?: true

Size: 1.09 KB

Versions: 1

Compression:

Stored size: 1.09 KB

Contents

o: ActiveSupport::Cache::Entry	:@compressedF:@expires_in0:@created_atf1323253607.675801@S:@value{	I"length:EFimI"digest;
F"%29dbf013bec085a8bb2c2892d0ee9bcfI"source;
FI"mfunction tagsAutocomplete() {
  $.get('/admin/assets/tags.json', function(data) {
    $("input#asset_tag_list").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() {
  tagsAutocomplete();
});
;
FI"
_version;
F"%44a30c7fda384422922d3131b383b347

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
noodall-components-quicklinks-1.0.0 test/dummy/tmp/cache/assets/CD7/CE0/sprockets%2F56287e2301a4078c627f1ffc1fca1435