{I" class:ETI"ProcessedAsset;FI"logical_path;TI"$spree/backend/checkouts/edit.js;FI" pathname;TI"x/usr/local/rvm/gems/ruby-2.0.0-p481/gems/spree_backend-2.2.4/app/assets/javascripts/spree/backend/checkouts/edit.js;FI"content_type;TI"application/javascript;TI" mtime;Tl+Æ‘TI" length;TiåI" digest;TI"%920869a9c7f5e9108392a1e2a1090c4d;FI" source;TI"å$(document).ready(function() { if ($('#customer_autocomplete_template').length > 0) { window.customerTemplate = Handlebars.compile($('#customer_autocomplete_template').text()); } formatCustomerResult = function(customer) { return customerTemplate({ customer: customer, bill_address: customer.bill_address, ship_address: customer.ship_address }) } if ($("#customer_search").length > 0) { $("#customer_search").select2({ placeholder: Spree.translations.choose_a_customer, ajax: { url: Spree.routes.user_search, datatype: 'json', data: function(term, page) { return { q: term } }, results: function(data, page) { return { results: data } } }, dropdownCssClass: 'customer_search', formatResult: formatCustomerResult, formatSelection: function (customer) { $('#order_email').val(customer.email); $('#user_id').val(customer.id); $('#guest_checkout_true').prop("checked", false); $('#guest_checkout_false').prop("checked", true); $('#guest_checkout_false').prop("disabled", false); return customer.email; } }) } var order_use_billing_input = $('input#order_use_billing'); var order_use_billing = function () { if (!order_use_billing_input.is(':checked')) { $('#shipping').show(); } else { $('#shipping').hide(); } }; order_use_billing_input.click(function() { order_use_billing(); }); order_use_billing(); $('#guest_checkout_true').change(function() { $('#customer_search').val(""); $('#user_id').val(""); $('#checkout_email').val(""); var fields = ["firstname", "lastname", "company", "address1", "address2", "city", "zipcode", "state_id", "country_id", "phone"] $.each(fields, function(i, field) { $('#order_bill_address_attributes' + field).val(""); $('#order_ship_address_attributes' + field).val(""); }) }); }); ;TI"dependency_digest;TI"%d43a10f252591205baae0ade7131bd50;FI"required_paths;T[I"x/usr/local/rvm/gems/ruby-2.0.0-p481/gems/spree_backend-2.2.4/app/assets/javascripts/spree/backend/checkouts/edit.js;FI"dependency_paths;T[{I" path;TI"x/usr/local/rvm/gems/ruby-2.0.0-p481/gems/spree_backend-2.2.4/app/assets/javascripts/spree/backend/checkouts/edit.js;FI" mtime;TI"2014-09-04T12:22:30-04:00;TI" digest;TI"%572aff6522ada1b90bf4e3543ef9aade;FI" _version;TI"%5ef14a844324cba3e114bd0123f88a5e;F