Widget: DCTList: Difference between revisions
From LINKS Community Center
Eschmidt (talk | contribs) No edit summary |
Eschmidt (talk | contribs) No edit summary |
||
Line 321: | Line 321: | ||
const functionsQueryResponse = await fetch(getQueryUrl(functionsQuery)).then(response => response.json()); | const functionsQueryResponse = await fetch(getQueryUrl(functionsQuery)).then(response => response.json()); | ||
Object.keys(functionsQueryResponse.query.results).forEach(key => { | Object.keys(functionsQueryResponse.query.results) | ||
.sort((keyA, keyB) => fnImages.indexOf(keyA) - fnImages.indexOf(keyB)) | |||
.forEach(key => { | |||
const functionCategory = functionsQueryResponse.query.results[key]; | |||
functionsData.set( | |||
removePrefix(functionCategory.fulltext), | |||
{ | |||
[DESC_KEY]: functionCategory.printouts[DESC_KEY][0], | |||
[FUNC_KEY]: functionCategory.printouts[FUNC_KEY].map(func => removePrefix(func.fulltext)) | |||
} | |||
); | |||
}); | |||
// 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') |
Revision as of 15:25, 16 November 2022
Development verstion of the DCT List.
Not ready for production!