1export default function CheckModule() { 2 const reCheckBlocks = document.querySelectorAll('.recheck-block'); 3 if (reCheckBlocks) { 4 reCheckBlocks.forEach(item => { 5 const recheckItems = item.querySelectorAll(".recheck-item"); 6 if (recheckItems) { 7 recheckItems.forEach(item => { 8 const input = item.querySelector(".recheck-input"); 9 if (input.checked) { 10 item.classList.add("active") 11 } else { 12 item.classList.remove("active") 13 } 14 }) 15 } 16 }) 17 } 18 document.addEventListener("click", (e) => { 19 const reCheckBlock = e.target.closest(".recheck-block"); 20 const reCheckItem = e.target.closest(".recheck-item"); 21 var event = new Event("change"); 22 if (reCheckBlock) { 23 const reCheckItems = reCheckBlock.querySelectorAll(".recheck-item"); 24 const reCheckInputs = reCheckBlock.querySelectorAll(".recheck-input"); 25 26 if (reCheckItem) { 27 const input = reCheckItem.querySelector(".recheck-input"); 28 if (input.type == "radio") { 29 reCheckItems.forEach((item) => { 30 item.classList.remove("active"); 31 }); 32 reCheckInputs.forEach((item) => { 33 item.checked = false; 34 }); 35 input.checked = true; 36 if (input.checked == true) { 37 reCheckItem.classList.add("active"); 38 } 39 input.dispatchEvent(event); 40 41 } 42 if (input.type == "checkbox") { 43 if (input.checked == true) { 44 input.checked = false; 45 reCheckItem.classList.remove("active"); 46 } else { 47 input.checked = true; 48 reCheckItem.classList.add("active"); 49 } 50 input.dispatchEvent(event); 51 } 52 } 53 } 54 }); 55}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.