From c3197cefaf239d720d1270e46b27495990a83246 Mon Sep 17 00:00:00 2001 From: Alberto Vena Date: Thu, 20 Jul 2017 16:57:01 +0200 Subject: [PATCH 1/2] Convert shipments UI buttons from to + diff --git a/backend/app/assets/javascripts/spree/backend/templates/variants/split.hbs b/backend/app/assets/javascripts/spree/backend/templates/variants/split.hbs index 2e87c9f5713..23e8c912782 100644 --- a/backend/app/assets/javascripts/spree/backend/templates/variants/split.hbs +++ b/backend/app/assets/javascripts/spree/backend/templates/variants/split.hbs @@ -20,6 +20,6 @@ - - + + diff --git a/backend/app/views/spree/admin/orders/_shipment.html.erb b/backend/app/views/spree/admin/orders/_shipment.html.erb index 723fd693ef9..897a29622a8 100644 --- a/backend/app/views/spree/admin/orders/_shipment.html.erb +++ b/backend/app/views/spree/admin/orders/_shipment.html.erb @@ -62,9 +62,9 @@ <% if can? :update, shipment %> - <%= link_to '', '#', class: 'save-method fa fa-check no-text with-tip', + <%= button_tag '', class: 'save-method fa fa-check no-text with-ti, type: :button', data: {'shipment-number' => shipment.number, action: 'save'}, title: Spree.t('actions.save') %> - <%= link_to '', '#', class: 'cancel-method fa fa-cancel no-text with-tip', + <%= button_tag '', class: 'cancel-method fa fa-cancel no-text with-ti, type: :button', data: {action: 'cancel'}, title: Spree.t('actions.cancel') %> <% end %> @@ -85,7 +85,7 @@ <% if can?(:update, shipment) && !shipment.shipped? %> - <%= link_to '', '#', class: 'edit-method fa fa-edit no-text with-tip', data: {action: 'edit'}, title: Spree.t('actions.edit') %> + <%= button_tag '', class: 'edit-method fa fa-edit no-text with-tip', data: {action: 'edit'}, title: Spree.t('actions.edit'), type: :button %> <% end %> @@ -97,8 +97,8 @@ <% if can? :update, shipment %> - <%= link_to '', '#', class: 'save-tracking fa fa-check no-text with-tip', data: {'shipment-number' => shipment.number, action: 'save'}, title: Spree.t('actions.save') %> - <%= link_to '', '#', class: 'cancel-tracking fa fa-cancel no-text with-tip', data: {action: 'cancel'}, title: Spree.t('actions.cancel') %> + <%= button_tag '', class: 'save-tracking fa fa-check no-text with-tip', data: { action: 'save', 'shipment-number' => shipment.number }, title: Spree.t('actions.save'), type: :button %> + <%= button_tag '', class: 'cancel-tracking fa fa-cancel no-text with-tip', data: { action: 'cancel' }, title: Spree.t('actions.cancel'), type: :button %> <% end %> @@ -121,7 +121,7 @@ <% if can? :update, shipment %> - <%= link_to '', '#', class: 'edit-tracking fa fa-edit no-text with-tip', data: {action: 'edit'}, title: Spree.t('actions.edit') %> + <%= button_tag '', class: 'edit-tracking fa fa-edit no-text with-tip', data: {action: 'edit'}, title: Spree.t('actions.edit'), type: :button %> <% end %> diff --git a/backend/app/views/spree/admin/orders/_shipment_manifest.html.erb b/backend/app/views/spree/admin/orders/_shipment_manifest.html.erb index a5ace3d2d96..9d0afcdf8be 100644 --- a/backend/app/views/spree/admin/orders/_shipment_manifest.html.erb +++ b/backend/app/views/spree/admin/orders/_shipment_manifest.html.erb @@ -22,8 +22,8 @@ <% if can? :update, item %> - <%= link_to '', '#', class: 'split-item icon_link fa fa-arrows-h no-text with-tip', data: {action: 'split', 'variant-id' => item.variant.id}, title: Spree.t('actions.split') %> - <%= link_to '', '#', class: 'delete-item fa fa-trash no-text with-tip', data: { 'variant-id' => item.variant.id}, title: Spree.t('actions.delete') %> + <%= button_tag '', class: 'split-item icon_link fa fa-arrows-h no-text with-tip', data: { action: 'split', 'variant-id' => item.variant.id }, title: Spree.t('actions.split'), type: :button %> + <%= button_tag '', class: 'delete-item fa fa-trash no-text with-tip', data: { 'variant-id' => item.variant.id }, title: Spree.t('actions.delete'), type: :button %> <% end %> From ac81e0aa0b763c588409281fb4ddf8a35ba681db Mon Sep 17 00:00:00 2001 From: Alberto Vena Date: Thu, 20 Jul 2017 19:06:47 +0200 Subject: [PATCH 2/2] Add pointer cursor to buttons inside tables actions --- .../assets/stylesheets/spree/backend/components/_actions.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/app/assets/stylesheets/spree/backend/components/_actions.scss b/backend/app/assets/stylesheets/spree/backend/components/_actions.scss index e127e03808a..d6c7d531352 100644 --- a/backend/app/assets/stylesheets/spree/backend/components/_actions.scss +++ b/backend/app/assets/stylesheets/spree/backend/components/_actions.scss @@ -27,5 +27,9 @@ table tbody tr { td.actions { background-color: transparent !important; + + button { + cursor: pointer; + } } }