mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-12 02:08:32 +01:00
Example modal in invoice list (#387)
This commit is contained in:
parent
f23e2a3ec4
commit
cfdf8b1670
3 changed files with 17 additions and 14 deletions
|
@ -1,6 +1,15 @@
|
||||||
@model InvoicesModel
|
@model InvoicesModel
|
||||||
@{
|
@{
|
||||||
ViewData["Title"] = "Invoices";
|
ViewData["Title"] = "Invoices";
|
||||||
|
var rootUrl = Context.Request.GetAbsoluteRoot();
|
||||||
|
}
|
||||||
|
|
||||||
|
@section HeadScripts {
|
||||||
|
<script src="~/modal/btcpay.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
btcpay.setApiUrlPrefix("@rootUrl");
|
||||||
|
</script>
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
|
@ -107,8 +116,13 @@
|
||||||
<td style="text-align:right">
|
<td style="text-align:right">
|
||||||
@if (invoice.ShowCheckout)
|
@if (invoice.ShowCheckout)
|
||||||
{
|
{
|
||||||
<a asp-action="Checkout" asp-route-invoiceId="@invoice.InvoiceId">Checkout</a> <span>-</span>
|
<span>
|
||||||
}<a asp-action="Invoice" asp-route-invoiceId="@invoice.InvoiceId">Details</a>
|
<a asp-action="Checkout" asp-route-invoiceId="@invoice.InvoiceId">Checkout</a>
|
||||||
|
<a href="javascript:btcpay.showInvoice('@invoice.InvoiceId')">[^]</a>
|
||||||
|
-
|
||||||
|
</span>
|
||||||
|
}
|
||||||
|
<a asp-action="Invoice" asp-route-invoiceId="@invoice.InvoiceId">Details</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
iframe.style.left = 0;
|
iframe.style.left = 0;
|
||||||
iframe.style.height = '100%';
|
iframe.style.height = '100%';
|
||||||
iframe.style.width = '100%';
|
iframe.style.width = '100%';
|
||||||
iframe.style.zIndex = '1000';
|
iframe.style.zIndex = '2000';
|
||||||
|
|
||||||
var origin = 'http://slack.btcpayserver.org join us there, and initialize this with your origin url through setApiUrlPrefix';
|
var origin = 'http://slack.btcpayserver.org join us there, and initialize this with your origin url through setApiUrlPrefix';
|
||||||
// urlPrefix should be site root without trailing slash
|
// urlPrefix should be site root without trailing slash
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<script src="btcpay.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
btcpay.setApiUrlPrefix("http://127.0.0.1:14142");
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<button onclick="btcpay.showInvoice('25DKDgcB4z4PtkPJyHVYnV')">Open Modal</button>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Loading…
Add table
Reference in a new issue