Sha256: 438a4f9b1b9fa1a46b8ec37b9a7c83b544dc7428b6116860ac8c95d808fbbe2c
Contents?: true
Size: 541 Bytes
Versions: 28
Compression:
Stored size: 541 Bytes
Contents
$(document).ready(function () { 'use strict'; $.each($('td.qty input'), function (i, input) { $(input).on('change', function () { var id = '#' + $(this).prop('id').replace('_quantity', '_id'); Spree.ajax({ url: "/admin/orders/" + $('input#order_number').val() + '/line_items/' + $(id).val(), method: "PUT", data: { "line_item": { "quantity": $(this).val() } }, always: function (resp) { $('#order-form-wrapper').html(resp.responseText); } }); }); }); });
Version data entries
28 entries across 28 versions & 1 rubygems