MCPcopy Create free account
hub / github.com/error311/FileRise / setFromViewChange

Function setFromViewChange

public/js/adminFolderAccess.js:529–546  ·  view source on GitHub ↗
(row, which, checked)

Source from the content-addressed store, hash-verified

527 }
528
529 function setFromViewChange(row, which, checked) {
530 if (!checked && (which === 'view' || which === 'viewOwn')) {
531 qsa(row, 'input[type="checkbox"]').forEach(cb => cb.checked = false);
532 }
533 const cbView = qs(row, 'input[data-cap="view"]');
534 const cbVO = qs(row, 'input[data-cap="viewOwn"]');
535 if (cbView && cbVO) {
536 if (cbView.checked) {
537 cbVO.checked = false;
538 cbVO.disabled = true;
539 cbVO.title = tf('full_view_supersedes_own', 'Full view supersedes own-only');
540 } else {
541 cbVO.disabled = false;
542 cbVO.removeAttribute('title');
543 }
544 }
545 enforceShareFolderRule(row);
546 }
547
548 function wireRow(row) {
549 const isAdminRow = row.dataset.admin === '1';

Callers 2

wireRowFunction · 0.85
renderFolderGrantsUIFunction · 0.85

Calls 4

qsaFunction · 0.70
qsFunction · 0.70
tfFunction · 0.70
enforceShareFolderRuleFunction · 0.70

Tested by

no test coverage detected