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 46: Line 46:
             align-items: end;
             align-items: end;
         }
         }
         .filter-group-start { grid-column-start: 1; }
         .filter-group-header { grid-column: 1/-1; }
         .filter-content img { width: 2em; height: 2em; margin: 0 .5em; }
         .filter-content img { width: 2em; height: 2em; margin: 0 .5em; }
         #dct-tabulator.tabulator { border: 0 none; background-color: transparent; font-size: 1.2em; }
         #dct-tabulator.tabulator { border: 0 none; background-color: transparent; font-size: 1.2em; }
Line 254: Line 254:
             dataSourceFilterHtml += group.reduce((acc, curr, idx) => {
             dataSourceFilterHtml += group.reduce((acc, curr, idx) => {
                 const identifier = escapeAttr(curr.name);
                 const identifier = escapeAttr(curr.name);
                let groupHeaderHtml = '';
                if (idx === 0) {
                    groupHeaderHtml = '<div class="filter-group-header">' +
                        'Group Title' +
                        '</div>'
                }
                 return acc +  
                 return acc +  
                 '<div ' + (idx === 0 ? ' class="filter-group-start"><div class="group-title">Group title</div>' : '>') +
                 '<div>' + groupHeaderHtml +
                 '<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 11:08, 15 June 2022

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