Merge branch 'main' of git@github.com:Frooodle/Stirling-PDF.git into
main
This commit is contained in:
commit
c047c46587
1 changed files with 1 additions and 5 deletions
|
@ -80,14 +80,11 @@ function setupFileInput(chooser) {
|
|||
document.body.addEventListener('dragleave', dragleaveListener);
|
||||
document.body.addEventListener('drop', dropListener);
|
||||
|
||||
console.log("Element Id: ", elementId);
|
||||
|
||||
$("#" + elementId).on("change", function(e) {
|
||||
allFiles = Array.from(e.target.files);
|
||||
handleFileInputChange(this);
|
||||
});
|
||||
|
||||
|
||||
function handleFileInputChange(inputElement) {
|
||||
const files = allFiles;
|
||||
const fileNames = files.map(f => f.name);
|
||||
|
@ -96,7 +93,6 @@ function setupFileInput(chooser) {
|
|||
fileNames.forEach(fileName => {
|
||||
selectedFilesContainer.append("<div>" + fileName + "</div>");
|
||||
});
|
||||
|
||||
if (fileNames.length === 1) {
|
||||
$(inputElement).siblings(".custom-file-label").addClass("selected").html(fileNames[0]);
|
||||
} else if (fileNames.length > 1) {
|
||||
|
|
Loading…
Reference in a new issue