Difference between revisions of "Widget:DCTList"

From LINKS Community Center
Jump to: navigation, search
Line 663: Line 663:
 
                 ) { summary.textContent = 'No filter. Showing all results.'; }
 
                 ) { summary.textContent = 'No filter. Showing all results.'; }
 
                 else {
 
                 else {
                    console.log(filter.type.functions)
 
 
                     let summaryHtml = '<table>';
 
                     let summaryHtml = '<table>';
 
                     if (filter.type.functions) {
 
                     if (filter.type.functions) {
                         summaryHtml += '<tr><td><strong>Functions</strong></td><td>'
+
                         summaryHtml += '<tr><td><strong>Functions</strong></td><td>';
                            + (filter.type.functions.length > 0 ? filter.type.functions.join(', ') : 'none')
+
                        if (filter.type.functions.size > 0) {
                             + '</td></tr>';
+
                            summaryHtml += 'none';
 +
                        } else {
 +
                            for (const [cat, subs] of filter.type.functions) {
 +
                                summaryHtml += cat + ': <small>(' + subs.joing(', ') + ')</small>';
 +
                             }
 +
                        }
 +
                        summaryHtml  += '</td></tr>';
 
                     }
 
                     }
 
                     if (filter.type.dataSources) {
 
                     if (filter.type.dataSources) {

Revision as of 16:35, 21 November 2022

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