Widget: DevGuidelines: Difference between revisions

From LINKS Community Center
Jump to: navigation, search
Cschwentker (talk | contribs)
No edit summary
Cschwentker (talk | contribs)
No edit summary
 
Line 325: Line 325:
                 guideline[EX_PROP] = guidelineResult.printouts[EX_PROP].map(value => value.fulltext);
                 guideline[EX_PROP] = guidelineResult.printouts[EX_PROP].map(value => value.fulltext);
                 guideline[YEAR_PROP] = guidelineResult.printouts[YEAR_PROP][0] && guidelineResult.printouts[YEAR_PROP][0].raw.slice(-4);
                 guideline[YEAR_PROP] = guidelineResult.printouts[YEAR_PROP][0] && guidelineResult.printouts[YEAR_PROP][0].raw.slice(-4);
                 guideline[TECH_PROP] = guidelineResult.printouts[TECH_PROP].map(value => value.fulltext).sort();
                 guideline[TECH_PROP] = guidelineResult.printouts[TECH_PROP].map(value => value.fulltext);
                 return guideline;
                 return guideline;
             });
             });
Line 385: Line 385:
             const techOptions = Array.from(document.querySelectorAll('#tech-filter input[type="checkbox"]'));
             const techOptions = Array.from(document.querySelectorAll('#tech-filter input[type="checkbox"]'));
             const selectedTechs = techOptions.filter(checkbox => checkbox.checked).map(checkbox => checkbox.value);
             const selectedTechs = techOptions.filter(checkbox => checkbox.checked).map(checkbox => checkbox.value);
             filterState.techs = selectedTechs.length === techOptions.length ? undefined : techOptions;
             filterState.techs = selectedTechs.length === techOptions.length ? undefined : selectedTechs;


             table.setFilter(guidelineFilter, filterState);
             table.setFilter(guidelineFilter, filterState);
Line 529: Line 529:
             }, '');
             }, '');
             document.getElementById('audience-experience-filter').innerHTML = targetAudienceExperienceHtml;
             document.getElementById('audience-experience-filter').innerHTML = targetAudienceExperienceHtml;
 
         
             let techHtml = Array.from(MENTIONS_TECHNOLOGIES_VALUES.values()).reduce((acc, curr) => {
             let techHtml = Array.from(MENTIONS_TECHNOLOGIES_VALUES.values()).reduce((acc, curr) => {
                 const identifier = escapeAttr(curr);
                 const identifier = escapeAttr(curr);

Latest revision as of 16:08, 24 November 2022

Development version of the List of Guidelines.
Not ready for production!