mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 06:15:11 +00:00
parent
d866e77ceb
commit
9b4a19df18
1 changed files with 3 additions and 3 deletions
|
@ -795,18 +795,18 @@ let postSaveTimer = null;
|
|||
if (results[i].is_dir === "1" && results[(i-1)].is_dir === "1") {
|
||||
// is_dir preceded by another is_dir = add opening <ul> to the beginning of the button
|
||||
content += `<ul class="collapse" id="#embedDir-${i}">
|
||||
<button class="btn btn-primary" type="button" data-bs-toggle="collapse" data-bs-target="#embedDir-${i}" aria-expanded="false" aria-controls="#embedDir-${i}">
|
||||
<button class="btn btn-primary" type="button" data-bs-toggle="collapse" data-bs-target="#embedDir-${(i-1)}" aria-expanded="false" aria-controls="#embedDir-${(i-1)}">
|
||||
${results[i].filename}
|
||||
</button>`;
|
||||
} else if (results[i].is_dir === '1' && results[(i-1)].is_dir !== '1') {
|
||||
// is_dir preceded by a file = add closing </ul> to the beginning of the button ** works as expected **
|
||||
// is_dir preceded by a file = add closing </ul> to the beginning of the button
|
||||
content += `</ul><button class="btn btn-primary" type="button" data-bs-toggle="collapse" data-bs-target="#embedDir-${i}" aria-expanded="false" aria-controls="#embedDir-${i}">
|
||||
${results[i].filename}
|
||||
</button>`;
|
||||
|
||||
} else if (results[i].is_dir !== '1' && results[(i-1)].is_dir === '1') {
|
||||
// file preceded by a is_dir = add opening <ul> to the beginning of file
|
||||
content += `<ul class="collapse" id="#embedDir-${i)}"><li>${results[i].filename}</li>`;
|
||||
content += `<ul class="collapse" id="#embedDir-${(i-1)}"><li>${results[i].filename}</li>`;
|
||||
|
||||
} else if (results[i].is_dir !== '1' && results[(i-1)].is_dir !== '1') {
|
||||
// file preceded by another file = just the line item
|
||||
|
|
Loading…
Reference in a new issue