From a14b94c96f58e6101121d5aa9a8e8f962adaa4da Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Thu, 19 Oct 2017 16:37:07 +0900 Subject: [PATCH] Fix copy/paste BTC amount, add redirect store link to invoice --- BTCPayServer/Views/Invoice/Checkout.cshtml | 35 ++++++++++++---------- BTCPayServer/wwwroot/css/normalizer.css | 1 - BTCPayServer/wwwroot/js/core.js | 16 ++++++---- 3 files changed, 30 insertions(+), 22 deletions(-) diff --git a/BTCPayServer/Views/Invoice/Checkout.cshtml b/BTCPayServer/Views/Invoice/Checkout.cshtml index 42b58c733..07993d88a 100644 --- a/BTCPayServer/Views/Invoice/Checkout.cshtml +++ b/BTCPayServer/Views/Invoice/Checkout.cshtml @@ -130,8 +130,6 @@
@Model.BTCTotalDue - -
@@ -181,20 +179,20 @@
@*
- - - Show QR code - - -
-

- Hide QR code - -

-
-
-
*@ + + Show QR code + + +
+

+ Hide QR code + +

+ +
+
+
*@
@@ -381,7 +379,7 @@
Amount
- @Model.BTCDue BTC + @Model.BTCDue BTC
Copied
@@ -428,6 +426,11 @@
This invoice has been paid.
+
diff --git a/BTCPayServer/wwwroot/css/normalizer.css b/BTCPayServer/wwwroot/css/normalizer.css index 7fbef8877..e4b8cfe90 100644 --- a/BTCPayServer/wwwroot/css/normalizer.css +++ b/BTCPayServer/wwwroot/css/normalizer.css @@ -8461,7 +8461,6 @@ strong { .single-item-order__right__ex-rate { font-style: italic; font-size: 11px; - margin-right: 16px; } .single-item-order__right__btc-price { diff --git a/BTCPayServer/wwwroot/js/core.js b/BTCPayServer/wwwroot/js/core.js index f38ccface..08a17b117 100644 --- a/BTCPayServer/wwwroot/js/core.js +++ b/BTCPayServer/wwwroot/js/core.js @@ -171,6 +171,17 @@ function updateState(status) { if ($(".modal-dialog").hasClass("expired")) { $(".modal-dialog").removeClass("expired"); } + + if (merchantRefLink != "") { + $(".action-button").click(function () { + window.location.href = merchantRefLink; + }); + } + else + { + $(".action-button").hide(); + } + $(".modal-dialog").addClass("paid"); if ($("#scan").hasClass("active")) { @@ -213,11 +224,6 @@ $(".menu__item").click(function () { // function to load contents in different language should go there }); -// Redirect -$("#expired .action-button").click(function () { - window.location.href = merchantRefLink; -}); - // Validate Email address function validateEmail(email) { var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;