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 = `
|
row.innerHTML = `
|
||||||
<label class="check-label"><input type="checkbox" checked><span class="lan-review-name"></span></label>
|
<label class="check-label"><input type="checkbox" checked><span class="lan-review-name"></span></label>
|
||||||
<span class="lan-review-meta"></span>
|
<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('.lan-review-name').textContent = unit.label || unit.key
|
||||||
row.querySelector('input').onchange = async event => {
|
row.querySelector('input').onchange = async event => {
|
||||||
|
|
@ -2435,9 +2436,17 @@ function renderReview(info) {
|
||||||
const children = document.createElement('div')
|
const children = document.createElement('div')
|
||||||
children.className = 'lan-nodes'
|
children.className = 'lan-nodes'
|
||||||
list.appendChild(children)
|
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)
|
// top folders load on first paint; a unit's list is small (collapsed rows)
|
||||||
window.plwl.lansyncReviewTree(info.id, unit.key).then(res => {
|
window.plwl.lansyncReviewTree(info.id, unit.key).then(res => {
|
||||||
for (const node of (res && res.nodes) || []) children.appendChild(nodeRow(node, unit.key, 1))
|
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()
|
refresh()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -254,7 +254,9 @@ content {
|
||||||
.lan-node .check-label { flex: 1; min-width: 0; margin: 0; gap: 0.5rem; }
|
.lan-node .check-label { flex: 1; min-width: 0; margin: 0; gap: 0.5rem; }
|
||||||
.lan-node .lan-node-name { overflow-wrap: anywhere; }
|
.lan-node .lan-node-name { overflow-wrap: anywhere; }
|
||||||
.lan-node input[type='checkbox'] { width: 1.4rem; height: 1.4rem; }
|
.lan-node input[type='checkbox'] { width: 1.4rem; height: 1.4rem; }
|
||||||
.lan-node-open { padding: 0 0.5rem; min-height: 1.6rem; }
|
.lan-node-open, .lan-unit-open { padding: 0 0.5rem; min-height: 1.6rem; }
|
||||||
|
/* .button's own display would otherwise win over the hidden attribute */
|
||||||
|
.lan-node-open[hidden], .lan-unit-open[hidden] { display: none; }
|
||||||
.lan-review-actions { display: flex; gap: 0.6rem; justify-content: flex-end; margin-top: 0.6rem; }
|
.lan-review-actions { display: flex; gap: 0.6rem; justify-content: flex-end; margin-top: 0.6rem; }
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue