Sha256: d218a04215b7d0342f6d1ca8d42238ff4b1421e86345a1223c2c97556cfbfa01

Contents?: true

Size: 578 Bytes

Versions: 12

Compression:

Stored size: 578 Bytes

Contents

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

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

    var 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

12 entries across 12 versions & 1 rubygems

Version Path
spree_backend-2.0.13 app/assets/javascripts/admin/orders/edit.js
spree_backend-2.0.12 app/assets/javascripts/admin/orders/edit.js
spree_backend-2.0.11 app/assets/javascripts/admin/orders/edit.js
spree_backend-2.0.10 app/assets/javascripts/admin/orders/edit.js
spree_backend-2.0.9 app/assets/javascripts/admin/orders/edit.js
spree_backend-2.0.8 app/assets/javascripts/admin/orders/edit.js
spree_backend-2.0.7 app/assets/javascripts/admin/orders/edit.js
spree_backend-2.1.2 app/assets/javascripts/admin/orders/edit.js
spree_backend-2.0.6 app/assets/javascripts/admin/orders/edit.js
spree_backend-2.1.1 app/assets/javascripts/admin/orders/edit.js
spree_backend-2.0.5 app/assets/javascripts/admin/orders/edit.js
spree_backend-2.1.0 app/assets/javascripts/admin/orders/edit.js