Sha256: 702a24fd767babd7cc4ab580457c0d3e6712e34fbd839e020bc5bad247d48660

Contents?: true

Size: 559 Bytes

Versions: 6

Compression:

Stored size: 559 Bytes

Contents

$(document).ready(function() {

  $("#add_line_item_to_order").on("click", function() {
    if($('#add_variant_id').val() == ''){ return false; }

    update_target = '#' + $(this).attr("data-update");
    $.post(this.href,
           { "line_item[variant_id]": $('#add_variant_id').val(),
             "line_item[quantity]": $('#add_quantity').val() },
           function(data) {
             $(update_target).html(data);
           });
    return false;
  });

  $('[data-hook="add_product_name"]').find(".variant_autocomplete").variantAutocomplete();
});

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
spree_backend-2.0.4 app/assets/javascripts/admin/orders/edit.js
spree_backend-2.0.3 app/assets/javascripts/admin/orders/edit.js
spree_backend-2.0.2 app/assets/javascripts/admin/orders/edit.js
spree_backend-2.0.1 app/assets/javascripts/admin/orders/edit.js
spree_backend-2.0.0 app/assets/javascripts/admin/orders/edit.js
spree_backend-2.0.0.rc1 app/assets/javascripts/admin/orders/edit.js