From 1a605e7cedddb4a053e099a31f7cdf016053361f Mon Sep 17 00:00:00 2001 From: rgravitvl Date: Fri, 15 Dec 2023 14:20:58 +0530 Subject: [PATCH] Updated to identify button as link --- tools/actions/convert/test/fixtures/product1-converted.html | 2 +- tools/actions/convert/test/fixtures/product1.html | 2 +- tools/importer/transformers/carousel.js | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/actions/convert/test/fixtures/product1-converted.html b/tools/actions/convert/test/fixtures/product1-converted.html index 3698d8c83..0d7d96ca9 100644 --- a/tools/actions/convert/test/fixtures/product1-converted.html +++ b/tools/actions/convert/test/fixtures/product1-converted.html @@ -172,7 +172,7 @@

Sciex

Intabio ZT System

Comprehensive charge variant analysis made simple. The Intabio ZT system couples icIEF separation and UV detection with high resolution mass spectrometry on the ZenoTOF 7600 system

-

Learn More

+

Learn More

hero diff --git a/tools/actions/convert/test/fixtures/product1.html b/tools/actions/convert/test/fixtures/product1.html index 0b1199729..eaabb8d94 100644 --- a/tools/actions/convert/test/fixtures/product1.html +++ b/tools/actions/convert/test/fixtures/product1.html @@ -820,7 +820,7 @@

Discover produc

diff --git a/tools/importer/transformers/carousel.js b/tools/importer/transformers/carousel.js index 3bfd788d5..e208dca71 100644 --- a/tools/importer/transformers/carousel.js +++ b/tools/importer/transformers/carousel.js @@ -17,9 +17,11 @@ const getCarousel = (carousel, cells, document) => { const btnText1 = slide.btntitle1; const btnhref1 = slide.btn1path; const rfqBtn1 = slide.buttonRFQOne; + const asLink1 = slide.appearLink1; if (btnText1) { const p1 = document.createElement('p'); const a1 = document.createElement('a'); + if (asLink1) a1.title = 'link'; a1.setAttribute('href', rfqBtn1 ? '#request-quote' : btnhref1); a1.textContent = btnText1; p1.append(a1); @@ -28,9 +30,11 @@ const getCarousel = (carousel, cells, document) => { const btnText2 = slide.btntitle2; const btnhref2 = slide.btn2path; const rfqBtn2 = slide.buttonRFQTwo; + const asLink2 = slide.appearLink2; if (btnText2) { const p2 = document.createElement('p'); const a2 = document.createElement('a'); + if (asLink2) a2.title = 'link'; a2.setAttribute('href', rfqBtn2 ? '#request-quote' : btnhref2); a2.textContent = btnText2; p2.append(a2);