Skip to content

Commit

Permalink
FO: Add class selected to selected address
Browse files Browse the repository at this point in the history
  • Loading branch information
fatmaBouchekoua authored and maximebiloe committed Jun 16, 2017
1 parent b4955c6 commit 6feeca2
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 3 deletions.
5 changes: 5 additions & 0 deletions themes/_core/js/checkout-address.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,9 @@ export default function () {
$('#checkout-addresses-step').trigger('click');
prestashop.emit('editAddress');
});

$('#delivery-addresses, #invoice-addresses input[type=radio]').on('click', function () {
$('.address-item').removeClass('selected');
$('.address-item:has(input[type=radio]:checked)').addClass('selected');
});
}
2 changes: 2 additions & 0 deletions themes/classic/_dev/css/components/checkout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ body#checkout {
background: $gray-lighter;
flex: 0 0 49%;
margin-bottom: $small-space;
border: 3px solid transparent;
&.selected {
background: white;
border: $brand-primary 3px solid;
Expand All @@ -174,6 +175,7 @@ body#checkout {
.radio-block {
padding: 0.9375rem;
text-align: left;
cursor: pointer;
}
.custom-radio {
margin-right: 0;
Expand Down
2 changes: 1 addition & 1 deletion themes/classic/assets/css/theme.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion themes/classic/assets/js/theme.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions themes/core.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion themes/core.js.map

Large diffs are not rendered by default.

0 comments on commit 6feeca2

Please sign in to comment.