{I" class:ETI"ProcessedAsset;FI"logical_path;TI"spree/backend/taxons.js;FI" pathname;TI"w/usr/local/rvm/gems/ruby-2.0.0-p481/gems/spree_backend-2.2.4/app/assets/javascripts/spree/backend/taxons.js.coffee;FI"content_type;TI"application/javascript;TI" mtime;Tl+ƑTI" length;Ti I" digest;TI"%8d025946dd6d287daa9c67410810ba8d;FI" source;TI" (function() { $(document).ready(function() { window.productTemplate = Handlebars.compile($('#product_template').text()); $('#taxon_products').sortable(); $('#taxon_products').on("sortstop", function(event, ui) { return $.ajax({ url: Spree.routes.classifications_api, method: 'PUT', data: { product_id: ui.item.data('product-id'), taxon_id: $('#taxon_id').val(), position: ui.item.index() } }); }); if ($('#taxon_id').length > 0) { $('#taxon_id').select2({ dropdownCssClass: "taxon_select_box", placeholder: Spree.translations.find_a_taxon, ajax: { url: Spree.routes.taxons_search, datatype: 'json', data: function(term, page) { return { per_page: 50, page: page, q: { name_cont: term } }; }, results: function(data, page) { var more; more = page < data.pages; return { results: data['taxons'], more: more }; } }, formatResult: function(taxon) { return taxon.pretty_name; }, formatSelection: function(taxon) { return taxon.pretty_name; } }); } return $('#taxon_id').on("change", function(e) { var el; el = $('#taxon_products'); return $.ajax({ url: Spree.routes.taxon_products_api, data: { id: e.val }, success: function(data) { var product, _i, _len, _ref; el.empty(); if (data.products.length === 0) { $('#sorting_explanation').hide(); return $('#taxon_products').html("

" + Spree.translations.no_results + "

"); } else { _ref = data.products; for (_i = 0, _len = _ref.length; _i < _len; _i++) { product = _ref[_i]; if (product.master.images[0] !== void 0 && product.master.images[0].small_url !== void 0) { product.image = product.master.images[0].small_url; } el.append(productTemplate({ product: product })); } return $('#sorting_explanation').show(); } } }); }); }); }).call(this); ;TI"dependency_digest;TI"%1f6db9ffe5f3b37c9cd6244a26ce32bf;FI"required_paths;T[I"w/usr/local/rvm/gems/ruby-2.0.0-p481/gems/spree_backend-2.2.4/app/assets/javascripts/spree/backend/taxons.js.coffee;FI"dependency_paths;T[{I" path;TI"w/usr/local/rvm/gems/ruby-2.0.0-p481/gems/spree_backend-2.2.4/app/assets/javascripts/spree/backend/taxons.js.coffee;FI" mtime;TI"2014-09-04T12:22:30-04:00;TI" digest;TI"%b9020686e09319c6205e39c635b2ee16;FI" _version;TI"%5ef14a844324cba3e114bd0123f88a5e;F