Widget: DCTList: Difference between revisions
From LINKS Community Center
Eschmidt (talk | contribs) No edit summary |
Eschmidt (talk | contribs) No edit summary |
||
Line 437: | Line 437: | ||
'Meta': '/index.php/Special:FilePath/File:Func_meta.svg', | 'Meta': '/index.php/Special:FilePath/File:Func_meta.svg', | ||
}; | }; | ||
// FILTER TEST | |||
let funcHtml = ''; | |||
for (const [fnCat, fnInfo] of funcData) { | |||
const identifier = 'func-filter-' + escapeAttr(fnCat); | |||
funcHtml += | |||
`<div> | |||
<input type="checkbox" checked id="${identifier}" value="${fnCat}"> | |||
<label for="${identifier}"><img src="${fnImages[fnCat]}"> ${fnCat}</label> | |||
</div>`; | |||
} | |||
// FILTER TEST | |||
// Set up filters. | // Set up filters. | ||
const functionFilterHtml = Object.keys(fnImages).reduce((acc, funcName) => { | // const functionFilterHtml = Object.keys(fnImages).reduce((acc, funcName) => { | ||
// const identifier = escapeAttr(funcName); | |||
// return acc | |||
// + '<div><input type="checkbox" checked id="func-filter-' + identifier | |||
// + '" value="' + funcName + '">' | |||
// + '<label for="func-filter-' + identifier | |||
// + '"><img src="' + fnImages[funcName] + '"> ' + funcName + '</label></div>' | |||
}, ''); | // }, ''); | ||
document.getElementById('functions-filter').innerHTML = | document.getElementById('functions-filter').innerHTML = funcHtml; | ||
const groupedSources = []; | const groupedSources = []; |
Revision as of 15:06, 16 November 2022
Development verstion of the DCT List.
Not ready for production!