Widget: DCTList: Difference between revisions
From LINKS Community Center
Eschmidt (talk | contribs) No edit summary |
Eschmidt (talk | contribs) No edit summary |
||
Line 146: | Line 146: | ||
const dcts = data[1]; | const dcts = data[1]; | ||
let web = dataSources.splice(dataSources.findIndex(src => src.name === 'Web'), 1)[0] | |||
let crowd = dataSources.splice(dataSources.findIndex(src => src.name === 'Crowd'), 1)[0] | |||
const filterHtml = ''; | |||
// dataSources.unshift(); | |||
// dataSources.unshift(); | |||
// Set up filters. | // Set up filters. | ||
filterHtml = dataSources.reduce((prev, curr, idx) => { | |||
const identifier = escapeAttr(curr.name); | const identifier = escapeAttr(curr.name); | ||
return prev + '<div | return prev + '<div>' + | ||
'<input type="checkbox" id="filter-' + identifier + '" value="' + curr.name + '" checked>' + | '<input type="checkbox" id="filter-' + identifier + '" value="' + curr.name + '" checked>' + | ||
'<label for="filter-' + identifier + '"><img src="' + curr.image + '"> ' + curr.name + '</label></div>' | '<label for="filter-' + identifier + '"><img src="' + curr.image + '"> ' + curr.name + '</label></div>' |
Revision as of 11:37, 9 June 2022
Development verstion of the DCT List.
Not ready for production!