Sha256: dc98920d0593eedcd29c7f3baf235a71f06ff180c61947d6aa3badeba7855469

Contents?: true

Size: 540 Bytes

Versions: 49

Compression:

Stored size: 540 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');

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

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

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
spree_backend-2.3.10 app/assets/javascripts/spree/backend/orders/edit_form.js
spree_backend-3.0.0 app/assets/javascripts/spree/backend/orders/edit_form.js
spree_backend-2.4.6 app/assets/javascripts/spree/backend/orders/edit_form.js
spree_backend-2.3.9 app/assets/javascripts/spree/backend/orders/edit_form.js
spree_backend-2.2.11 app/assets/javascripts/spree/backend/orders/edit_form.js
spree_backend-2.2.10 app/assets/javascripts/spree/backend/orders/edit_form.js
spree_backend-2.3.8 app/assets/javascripts/spree/backend/orders/edit_form.js
spree_backend-2.4.5 app/assets/javascripts/spree/backend/orders/edit_form.js
spree_backend-3.0.0.rc4 app/assets/javascripts/spree/backend/orders/edit_form.js