Widget: DCTList: Difference between revisions

From LINKS Community Center
Jump to: navigation, search
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());


            const functionsSortOrder = Object.keys(fnImages);
             Object.keys(functionsQueryResponse.query.results)
             Object.keys(functionsQueryResponse.query.results)
                 .sort((keyA, keyB) => fnImages.indexOf(keyA) - fnImages.indexOf(keyB))
                 .sort((keyA, keyB) => functionsSortOrder.indexOf(keyA) - functionsSortOrder.indexOf(keyB))
                 .forEach(key => {
                 .forEach(key => {
                     const functionCategory = functionsQueryResponse.query.results[key];
                     const functionCategory = functionsQueryResponse.query.results[key];

Revision as of 15:26, 16 November 2022

Development verstion of the DCT List.
Not ready for production!