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 27: Line 27:
             imageData.forEach(img => sources[sources.findIndex(source => source.image === img.title)].image = img.url);
             imageData.forEach(img => sources[sources.findIndex(source => source.image === img.title)].image = img.url);


             // console.log('Sources:', sources)
             // console.log('Sources:', sources);
             return sources;
             return sources;
         }
         }
Line 39: Line 39:
             console.log('Response:', dctResponse)
             console.log('Response:', dctResponse)


             const list = Object.getOwnPropertyNames(dctResponse.query.results).map(dctKey => {
             const dctList = Object.getOwnPropertyNames(dctResponse.query.results).map(dctKey => {
                 const dct = {};
                 const dct = {};
                 dct.name = dctKey;
                 dct.name = dctKey;
Line 47: Line 47:
                 return dct;
                 return dct;
             })
             })
             console.log('DCT:', list);
             console.log('DCT:', dctList);
 
            const logoData = await getImages(dctList.map(dct => dct.logo));
            console.log('images', logoData)


             const table = new Tabulator("#tabulator", {
             const table = new Tabulator("#tabulator", {
                 data:list,
                 data: dctList,
                 autoColumns:true,
                 autoColumns: true,
             });
             });



Revision as of 11:31, 7 June 2022

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