mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 04:35:26 +00:00
Update jot-header.tpl
add continue statements
This commit is contained in:
parent
b6dcc86d19
commit
c0e357b884
1 changed files with 4 additions and 0 deletions
|
@ -798,20 +798,24 @@ if (results[i].is_dir === "1" && results[(i-1)].is_dir === "1") {
|
|||
<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>`;
|
||||
continue;
|
||||
|
||||
} 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
|
||||
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>`;
|
||||
continue;
|
||||
|
||||
} 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>`;
|
||||
continue;
|
||||
|
||||
} else if (results[i].is_dir !== '1' && results[(i-1)].is_dir !== '1') {
|
||||
// file preceded by another file = just the line item
|
||||
content += `<li>${results[i].filename}</li>`;
|
||||
continue;
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue