Difference between revisions of "Widget:DCTList"

From LINKS Community Center
Jump to: navigation, search
Line 674: Line 674:
 
             // Listen for changes in filter checkbox state.
 
             // Listen for changes in filter checkbox state.
 
             document.getElementById('functions-filter').addEventListener('change', event => {
 
             document.getElementById('functions-filter').addEventListener('change', event => {
                                // Selecting/deselecting the category checks/unchecks all subfunctions.
+
                const filterBlock = event.target.closest('.func-filter-block');
 +
                const subfunctions = filterBlock.querySelectorAll('.subfunc-filter-block input[type="checkbox"]');
 +
                // Selecting/deselecting the category checks/unchecks all subfunctions.
 
                 // Picking at least one subfunction activates the category.
 
                 // Picking at least one subfunction activates the category.
 
                 // Picking zero subfunctions deactivates the category.
 
                 // Picking zero subfunctions deactivates the category.
                const filterBlock = event.target.closest('.func-filter-block');
 
 
                 console.log(filterBlock)
 
                 console.log(filterBlock)
 +
                console.log(subfunctions)
 
                 applyFilters();
 
                 applyFilters();
 
             }, { passive: true });
 
             }, { passive: true });

Revision as of 16:45, 18 November 2022

Development verstion of the DCT List.
Not ready for production!