Sha256: b5c4348b0e7147673abc230c37a0fe47c48ead36c2489c136d5f6d33c5a62673

Contents?: true

Size: 601 Bytes

Versions: 14

Compression:

Stored size: 601 Bytes

Contents

jQuery(document).ready(function(){
  $.each($('td.qty input'), function(i, inpt){
    $(inpt).delayedObserver(0.5, function(object, value) {

      var id = object.attr('id').replace("order_line_items_attributes_", "").replace("_quantity", "");
      id = "#order_line_items_attributes_" + id + "_id";

      jQuery.ajax({
        type: "POST",
        url: "/admin/orders/" + $('input#order_number').val() + "/line_items/" + $(id).val(),
        data: ({_method: "put", "line_item[quantity]": value}),
        success: function(html){ $('#order-form-wrapper').html(html)}
      });

    });
  });
});

Version data entries

14 entries across 9 versions & 1 rubygems

Version Path
spree-0.11.4 vendor/extensions/theme_default/public/javascripts/admin/orders/edit_form.js
spree-0.11.3 vendor/extensions/theme_default/public/javascripts/admin/orders/edit_form.js
spree-0.11.2 vendor/extensions/theme_default/public/javascripts/admin/orders/edit_form.js
spree-0.11.1 vendor/extensions/theme_default/public/javascripts/admin/orders/edit_form.js
spree-0.11.0 public/javascripts/admin/orders/edit_form.js
spree-0.11.0 vendor/extensions/theme_default/public/javascripts/admin/orders/edit_form.js
spree-0.10.2 vendor/extensions/theme_default/public/javascripts/admin/orders/edit_form.js
spree-0.10.2 public/javascripts/admin/orders/edit_form.js
spree-0.10.1 vendor/extensions/theme_default/public/javascripts/admin/orders/edit_form.js
spree-0.10.1 public/javascripts/admin/orders/edit_form.js
spree-0.10.0 vendor/extensions/theme_default/public/javascripts/admin/orders/edit_form.js
spree-0.10.0 public/javascripts/admin/orders/edit_form.js
spree-0.10.0.beta vendor/extensions/theme_default/public/javascripts/admin/orders/edit_form.js
spree-0.10.0.beta public/javascripts/admin/orders/edit_form.js