Widget: DCTList: Difference between revisions
From LINKS Community Center
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); | ||
// 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') | ||
.forEach(img => { | |||
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!