Sha256: 360f2616062e5d594bb32c9967091dcca2b076bc89e3b93cb8a09153e33e25fc
Contents?: true
Size: 836 Bytes
Versions: 7
Compression:
Stored size: 836 Bytes
Contents
Spree.ready(function() { $('.js-edit-stock-item').each(function() { var $el = $(this); var model = new Spree.Models.StockItem($el.data('stock-item')); var trackInventory = $el.data('track-inventory'); new Spree.Views.Stock.EditStockItemRow({ el: $el, stockLocationName: $el.data('stock-location-name'), model: model }); if (trackInventory === false) { $('.js-edit-stock-item input').attr({ disabled: true, class: 'with-tip', title: '"Track inventory" option disabled for this variant' }); } }); $('.js-add-stock-item').each(function() { var $el = $(this) var model = new Spree.Models.StockItem({ variant_id: $el.data('variant-id') }); new Spree.Views.Stock.AddStockItem({ el: $el, model: model }); }); });
Version data entries
7 entries across 7 versions & 1 rubygems