Sha256: 3f5208794e65d6cd1e8b59cc9a6d4accbfb26c9bae8ebb9559a9908526079953

Contents?: true

Size: 1.65 KB

Versions: 4

Compression:

Stored size: 1.65 KB

Contents

{I"
class:ETI"BundledAsset;FI"logical_path;TI".spree/backend/option_type_autocomplete.js;FI"
pathname;TI"/usr/local/rvm/gems/ruby-2.0.0-p481/gems/spree_backend-2.2.4/app/assets/javascripts/spree/backend/option_type_autocomplete.js.erb;FI"content_type;TI"application/javascript;TI"
mtime;Tl+ƑTI"length;TiI"digest;TI"%caf12317f64f81a42f18d77a042cd133;FI"source;TI"$(document).ready(function () {
  'use strict';

  if ($('#product_option_type_ids').length > 0) {
    $('#product_option_type_ids').select2({
      placeholder: Spree.translations.option_type_placeholder,
      multiple: true,
      initSelection: function (element, callback) {
        var url = Spree.url(Spree.routes.option_type_search, {
          ids: element.val()
        });
        return $.getJSON(url, null, function (data) {
          return callback(data);
        });
      },
      ajax: {
        url: Spree.routes.option_type_search,
        quietMillis: 200,
        datatype: 'json',
        data: function (term) {
          return {
            q: {
              name_cont: term
            },
            token: Spree.api_key
          };
        },
        results: function (data) {
          return {
            results: data
          };
        }
      },
      formatResult: function (option_type) {
        return option_type.presentation + ' (' + option_type.name + ')';
      },
      formatSelection: function (option_type) {
        return option_type.presentation + ' (' + option_type.name + ')';
      }
    });
  }
});
;TI"required_assets_digest;TI"%bf75c9d5741cd4696051e033dd028a38;FI"
_version;TI"%5ef14a844324cba3e114bd0123f88a5e;F

Version data entries

4 entries across 2 versions & 1 rubygems

Version Path
bcms_spree-0.0.2 test/dummy/tmp/cache/assets/development/sprockets/28413db8bae7e3a80d80502126d417da
bcms_spree-0.0.2 test/dummy/tmp/cache/assets/development/sprockets/8676d9f45591ad76928300d654c097e4
bcms_spree-0.0.1 test/dummy/tmp/cache/assets/development/sprockets/28413db8bae7e3a80d80502126d417da
bcms_spree-0.0.1 test/dummy/tmp/cache/assets/development/sprockets/8676d9f45591ad76928300d654c097e4