app folder expandable in deletion screen
This commit is contained in:
parent
3e063c1420
commit
fb59c23839
2 changed files with 12 additions and 1 deletions
|
|
@ -2419,6 +2419,7 @@ function renderReview(info) {
|
|||
row.innerHTML = `
|
||||
<label class="check-label"><input type="checkbox" checked><span class="lan-review-name"></span></label>
|
||||
<span class="lan-review-meta"></span>
|
||||
<button type="button" class="button small lan-unit-open">−</button>
|
||||
`
|
||||
row.querySelector('.lan-review-name').textContent = unit.label || unit.key
|
||||
row.querySelector('input').onchange = async event => {
|
||||
|
|
@ -2435,9 +2436,17 @@ function renderReview(info) {
|
|||
const children = document.createElement('div')
|
||||
children.className = 'lan-nodes'
|
||||
list.appendChild(children)
|
||||
// a whole unit folds away like any folder: only the list scrolls, not the modal
|
||||
const fold = row.querySelector('.lan-unit-open')
|
||||
fold.onclick = () => {
|
||||
children.hidden = !children.hidden
|
||||
fold.textContent = children.hidden ? '+' : '−'
|
||||
}
|
||||
// top folders load on first paint; a unit's list is small (collapsed rows)
|
||||
window.plwl.lansyncReviewTree(info.id, unit.key).then(res => {
|
||||
for (const node of (res && res.nodes) || []) children.appendChild(nodeRow(node, unit.key, 1))
|
||||
// nothing to fold under a unit whose row is only a registry entry
|
||||
fold.hidden = !children.children.length
|
||||
refresh()
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue