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 487: Line 487:
             tabulator.on('dataFiltered', (filters, rows) => {
             tabulator.on('dataFiltered', (filters, rows) => {
                 console.log(filters)
                 console.log(filters)
                 if (!(filters[0] && filters[0].type)) { return; }
                 const summary = document.getElementById('filter-summary');
                const filter = filters[0];
               
                // Exit if filter object/type doesn't exist (happens after Tabulator's own filter reset).
                if (!(filter && filter.type)) { summary.textContent = 'None'; return; }
 
                // Exit if none of the filters are present.
                if (
                    !filter.type.functions &&
                    !filter.type.dataSources
                ) { summary.textContent = 'None'; return; }
 
                // Construct filter summary
                const summaryHtml = '';
                if (filter.type.functions) {
                    summaryHtml += '<div><b>Functions:</b> ' + filter.type.functions.joint(', ');
                }
                summary.innerHTML = summaryHtml;


                 const markImages = () => {
                 const markImages = () => {
                     const selectedSources = filters[0].type.dataSources;
                     const selectedSources = filter.type.dataSources;
                     const selectedFunctions = filters[0].type.functions;
                     const selectedFunctions = filter.type.functions;


                     // Mark data source images
                     // Mark data source images

Revision as of 11:51, 7 September 2022

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