Merge pull request #737 from michelheusschen/fix/merge-tool-file-selection
fix: show only selected files for merge tool
This commit is contained in:
commit
07e9fcb6cc
1 changed files with 10 additions and 3 deletions
|
@ -8,11 +8,18 @@ document.getElementById("fileInput-input").addEventListener("change", function()
|
||||||
displayFiles(files);
|
displayFiles(files);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {FileList} files
|
||||||
|
*/
|
||||||
function displayFiles(files) {
|
function displayFiles(files) {
|
||||||
var list = document.getElementById("selectedFiles");
|
const list = document.getElementById("selectedFiles");
|
||||||
|
|
||||||
for (var i = 0; i < files.length; i++) {
|
while (list.firstChild) {
|
||||||
var item = document.createElement("li");
|
list.removeChild(list.firstChild);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (let i = 0; i < files.length; i++) {
|
||||||
|
const item = document.createElement("li");
|
||||||
item.className = "list-group-item";
|
item.className = "list-group-item";
|
||||||
item.innerHTML = `
|
item.innerHTML = `
|
||||||
<div class="d-flex justify-content-between align-items-center w-100">
|
<div class="d-flex justify-content-between align-items-center w-100">
|
||||||
|
|
Loading…
Reference in a new issue