diff --git a/CHANGELOG.md b/CHANGELOG.md index 10352ccaa9..edc2112cab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Draft +- Refactor cart, payment account page inline event handlers to event listeners [#2536](https://github.com/bigcommerce/cornerstone/pull/2536) ## 6.16.0 (01-15-2025) - Remove escaping of "=" symbol for for blog and brand [#2528](https://github.com/bigcommerce/cornerstone/pull/2528) diff --git a/assets/js/theme/cart.js b/assets/js/theme/cart.js index 08a6415ce7..e05377e9f6 100644 --- a/assets/js/theme/cart.js +++ b/assets/js/theme/cart.js @@ -402,6 +402,10 @@ export default class Cart extends PageManager { this.bindGiftWrappingForm(); }); }); + + $('.cart-item-option-remove').on('click', () => { + window.confirm(this.context.giftWrappingRemoveMessage); + }); } bindGiftWrappingForm() { diff --git a/templates/components/cart/item-giftwrap.html b/templates/components/cart/item-giftwrap.html index d5a46f0734..547ca2d628 100644 --- a/templates/components/cart/item-giftwrap.html +++ b/templates/components/cart/item-giftwrap.html @@ -7,7 +7,7 @@
{{gift_wrapping.name}}: {{gift_wrapping.price.formatted}} - ({{lang 'cart.gift_wrapping.change'}} or {{lang 'cart.gift_wrapping.remove'}}) + ({{lang 'cart.gift_wrapping.change'}} or {{lang 'cart.gift_wrapping.remove'}})
{{#if gift_wrapping.message}} diff --git a/templates/components/common/quick-search.html b/templates/components/common/quick-search.html index 9e244f297c..ee94203bec 100644 --- a/templates/components/common/quick-search.html +++ b/templates/components/common/quick-search.html @@ -1,5 +1,5 @@
-
+
diff --git a/templates/layout/base.html b/templates/layout/base.html index ff6608b9a9..6bbb2dae19 100644 --- a/templates/layout/base.html +++ b/templates/layout/base.html @@ -47,6 +47,7 @@ {{~inject 'carouselArrowAndDotAriaLabel' (lang 'carousel.arrow_and_dot_aria_label')}} {{~inject 'carouselActiveDotAriaLabel' (lang 'carousel.active_dot_aria_label')}} {{~inject 'carouselContentAnnounceMessage' (lang 'carousel.content_announce_message')}} + {{~inject 'giftWrappingRemoveMessage' (lang 'cart.gift_wrapping.remove_confirm')}} @@ -79,7 +80,16 @@ } } - + + {{{footer.scripts}}}