Difference between revisions of "Widget:DCTList"

From LINKS Community Center
Jump to: navigation, search
Line 343: Line 343:
  
 
     function selectAll(context) {
 
     function selectAll(context) {
         document.querySelectorAll('input[type="checkbox"]', context).forEach(checkbox => checkbox.checked = true);
+
         document.querySelectorAll(context + ' input[type="checkbox"]').forEach(checkbox => checkbox.checked = true);
 
         applyFilters();
 
         applyFilters();
 
     }
 
     }
  
 
     function selectAll(context) {
 
     function selectAll(context) {
         document.querySelectorAll('input[type="checkbox"]', context).forEach(checkbox => checkbox.checked = false);
+
         document.querySelectorAll(context + ' input[type="checkbox"]').forEach(checkbox => checkbox.checked = false);
 
         applyFilters();
 
         applyFilters();
 
     }
 
     }
Line 362: Line 362:
 
             <h3>Functions</h3>
 
             <h3>Functions</h3>
 
             <div class="filter-button-wrapper">
 
             <div class="filter-button-wrapper">
                 <button type="button" onclick="selectAll(this)">Select all</button> |
+
                 <button type="button" onclick="selectAll('#functions-filter')">Select all</button> |
                 <button type="button" onclick="selectAll(this)">Deselect all</button>
+
                 <button type="button" onclick="selectAll('#functions-filter')">Deselect all</button>
 
             </div>
 
             </div>
 
             <div class="filter-content" id="functions-filter" ></div>
 
             <div class="filter-content" id="functions-filter" ></div>
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="selectAll(this)">Select all</button> |
+
                 <button type="button" onclick="selectAll('#data-source-filter')">Select all</button> |
                 <button type="button" onclick="selectAll(this)">Deselect all</button>
+
                 <button type="button" onclick="selectAll('#data-source-filter')">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 17:00, 13 June 2022

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