Widget: GuidelinesList: Difference between revisions
From LINKS Community Center
Eschmidt (talk | contribs) No edit summary |
Eschmidt (talk | contribs) No edit summary |
||
Line 425: | Line 425: | ||
const [dataSources, guidelines] = data; | const [dataSources, guidelines] = data; | ||
console.log(guidelines) | |||
let COVERS_THEMATIC_VALUES = [] | let COVERS_THEMATIC_VALUES = [] | ||
Line 627: | Line 629: | ||
tabulator.on('tableBuilt', () => { | tabulator.on('tableBuilt', () => { | ||
tabulator.redraw(true); | tabulator.redraw(true); | ||
table = tabulator; | table = tabulator; | ||
// Set up the table if parameter was passed. | |||
const params = new URLSearchParams(window.location.search); | |||
const encoded = params.get('do'); | |||
if (encoded) { | |||
const actions = JSON.parse(decodeURIComponent(atob(encoded))); | |||
const filter = actions.filter; | |||
if (filter) { | |||
// Functions filter | |||
const functions = filter.functions; | |||
if (functions) { | |||
Object.keys(functions).forEach(subfun => { | |||
const subfunEl = document.getElementById('subfunc-filter-' + escapeAttr(subfun)); | |||
subfunEl.checked = !!functions[subfun]; | |||
subfunEl.dispatchEvent(new Event('change', { bubbles: true })); | |||
}); | |||
document.getElementById('functions-filter').closest('.filter-wrapper').classList.toggle('open'); | |||
} | |||
// Further filters | |||
// ... | |||
applyFilters(); | |||
toggleFilter(); | |||
} | |||
// Further actions (e.g. open filter panel, etc.) | |||
// ... | |||
} | |||
}); | }); | ||
tabulator.on('dataFiltered', (filters, rows) => { | tabulator.on('dataFiltered', (filters, rows) => { | ||
const summary = document.getElementById('filter-summary'); | const summary = document.getElementById('filter-summary'); |
Revision as of 11:49, 23 June 2023
Current version of the List of Guidelines.
Currently in use!