Difference between revisions of "Widget:DCTList"
From LINKS Community Center
Line 362: | Line 362: | ||
const dataSources = data[0]; | const dataSources = data[0]; | ||
const { dcts, funcData } = data[1]; | const { dcts, funcData } = data[1]; | ||
− | |||
− | |||
// The keys of this object must match function category names EXACTLY. | // The keys of this object must match function category names EXACTLY. | ||
Line 496: | Line 494: | ||
if (!(filter && filter.type)) { summary.textContent = 'No filter.'; return; } | if (!(filter && filter.type)) { summary.textContent = 'No filter.'; return; } | ||
− | // | + | // Update filter text. |
if ( | if ( | ||
!filter.type.functions && | !filter.type.functions && | ||
!filter.type.dataSources | !filter.type.dataSources | ||
− | ) { summary.textContent = 'No filter.' | + | ) { summary.textContent = 'No filter.'; } |
− | + | else { | |
− | + | let summaryHtml = '<table>'; | |
− | + | if (filter.type.functions) { | |
− | + | summaryHtml += '<tr><td><strong>Functions</strong></td><td>' | |
− | + | + (filter.type.functions.length > 0 ? filter.type.functions.join(', ') : 'none') | |
− | + | + '</td></tr>'; | |
− | + | } | |
− | + | if (filter.type.dataSources) { | |
− | + | summaryHtml += '<tr><td><strong>Platforms</strong></td><td>' | |
− | + | + (filter.type.dataSources.length > 0 ? filter.type.dataSources.join(', ') : 'none') | |
− | + | + '</td></tr>'; | |
− | + | } | |
+ | summaryHtml += '</table>'; | ||
+ | summary.innerHTML = summaryHtml; | ||
} | } | ||
− | |||
− | |||
const markImages = () => { | const markImages = () => { |
Revision as of 13:39, 7 September 2022
Development verstion of the DCT List.
Not ready for production!