Replace deprecated $.fn.live in delivery form
This commit is contained in:
parent
f76b9da1e9
commit
164b3f7415
1 changed files with 2 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
- content_for :javascript do
|
- content_for :javascript do
|
||||||
:javascript
|
:javascript
|
||||||
$(function() {
|
$(function() {
|
||||||
$('.destroy_stock_change').live('click', function() {
|
$('#stock_changes').on('click', '.destroy_stock_change', function() {
|
||||||
$(this).prev('input').val('1'); // check for destruction
|
$(this).prev('input').val('1'); // check for destruction
|
||||||
|
|
||||||
var stock_change = $(this).closest('tr');
|
var stock_change = $(this).closest('tr');
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.remove_new_stock_change').live('click', function() {
|
$('#stock_changes').on('click', '.remove_new_stock_change', function() {
|
||||||
var stock_change = $(this).closest('tr');
|
var stock_change = $(this).closest('tr');
|
||||||
stock_change.remove();
|
stock_change.remove();
|
||||||
mark_article_for_delivery( stock_change.data('id') );
|
mark_article_for_delivery( stock_change.data('id') );
|
||||||
|
|
Loading…
Reference in a new issue