Difference between revisions of "Widget:DCTList"

From LINKS Community Center
Jump to: navigation, search
Line 252: Line 252:
 
         let dataSourceFilterHtml = '';
 
         let dataSourceFilterHtml = '';
 
         groupedSources.forEach(group => {
 
         groupedSources.forEach(group => {
             dataSourceFilterHtml += group.reduce((prev, curr, idx) => {
+
             dataSourceFilterHtml += group.reduce((acc, curr, idx) => {
 
                 const identifier = escapeAttr(curr.name);
 
                 const identifier = escapeAttr(curr.name);
                 return prev + '<div ' + (idx === 0 ? ' class="filter-group-start">Group title<br>' : '>') +
+
                 return acc +  
 +
                '<div ' + (idx === 0 ? ' class="filter-group-start"><div class="group-title">Group title</div>' : '>') +
 
                 '<input type="checkbox" id="filter-' + identifier + '" value="' + curr.name + '" checked>' +
 
                 '<input type="checkbox" id="filter-' + identifier + '" value="' + curr.name + '" checked>' +
 
                 '<label for="filter-' + identifier + '"><img src="' + curr.image + '"> ' + curr.name + '</label></div>'
 
                 '<label for="filter-' + identifier + '"><img src="' + curr.image + '"> ' + curr.name + '</label></div>'

Revision as of 12:03, 15 June 2022

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