Sha256: 9914ca678987ced2fc08912c804ad78f04592116caf906c1f0936d7a4c0084c6

Contents?: true

Size: 507 Bytes

Versions: 22

Compression:

Stored size: 507 Bytes

Contents

$(document).ready(function () {
  'use strict';

  $.each($('td.qty input'), function (i, input) {

    $(input).on('change', function () {

      var id = '#' + $(this).attr('id').replace('_quantity', '_id');

      $.post('/admin/orders/' + $('input#order_number').val() + '/line_items/' + $(id).val(), {
          _method: 'put',
          'line_item[quantity]': $(this).val()
        },

        function (resp) {
          $('#order-form-wrapper').html(resp.responseText);
        });
    });
  });
});

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
spree_backend-2.0.5 app/assets/javascripts/admin/orders/edit_form.js
spree_backend-2.1.0 app/assets/javascripts/admin/orders/edit_form.js