Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display a pointer cursor hovering add variant buttons #2062

Merged
merged 2 commits into from
Aug 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions backend/app/assets/javascripts/spree/backend/shipments.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ var ShipmentItemView = Backbone.View.extend({
},

events: {
"click .delete-item": "onDelete",
"click .split-item": "onSplit",
"click button.delete-item": "onDelete",
"click button.split-item": "onSplit",
},

removeSplit: function() {
Expand Down Expand Up @@ -286,13 +286,13 @@ var ShipmentEditView = Backbone.View.extend({
},

events: {
"click a.edit-method": "toggleMethodEdit",
"click a.cancel-method": "toggleMethodEdit",
"click a.save-method": "saveMethod",
"click button.edit-method": "toggleMethodEdit",
"click button.cancel-method": "toggleMethodEdit",
"click button.save-method": "saveMethod",

"click a.edit-tracking": "toggleTrackingEdit",
"click a.cancel-tracking": "toggleTrackingEdit",
"click a.save-tracking": "saveTracking",
"click button.edit-tracking": "toggleTrackingEdit",
"click button.cancel-tracking": "toggleTrackingEdit",
"click button.save-tracking": "saveTracking",
},

toggleMethodEdit: function(e){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<fieldset class="no-border-bottom">
<legend align="center" class="stock-location">
<button class="add_variant" title="{{ t "add" }}" data-action="add">{{ t "add" }}</button>
<button class="add_variant" title="{{ t "add" }}" data-action="add">{{ t "add" }}</button>
</legend>
</fieldset>
</fieldset>
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
<input class="quantity" id="item_quantity" type="number" min="1" value="1" max="{{max_quantity}}">
</td>
<td class='actions'>
<a href='#' class='save-split icon_link fa fa-ok no-text with-tip' title='Save'></a>
<a href='#' class='cancel-split icon_link fa fa-cancel no-text with-tip' title='Cancel'></a>
<button class="save-split icon_link fa fa-ok no-text with-tip" data-action="save" title="{{ t "save" }}" data-original-title="{{ t "save" }}"></button>
<button class="cancel-split icon_link fa fa-cancel no-text with-tip" data-action="cancel" title="{{ t "cancel" }}" data-original-title="{{ t "cancel" }}"></button>
</td>
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,9 @@ table tbody tr {

td.actions {
background-color: transparent !important;

button {
cursor: pointer;
}
}
}
12 changes: 6 additions & 6 deletions backend/app/views/spree/admin/orders/_shipment.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@
</td>
<td class="actions">
<% 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 %>
</td>
Expand All @@ -85,7 +85,7 @@

<td class="actions">
<% 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 %>
</td>
</tr>
Expand All @@ -97,8 +97,8 @@
</td>
<td class="actions">
<% 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 %>
</td>
</tr>
Expand All @@ -121,7 +121,7 @@
</td>
<td class="actions">
<% 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 %>
</td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

<td class="cart-item-delete actions" data-hook="cart_item_delete">
<% 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 %>
</td>
</tr>
Expand Down