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