From 07338e08f54ac091c03b215f317f0cd8ec65a687 Mon Sep 17 00:00:00 2001 From: Gustavo Luigi Date: Thu, 1 Sep 2022 20:07:45 +0200 Subject: [PATCH] . --- content/master.blade.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/content/master.blade.php b/content/master.blade.php index 4ae99e8..5c339c7 100644 --- a/content/master.blade.php +++ b/content/master.blade.php @@ -96,8 +96,8 @@
- - + +
@@ -170,8 +170,8 @@ if(typeof updateProducts === "function") $('#list-products').html(''); totalPrice = 0; if(objProducts.length > 0) { - $('#cart-link').show(); - $("#btn-share").show(); + $('.cart-link').show(); + $(".btn-share").show(); let ids = objProducts.map(obj => obj.id); $.get($('meta[name="get-contents"]').attr('content')+"/"+ids.join(","), function(response, status){ response.contents.forEach(function(item){ @@ -225,8 +225,8 @@ $('#total-checkout-price').parent().parent().parent().hide(); $('#no-products-in-checkout').show(); } - $('#cart-link').hide(); - $("#btn-share").hide(); + $('.cart-link').hide(); + $(".btn-share").hide(); } $('#total-price').text(formatter.format(totalPrice)); let productId = $('meta[name="product-id"]').attr('content'); @@ -302,20 +302,20 @@ let url = null; if(window.location.origin == 'http://localhost') url = window.location.origin+'/areya-energy/public/'+btoa(JSON.stringify(objProducts)); else url = window.location.origin+'/'+btoa(JSON.stringify(objProducts)); - $('#cart-link').attr('href', url); - $('#cart-link').text(url); + $('.cart-link').attr('href', url); + $('.cart-link').text(url); const shareData = { title: "Share cart list", text: 'share cart list', url: url, }; - $("#btn-share").click(async function() { + $(".btn-share").click(async function() { if(navigator.share) { try { await navigator.share(shareData); } catch(err) { console.warn(err); } } else { console.warn('Native Web Sharing not supported'); } }); }else{ - $('#cart-link').hide(); - $("#btn-share").hide(); + $('.cart-link').hide(); + $(".btn-share").hide(); } });