mirror of
https://github.com/24eme/signaturepdf.git
synced 2023-08-25 09:33:08 +02:00
List of loaded pdf
This commit is contained in:
parent
abb63e8f90
commit
36a692e34b
@ -23,6 +23,7 @@ var loadPDF = async function(pdfBlob, filename, pdfIndex) {
|
|||||||
type: 'application/pdf'
|
type: 'application/pdf'
|
||||||
}));
|
}));
|
||||||
document.getElementById('input_pdf').files = dataTransfer.files;
|
document.getElementById('input_pdf').files = dataTransfer.files;
|
||||||
|
updateListePDF();
|
||||||
|
|
||||||
let pdfLetter = String.fromCharCode(96 + i+1).toUpperCase();
|
let pdfLetter = String.fromCharCode(96 + i+1).toUpperCase();
|
||||||
|
|
||||||
@ -152,6 +153,14 @@ var stateCheckboxAll = function() {
|
|||||||
document.querySelector('#checkbox_all_pages').checked = (document.querySelectorAll('.checkbox-page:checked').length == document.querySelectorAll('.checkbox-page').length);
|
document.querySelector('#checkbox_all_pages').checked = (document.querySelectorAll('.checkbox-page:checked').length == document.querySelectorAll('.checkbox-page').length);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var updateListePDF = function() {
|
||||||
|
document.querySelector('#list_pdf').innerHTML = "";
|
||||||
|
for (var i = 0; i < document.querySelector('#input_pdf').files.length; i++) {
|
||||||
|
const pdfFile = document.querySelector('#input_pdf').files.item(i);
|
||||||
|
document.querySelector('#list_pdf').insertAdjacentHTML('beforeend', '<li class="list-group-item small" style="text-overflow: ellipsis; white-space: nowrap; overflow: hidden;"><i class="bi bi-files"></i> '+decodeURI(pdfFile.name)+'</li>');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var createEventsListener = function() {
|
var createEventsListener = function() {
|
||||||
document.querySelector('#checkbox_all_pages').addEventListener('change', function() {
|
document.querySelector('#checkbox_all_pages').addEventListener('change', function() {
|
||||||
let checkboxAll = this;
|
let checkboxAll = this;
|
||||||
|
Loading…
Reference in New Issue
Block a user