1
0
mirror of https://github.com/24eme/signaturepdf.git synced 2023-08-25 09:33:08 +02:00

Adding document filename in sidebar

This commit is contained in:
Vincent LAURENT 2022-04-01 00:32:52 +02:00
parent c47c7728c8
commit 0cc5ba6439
2 changed files with 5 additions and 1 deletions

View File

@ -23,6 +23,9 @@ var loadPDF = async function(pdfBlob, filename) {
let url = await URL.createObjectURL(pdfBlob);
text_document_name.querySelector('span').innerText = filename;
text_document_name.setAttribute('title', filename);
let dataTransfer = new DataTransfer();
dataTransfer.items.add(new File([pdfBlob], filename, {
type: 'application/pdf'

View File

@ -37,7 +37,8 @@
<h5 id="sidebarToolsLabel">Signature du PDF</h5>
<button type="button" class="btn-close text-reset d-md-none" data-bs-dismiss="offcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<div class="offcanvas-body pt-0">
<p id="text_document_name" class="text-muted" style="text-overflow: ellipsis; white-space: nowrap; overflow: hidden;" title="Lettre de demande de renouvellement aux SCOP_signe.pdf"><i class="bi bi-files"></i> <span>Lettre de demande de renouvellement aux SCOP_signe.pdf</span></p>
<div class="form-check form-switch mb-2 small d-none">
<input class="form-check-input" type="checkbox" id="add-lock-checkbox" disabled="disabled">
<label style="cursor: pointer;" class="form-check-label" for="add-lock-checkbox"> Garder la séléction active</label>