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 312: Line 312:
         const sourceOptions = Array.from(document.querySelectorAll('#data-source-filter input[type="checkbox"]'));
         const sourceOptions = Array.from(document.querySelectorAll('#data-source-filter input[type="checkbox"]'));
         const selectedSources = sourceOptions.filter(checkbox => checkbox.checked).map(checkbox => checkbox.value);
         const selectedSources = sourceOptions.filter(checkbox => checkbox.checked).map(checkbox => checkbox.value);
        console.log('ALL', sourceOptions)
        console.log('selected', selectedSources)


         // If all checkboxes are checked, disable the filter.
         // If all checkboxes are checked, disable the filter.
Line 437: Line 435:


                 // Mark data source images
                 // Mark data source images
                 document.querySelectorAll('.data-sources-cell .data-source-img').forEach(img => {
                 document.querySelectorAll('.data-sources-cell .data-source-img, .tabulator-responsive-collapse .data-source-img')
                    if (!selectedSources || selectedSources.includes(img.dataset.value)) { img.classList.remove('unselected'); }
                    .forEach(img => {
                    else { img.classList.add('unselected'); }
                        if (!selectedSources || selectedSources.includes(img.dataset.value)) { img.classList.remove('unselected'); }
                });
                        else { img.classList.add('unselected'); }
                    });


                 // Mark functions images
                 // Mark functions images

Revision as of 16:16, 22 August 2022

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