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 342: Line 342:
     });
     });


     function selectAllSources() {
     function selectAllSources(context) {
         document.querySelectorAll('#data-source-filter input[type="checkbox"]').forEach(checkbox => checkbox.checked = true);
         document.querySelectorAll('input[type="checkbox"]', context).forEach(checkbox => checkbox.checked = true);
         applyFilters();
         applyFilters();
     }
     }


     function deselectAllSources() {
     function deselectAllSources(context) {
         document.querySelectorAll('#data-source-filter input[type="checkbox"]').forEach(checkbox => checkbox.checked = false);
         document.querySelectorAll('input[type="checkbox"]', context).forEach(checkbox => checkbox.checked = false);
         applyFilters();
         applyFilters();
     }
     }
Line 370: Line 370:
             <h3>Data Sources</h3>
             <h3>Data Sources</h3>
             <div class="filter-button-wrapper">
             <div class="filter-button-wrapper">
                 <button type="button" onclick="selectAllSources()">Select all</button> |
                 <button type="button" onclick="selectAllSources(this)">Select all</button> |
                 <button type="button" onclick="deselectAllSources()">Deselect all</button>
                 <button type="button" onclick="deselectAllSources(this)">Deselect all</button>
             </div>
             </div>
             <div class="filter-content" id="data-source-filter"></div>
             <div class="filter-content" id="data-source-filter"></div>

Revision as of 15:56, 13 June 2022

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