Compare commits

...

2 Commits

5 changed files with 92 additions and 57 deletions

View File

@@ -16,6 +16,7 @@
var stPageIndexes = string.Join(pages.Count() > 1 ? ", " : "", pages.Take(pages.Count() - 1))
+ (pages.Count() > 1 ? " und " : "") + pages.LastOrDefault();
}
<div class="d-flex flex-column min-vh-100">
<nav class="navbar navbar-light bg-light">
<div class="container-fluid">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarToggleExternalContent" aria-controls="navbarToggleExternalContent" aria-expanded="false" aria-label="Toggle navigation">
@@ -45,6 +46,23 @@
</div>
</div>
</div>
<div class="btn-group btn_group position-fixed bottom-0 end-0 d-flex align-items-center" role="group" aria-label="Basic mixed styles example">
<button class="btn_complete btn btn-primary" type="button">
<svg class="icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 16">
<path d="m10.036 8.278 9.258-7.79A1.979 1.979 0 0 0 18 0H2A1.987 1.987 0 0 0 .641.541l9.395 7.737Z" />
<path d="M11.241 9.817c-.36.275-.801.425-1.255.427-.428 0-.845-.138-1.187-.395L0 2.6V14a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V2.5l-8.759 7.317Z" />
</svg>
<span>Abschließen</span>
</button>
<button class="btn_refresh btn btn-outline-secondary" type="button">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-arrow-counterclockwise" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M8 3a5 5 0 1 1-4.546 2.914.5.5 0 0 0-.908-.417A6 6 0 1 0 8 2v1z" />
<path d="M8 4.466V.534a.25.25 0 0 0-.41-.192L5.23 2.308a.25.25 0 0 0 0 .384l2.36 1.966A.25.25 0 0 0 8 4.466z" />
</svg>
</button>
</div>
<div id='app' class="flex-grow-1"></div>
</div>
<script nonce="@nonce">
const collapseNav = () => {
document.addEventListener('click', function (event) {
@@ -71,4 +89,3 @@
@:document.addEventListener("DOMContentLoaded", async () => await new App("@envelopeKey.TrySanitize(_sanitizer)", @Html.Raw(envelopeReceiverJson.TrySanitize(_sanitizer)), B64ToBuff("@Html.Raw(documentBase64String.TrySanitize(_sanitizer))"), "@ViewData["PSPDFKitLicenseKey"]").init())
}
</script>
<div id='app'></div>

View File

@@ -9,7 +9,6 @@
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true"/>
<link rel="stylesheet" href="~/EnvelopeGenerator.Web.styles.css" asp-append-version="true"/>
<link rel="stylesheet" href="~/lib/flag-icons-main/css/flag-icons.min.css" asp-append-version="true" />
<link href="~/lib/select2/dist/css/select2.min.css" rel="stylesheet"/>
</head>
<body>
<script src="~/lib/jquery/dist/jquery.min.js"></script>

View File

@@ -4,12 +4,28 @@
*/
/* Toolbar Buttons */
#app {
background: gray;
width: 100vw;
height: 100vh;
margin: 0 auto;
height: 80vh;
}
.btn-group {
margin-right: 10vw;
margin-bottom: 10vh;
}
.btn_refresh, .btn_complete {
height:4vh
}
.btn_refresh {
}
.btn_complete{
}
.btn_complete .icon {
width: 2vh;
}
.btn_complete span {
vertical-align: middle;
}
.button-finish {

View File

@@ -65,7 +65,6 @@ class App {
)
// Load annotations into PSPDFKit
try {
this.signatureCount = this.currentDocument.elements.length
const annotations = this.Annotation.createAnnotations(
@@ -84,6 +83,10 @@ class App {
}
} catch (e) {
}
//add click events of external buttons
[...document.getElementsByClassName('btn_refresh')].forEach(btn => btn.addEventListener('click', _ => this.handleClick('RESET')));
[...document.getElementsByClassName('btn_complete')].forEach(btn => btn.addEventListener('click', _ => this.handleClick('FINISH')));
}
handleAnnotationsLoad(loadedAnnotations) {
@@ -165,7 +168,6 @@ class App {
}
async handleFinish(event) {
const validationResult = await this.validateAnnotations(this.signatureCount)
if (validationResult === false) {
Swal.fire({

View File

@@ -68,6 +68,7 @@
}
getCustomItems = function (callback) {
return []
return [
{
type: 'custom',