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 63: Line 63:
     }
     }


     Promise.all([Promise.resolve(666), getDcts()]).then(data => {
     Promise.all([getSources(), getDcts()]).then(data => {
         const sources = data[0];
         const sources = data[0];
         const dcts = data[1];
         const dcts = data[1];


         const table = new Tabulator("#dct-tabulator", {
         const table = new Tabulator("#dct-tabulator", {
            // autoColumns: true,
             columns: [
             columns: [
                 {
                 {
Line 84: Line 83:
                         const sources = cell.getValue();
                         const sources = cell.getValue();
                         let out = sources.reduce((prev, curr) => {
                         let out = sources.reduce((prev, curr) => {
                             return prev + '<span>' + curr + '</span> '
                             return prev + '<img src="' + sources.find(src => src.name === curr).image + '">'
                         }, '');
                         }, '');
                         return out;
                         return out;

Revision as of 14:06, 7 June 2022

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