Files
openfoodnetwork/app/assets/javascripts/darkswarm/cart.js.coffee
2021-07-18 11:25:01 +01:00

10 lines
403 B
CoffeeScript

$ ->
if $('form#update-cart').is('*') || $('form#update-order').is('*')
$('form#update-cart a.delete, form#update-order a.delete').show().one 'click', ->
$(this).parents('.line-item').first().find('input.line_item_quantity').val 0
$(this).parents('form').first().submit()
false
($ 'form#update-cart').submit ->
($ 'form#update-cart #update-button').attr('disabled', true)