Difference between revisions of "Widget:DCTList"
From LINKS Community Center
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 16:25, 16 November 2022
Development verstion of the DCT List.
Not ready for production!