MCPcopy Create free account
hub / github.com/CodeClash-ai/CodeClash / updateSelectAllCheckbox

Function updateSelectAllCheckbox

codeclash/viewer/static/js/picker.js:98–125  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

96}
97
98function updateSelectAllCheckbox() {
99 const selectAllCheckbox = document.getElementById("select-all");
100 if (!selectAllCheckbox) return;
101
102 const allGameCheckboxes = document.querySelectorAll("input[data-path]");
103 if (allGameCheckboxes.length === 0) {
104 selectAllCheckbox.checked = false;
105 selectAllCheckbox.indeterminate = false;
106 return;
107 }
108
109 const checkedCount = document.querySelectorAll(
110 "input[data-path]:checked",
111 ).length;
112
113 if (checkedCount === 0) {
114 selectAllCheckbox.checked = false;
115 selectAllCheckbox.indeterminate = false;
116 } else if (checkedCount === allGameCheckboxes.length) {
117 selectAllCheckbox.checked = true;
118 selectAllCheckbox.indeterminate = false;
119 } else {
120 selectAllCheckbox.checked = false;
121 selectAllCheckbox.indeterminate = true;
122 }
123
124 updateRunsStatus();
125}
126
127function updateRunsStatus() {
128 const statusElement = document.getElementById("runs-status");

Callers 2

picker.jsFile · 0.85
applyFiltersFunction · 0.85

Calls 1

updateRunsStatusFunction · 0.85

Tested by

no test coverage detected