(type)
| 540 | } |
| 541 | |
| 542 | function syncLocalRowCheckboxes(type) { |
| 543 | const body = type === 'image' ? ui.localImageBody : ui.localVideoBody; |
| 544 | if (!body) return; |
| 545 | const set = selectedLocal[type]; |
| 546 | const checkboxes = body.querySelectorAll('input[type="checkbox"].checkbox'); |
| 547 | checkboxes.forEach(cb => { |
| 548 | const name = cb.getAttribute('data-name'); |
| 549 | if (!name) return; |
| 550 | cb.checked = set.has(name); |
| 551 | const row = cb.closest('tr'); |
| 552 | if (row) row.classList.toggle('row-selected', cb.checked); |
| 553 | }); |
| 554 | syncLocalSelectAllState(type); |
| 555 | } |
| 556 | |
| 557 | function syncLocalSelectAllState(type) { |
| 558 | const selectAll = type === 'image' ? ui.localImageSelectAll : ui.localVideoSelectAll; |
no test coverage detected