From 686dcaaa1b6ed97a82f89a30d25ad8947dd542d2 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Mon, 25 Jan 2021 16:09:12 +0100 Subject: [PATCH] remove '#' as path for link_to Adding '#' to the current url makes most of browser jump to the top of the page. Avoid this by deleting this added # (meaningless) and replacing it by empty string. --- app/views/spree/admin/orders/_shipment.html.haml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/app/views/spree/admin/orders/_shipment.html.haml b/app/views/spree/admin/orders/_shipment.html.haml index 0175faf001..3fe2b5ab4d 100644 --- a/app/views/spree/admin/orders/_shipment.html.haml +++ b/app/views/spree/admin/orders/_shipment.html.haml @@ -54,9 +54,8 @@ %td.actions - if can? :update, shipment - = link_to '', '#', :class => 'save-method icon_link icon-ok no-text with-tip', :data => { 'shipment-number' => shipment.number, :action => 'save' }, title: I18n.t('actions.save') - = link_to '', '#', :class => 'cancel-method icon_link icon-cancel no-text with-tip', :data => { :action => 'cancel' }, :title => I18n.t('actions.cancel') - + = link_to '', '', :class => 'save-method icon_link icon-ok no-text with-tip', :data => { 'shipment-number' => shipment.number, :action => 'save' }, title: I18n.t('actions.save') + = link_to '', '', :class => 'cancel-method icon_link icon-cancel no-text with-tip', :data => { :action => 'cancel' }, :title => I18n.t('actions.cancel') %tr.show-method.total %td{ :colspan => "4" } - if shipment.adjustment.present? @@ -73,7 +72,7 @@ - if shipment.adjustment.present? && !shipment.shipped? %td.actions - if can? :update, shipment - = link_to '', '#', :class => 'edit-method icon_link icon-edit no-text with-tip', :data => { :action => 'edit' }, :title => Spree.t('edit') + = link_to '', '', :class => 'edit-method icon_link icon-edit no-text with-tip', :data => { :action => 'edit' }, :title => Spree.t('edit') %tr.edit-tracking.hidden.total %td{ :colspan => "5" } @@ -83,8 +82,8 @@ %td.actions - if can? :update, shipment - = link_to '', '#', :class => 'save-tracking icon_link icon-ok no-text with-tip', :data => { 'shipment-number' => shipment.number, :action => 'save' }, :title => I18n.t('actions.save') - = link_to '', '#', :class => 'cancel-tracking icon_link icon-cancel no-text with-tip', :data => { :action => 'cancel' }, :title => I18n.t('actions.cancel') + = link_to '', '', :class => 'save-tracking icon_link icon-ok no-text with-tip', :data => { 'shipment-number' => shipment.number, :action => 'save' }, :title => I18n.t('actions.save') + = link_to '', '', :class => 'cancel-tracking icon_link icon-cancel no-text with-tip', :data => { :action => 'cancel' }, :title => I18n.t('actions.cancel') %tr.show-tracking.total %td{ :colspan => "5" } @@ -97,4 +96,4 @@ %td.actions - if can? :update, shipment - = link_to '', '#', :class => 'edit-tracking icon_link icon-edit no-text with-tip', :data => { :action => 'edit' }, :title => Spree.t('edit') + = link_to '', '', :class => 'edit-tracking icon_link icon-edit no-text with-tip', :data => { :action => 'edit' }, :title => Spree.t('edit')