make click work better on touch devices (closes foodcoops#104)
This commit is contained in:
parent
23ee2ef0fb
commit
7ebb2459e0
7 changed files with 84 additions and 11 deletions
|
|
@ -1,7 +1,7 @@
|
|||
- content_for :javascript do
|
||||
:javascript
|
||||
$(function() {
|
||||
$('#stock_changes').on('click', '.destroy_stock_change', function() {
|
||||
$('#stock_changes').on('touchclick', '.destroy_stock_change', function() {
|
||||
$(this).prev('input').val('1'); // check for destruction
|
||||
|
||||
var stock_change = $(this).closest('tr');
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
return false;
|
||||
});
|
||||
|
||||
$('#stock_changes').on('click', '.remove_new_stock_change', function() {
|
||||
$('#stock_changes').on('touchclick', '.remove_new_stock_change', function() {
|
||||
var stock_change = $(this).closest('tr');
|
||||
stock_change.remove();
|
||||
mark_article_for_delivery( stock_change.data('id') );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue