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 491: Line 491:
                  
                  
                 // Exit if filter object/type doesn't exist (happens after Tabulator's own filter reset).
                 // Exit if filter object/type doesn't exist (happens after Tabulator's own filter reset).
                 if (!(filter && filter.type)) { summary.textContent = 'None'; return; }
                 if (!(filter && filter.type)) { summary.textContent = 'No filter.'; return; }


                 // Exit if none of the filters are present.
                 // Exit if none of the filters are present.
Line 497: Line 497:
                     !filter.type.functions &&
                     !filter.type.functions &&
                     !filter.type.dataSources
                     !filter.type.dataSources
                 ) { summary.textContent = 'None'; return; }
                 ) { summary.textContent = 'No filter.'; return; }


                 // Construct filter summary
                 // Construct filter summary
                 let summaryHtml = '';
                 let summaryHtml = '';
                 if (filter.type.functions) {
                 if (filter.type.functions) {
                     summaryHtml += '<div><b>Functions:</b> '
                     summaryHtml += '<div><b>Only with these functions:</b> '
                         + (filter.type.functions.length > 0 ? filter.type.functions.join(', ') : 'none')
                         + (filter.type.functions.length > 0 ? filter.type.functions.join(', ') : 'none')
                        + '</div>';
                }
                if (filter.type.dataSources) {
                    summaryHtml += '<div><b>Only supporting these platforms:</b> '
                        + (filter.type.dataSources.length > 0 ? filter.type.dataSources.join(', ') : 'none')
                         + '</div>';
                         + '</div>';
                 }
                 }

Revision as of 12:02, 7 September 2022

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