From 16aed48ff531592cd9a021d6d4409f436c13ee7a Mon Sep 17 00:00:00 2001 From: Roberto Alvarez Date: Mon, 3 Feb 2025 11:08:46 -0600 Subject: [PATCH 1/5] refactor(sd): SD-10955 remove cart inline event handler --- assets/js/theme/cart.js | 4 ++++ templates/components/cart/item-giftwrap.html | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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}} From 067c2d315382bcb7d751e1232eb387a48effaa27 Mon Sep 17 00:00:00 2001 From: Roberto Alvarez Date: Mon, 3 Feb 2025 11:09:07 -0600 Subject: [PATCH 2/5] refactor(sd): SD-10955 remove bundle onload inline handler --- templates/layout/base.html | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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}}} From 0f344e3760fad4a348d24cc37129810eb175978a Mon Sep 17 00:00:00 2001 From: Roberto Alvarez Date: Mon, 3 Feb 2025 11:09:15 -0600 Subject: [PATCH 3/5] refactor(sd): SD-10955 remove search inline handler --- templates/components/common/quick-search.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@
-
+
From ae48ca465aa109c21e22d21e9b7ccb051fbc8620 Mon Sep 17 00:00:00 2001 From: Roberto Alvarez Date: Mon, 3 Feb 2025 11:15:50 -0600 Subject: [PATCH 4/5] chore(sd): SD-10955 update README.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10352ccaa9..aa8e668419 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add a region to display the payment promotion widget on the category pages [#2530](https://github.com/bigcommerce/cornerstone/pull/2530) - Rename the region to display the payment promotion widget on the category pages [#2531](https://github.com/bigcommerce/cornerstone/pull/2531) - Cornerstone update to support multiple date fields and remove blank space [#2533](https://github.com/bigcommerce/cornerstone/pull/2533) +- Refactor cart, payment account page inline event handlers to event listeners [#2536](https://github.com/bigcommerce/cornerstone/pull/2536) ## 6.15.0 (10-18-2024) - Cornerstone changes to support inc/ex tax price lists on PDP [#2486](https://github.com/bigcommerce/cornerstone/pull/2486) From 2f260a2610e27c92808cbd938b1cdb6759c669b3 Mon Sep 17 00:00:00 2001 From: Roberto Alvarez Date: Tue, 4 Feb 2025 10:35:40 -0600 Subject: [PATCH 5/5] chore(sd): SD-10955 move changes to draft section --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa8e668419..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) @@ -28,7 +29,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add a region to display the payment promotion widget on the category pages [#2530](https://github.com/bigcommerce/cornerstone/pull/2530) - Rename the region to display the payment promotion widget on the category pages [#2531](https://github.com/bigcommerce/cornerstone/pull/2531) - Cornerstone update to support multiple date fields and remove blank space [#2533](https://github.com/bigcommerce/cornerstone/pull/2533) -- Refactor cart, payment account page inline event handlers to event listeners [#2536](https://github.com/bigcommerce/cornerstone/pull/2536) ## 6.15.0 (10-18-2024) - Cornerstone changes to support inc/ex tax price lists on PDP [#2486](https://github.com/bigcommerce/cornerstone/pull/2486)