mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-11 23:17:48 +00:00
Add delete tracking feature
This commit is contained in:
@@ -141,7 +141,12 @@ doAdjustItems = function(shipment_number, variant_id, quantity, inventory_units,
|
||||
|
||||
toggleTrackingEdit = function(){
|
||||
var link = $(this);
|
||||
let input = link.parents('tbody').find('#tracking')[0]
|
||||
link.parents('tbody').find('tr.edit-tracking').toggle();
|
||||
// Set focus on input and
|
||||
// put cursor at it's end
|
||||
input.focus()
|
||||
input.setSelectionRange(-1, -1)
|
||||
link.parents('tbody').find('tr.show-tracking').toggle();
|
||||
}
|
||||
|
||||
|
||||
@@ -85,3 +85,4 @@
|
||||
%td.actions
|
||||
- if can?(:update, shipment) && shipment.can_modify?
|
||||
= link_to '', '', :class => 'edit-tracking icon_link icon-edit no-text with-tip', :data => { :action => 'edit' }, :title => Spree.t('edit')
|
||||
= link_to '', '', :class => 'delete-tracking icon_link icon-trash no-text with-tip', :data => { 'shipment-number' => shipment.number, :action => 'delete' }
|
||||
|
||||
Reference in New Issue
Block a user