mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 22:44:29 +01:00
Modal invoice through btcpay.js (#381)
* Modal through btcpay.js * Handling close action depending on whether is modal or not * Tweaking button position * Stripping trailing slashes if present when setting site root
This commit is contained in:
committed by
Nicolas Dorier
parent
c9c7316b7d
commit
aa1ac3da50
@@ -32,7 +32,6 @@ function changeCurrency(currency) {
|
||||
}
|
||||
|
||||
function onDataCallback(jsonData) {
|
||||
|
||||
var newStatus = jsonData.status;
|
||||
|
||||
if (newStatus === "complete" ||
|
||||
@@ -123,20 +122,6 @@ $(document).ready(function () {
|
||||
// initialize
|
||||
onDataCallback(srvModel);
|
||||
|
||||
/* TAF
|
||||
|
||||
- Version mobile
|
||||
|
||||
- Réparer le décallage par timer
|
||||
|
||||
- Preparer les variables de l'API
|
||||
|
||||
- Gestion des differents evenements en fonction du status de l'invoice
|
||||
|
||||
- sécuriser les CDN
|
||||
|
||||
*/
|
||||
|
||||
// check if the Document expired
|
||||
if (srvModel.expirationSeconds > 0) {
|
||||
progressStart(srvModel.maxTimeSeconds); // Progress bar
|
||||
@@ -147,7 +132,19 @@ $(document).ready(function () {
|
||||
hideEmailForm();
|
||||
}
|
||||
|
||||
$(".close-action").on("click", function () {
|
||||
$("invoice").fadeOut(300, function () {
|
||||
window.parent.postMessage("close", "*");
|
||||
});
|
||||
});
|
||||
|
||||
window.parent.postMessage("loaded", "*");
|
||||
jQuery("invoice").fadeOut(0);
|
||||
jQuery("invoice").fadeIn(300);
|
||||
|
||||
// eof initialize
|
||||
|
||||
// FUNCTIONS
|
||||
function hideEmailForm() {
|
||||
$("#emailAddressView").removeClass("active");
|
||||
$("placeholder-refundEmail").html(srvModel.customerEmail);
|
||||
|
||||
Reference in New Issue
Block a user