Widget: DevGuidelines: Difference between revisions
From LINKS Community Center
Cschwentker (talk | contribs) No edit summary |
Cschwentker (talk | contribs) No edit summary |
||
Line 273: | Line 273: | ||
let TARGET_AUDIENCE_VALUES = []; | let TARGET_AUDIENCE_VALUES = []; | ||
let EXPERIENCE_LEVEL_VALUES = []; | let EXPERIENCE_LEVEL_VALUES = []; | ||
let YEAR_LEVEL_VALUES = []; | |||
Line 281: | Line 282: | ||
TARGET_AUDIENCE_VALUES = TARGET_AUDIENCE_VALUES.concat(guideline[TA_PROP]) | TARGET_AUDIENCE_VALUES = TARGET_AUDIENCE_VALUES.concat(guideline[TA_PROP]) | ||
EXPERIENCE_LEVEL_VALUES = EXPERIENCE_LEVEL_VALUES.concat(guideline[EX_PROP]) | EXPERIENCE_LEVEL_VALUES = EXPERIENCE_LEVEL_VALUES.concat(guideline[EX_PROP]) | ||
YEAR_LEVEL_VALUES = YEAR_LEVEL_VALUES.concat(guideline[YEAR_PROP]) | |||
} | } | ||
LANGUAGES_VALUES = new Set(LANGUAGES_VALUES); | LANGUAGES_VALUES = new Set(LANGUAGES_VALUES); | ||
COVERS_THEMATIC_VALUES = new Set(COVERS_THEMATIC_VALUES); | |||
TARGET_AUDIENCE_VALUES = new Set(TARGET_AUDIENCE_VALUES); | |||
YEAR_LEVEL_VALUES = new Set(YEAR_LEVEL_VALUES); | |||
console.log(LANGUAGES_VALUES); | console.log(LANGUAGES_VALUES); | ||
let languageFilterHtml = LANGUAGES_VALUES.reduce((acc, curr) => { | |||
const identifier = escapeAttr(curr); | |||
return acc | |||
+ '<div><input type="checkbox" checked id="language-filter-' + identifier | |||
+ '" value="' + curr + '">' | |||
+ '<label for="language-filter-' + identifier + '">' + curr + '</label></div>' | |||
}, ''); | |||
document.getElementById('language-filter').innerHTML = languageFilterHtml; | |||
const table = new Tabulator('#guideline-tabulator', { | const table = new Tabulator('#guideline-tabulator', { |
Revision as of 15:54, 22 November 2022
Development version of the List of Guidelines.
Not ready for production!