Widget: DCTList: Difference between revisions

From LINKS Community Center
Jump to: navigation, search
Eschmidt (talk | contribs)
No edit summary
Eschmidt (talk | contribs)
No edit summary
Line 675: Line 675:
             document.getElementById('functions-filter').addEventListener('change', event => {
             document.getElementById('functions-filter').addEventListener('change', event => {
                 const filterBlock = event.target.closest('.func-filter-block');
                 const filterBlock = event.target.closest('.func-filter-block');
                const category = filterBlock.querySelector('.func-cat');
                 const subfunctions = filterBlock.querySelectorAll('.subfunc-filter-block input[type="checkbox"]');
                 const subfunctions = filterBlock.querySelectorAll('.subfunc-filter-block input[type="checkbox"]');
                 // Selecting/deselecting the category checks/unchecks all subfunctions.
                 // Selecting/deselecting the category checks/unchecks all subfunctions.
                if (event.target === category) {
                    console.log('clicked the cat!')
                }
                 // 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.
                 console.log(filterBlock)
                 // console.log(filterBlock)
                 console.log(subfunctions)
                 // console.log(subfunctions)
                 applyFilters();
                 applyFilters();
             }, { passive: true });
             }, { passive: true });

Revision as of 15:48, 18 November 2022

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