Interne Schaltflächen wurden entfernt. Stattdessen wurden externe Sende- und Aktualisierungsschaltflächen hinzugefügt.

This commit is contained in:
Developer 02 2024-05-23 13:52:37 +02:00
parent 60afdc23da
commit 2014f6149d
5 changed files with 39 additions and 5 deletions

View File

@ -45,7 +45,22 @@
</div>
</div>
</div>
</div>@* <button class="btn btn-success position-fixed bottom-0 end-0 mb-5 me-5" type="button">Abschließen</button> *@
</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">

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

@ -7,9 +7,26 @@
#app {
background: gray;
width: 100vw;
height: 1vh;
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 {
transition: background-color linear 300ms;

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',