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 230: Line 230:


         // Set up filters.
         // Set up filters.
         const functionFilterHtml = Object.getOwnPropertyNames(fnImages).reduce((prev, funcName) => {
         const functionFilterHtml = Object.getOwnPropertyNames(fnImages).reduce((acc, funcName) => {
             const identifier = escapeAttr(funcName);
             const identifier = escapeAttr(funcName);
             return prev + '<div><input type="checkbox" id="func-filter-' + identifier + '" value="' + funcName + '" checked>' +
             return acc + '<div><input type="checkbox" id="func-filter-' + identifier + '" value="' + funcName + '" checked>' +
                 '<label for="func-filter-' + identifier + '"><img src="' + fnImages[funcName] + '"> ' + funcName + '</label></div>'
                 '<label for="func-filter-' + identifier + '"><img src="' + fnImages[funcName] + '"> ' + funcName + '</label></div>'
         }, '');
         }, '');
Line 253: Line 253:
             dataSourceFilterHtml += group.reduce((prev, curr, idx) => {
             dataSourceFilterHtml += group.reduce((prev, curr, idx) => {
                 const identifier = escapeAttr(curr.name);
                 const identifier = escapeAttr(curr.name);
                 return prev + '<div ' + (idx === 0 ? ' class="filter-group-start">' : '>') +
                 return prev + '<div ' + (idx === 0 ? ' class="filter-group-start">Group title<br>' : '>') +
                 '<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 10:59, 15 June 2022

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