From 164b3f7415db67af83a883ddb9b2701781809f52 Mon Sep 17 00:00:00 2001 From: Julius Date: Mon, 8 Jul 2013 22:49:49 +0200 Subject: [PATCH] Replace deprecated $.fn.live in delivery form --- app/views/deliveries/_form.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/deliveries/_form.html.haml b/app/views/deliveries/_form.html.haml index 571665c6..0c3c2fda 100644 --- a/app/views/deliveries/_form.html.haml +++ b/app/views/deliveries/_form.html.haml @@ -1,7 +1,7 @@ - content_for :javascript do :javascript $(function() { - $('.destroy_stock_change').live('click', function() { + $('#stock_changes').on('click', '.destroy_stock_change', function() { $(this).prev('input').val('1'); // check for destruction var stock_change = $(this).closest('tr'); @@ -11,7 +11,7 @@ return false; }); - $('.remove_new_stock_change').live('click', function() { + $('#stock_changes').on('click', '.remove_new_stock_change', function() { var stock_change = $(this).closest('tr'); stock_change.remove(); mark_article_for_delivery( stock_change.data('id') );