$ -> 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)