Difference between revisions of "Widget:DCTList"

From LINKS Community Center
Jump to: navigation, search
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)
                const functionCategory = functionsQueryResponse.query.results[key];
+
                .sort((keyA, keyB) => fnImages.indexOf(keyA) - fnImages.indexOf(keyB))
                functionsData.set(
+
                .forEach(key => {
                    removePrefix(functionCategory.fulltext),
+
                    const functionCategory = functionsQueryResponse.query.results[key];
                    {
+
                    functionsData.set(
                        [DESC_KEY]: functionCategory.printouts[DESC_KEY][0],
+
                        removePrefix(functionCategory.fulltext),
                        [FUNC_KEY]: functionCategory.printouts[FUNC_KEY].map(func => removePrefix(func.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!