diff --git a/public/js/organization.js b/public/js/organization.js index ff00955..5494364 100644 --- a/public/js/organization.js +++ b/public/js/organization.js @@ -23,6 +23,7 @@ var loadPDF = async function(pdfBlob, filename, pdfIndex) { type: 'application/pdf' })); document.getElementById('input_pdf').files = dataTransfer.files; + updateListePDF(); 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); }; +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', '
  • '+decodeURI(pdfFile.name)+'
  • '); + } +} + var createEventsListener = function() { document.querySelector('#checkbox_all_pages').addEventListener('change', function() { let checkboxAll = this;