Widget: DCTList: Difference between revisions
From LINKS Community Center
Eschmidt (talk | contribs) No edit summary |
Eschmidt (talk | contribs) No edit summary |
||
Line 322: | Line 322: | ||
const sortOrder = Object.keys(fnImages); | const sortOrder = Object.keys(fnImages); | ||
Object.entries(functionsQueryResponse.query.results) | |||
.map(([key, value]) => ([removePrefix(key), value])) | .map(([key, value]) => ([removePrefix(key), value])) | ||
.sort(([keyA,], [keyB,]) => sortOrder.indexOf(keyA) - sortOrder.indexOf(keyB)) | .sort(([keyA,], [keyB,]) => sortOrder.indexOf(keyA) - sortOrder.indexOf(keyB)) | ||
Line 335: | Line 334: | ||
); | ); | ||
}); | }); | ||
// TODO: Remove properties that are not relevant for the filter? (e.g. 'Supported content types') | // TODO: Remove properties that are not relevant for the filter? (e.g. 'Supported content types') | ||
Line 452: | Line 437: | ||
const { dcts, funcData } = data[1]; | const { dcts, funcData } = data[1]; | ||
let funcHtml = ''; | let funcHtml = ''; | ||
for (const [fnCat, fnInfo] of funcData) { | for (const [fnCat, fnInfo] of funcData) { | ||
Line 465: | Line 446: | ||
</div>`; | </div>`; | ||
} | } | ||
document.getElementById('functions-filter').innerHTML = funcHtml; | document.getElementById('functions-filter').innerHTML = funcHtml; | ||
Revision as of 10:04, 17 November 2022
Development verstion of the DCT List.
Not ready for production!