Widget: DevGuidelines: Difference between revisions
From LINKS Community Center
Eschmidt (talk | contribs) No edit summary |
Eschmidt (talk | contribs) No edit summary |
||
Line 102: | Line 102: | ||
async function getGuidelines() { | async function getGuidelines() { | ||
const guidelinesResponse = await fetch(getQueryUrl(guidelineQuery)).then(response => response.json()); | const guidelinesResponse = await fetch(getQueryUrl(guidelineQuery)).then(response => response.json()); | ||
return Object.keys(guidelinesResponse.query.results).map(title => { | return Object.keys(guidelinesResponse.query.results).map(title => { | ||
Line 121: | Line 120: | ||
Promise.all([getGuidelines()]).then(data => { | Promise.all([getGuidelines()]).then(data => { | ||
const guidelines = data[0]; | const guidelines = data[0]; | ||
const table = new Tabulator('#guideline-tabulator', { | const table = new Tabulator('#guideline-tabulator', { | ||
Line 131: | Line 128: | ||
{ | { | ||
title: 'Title', | title: 'Title', | ||
field: 'title' | field: 'title', | ||
formatter: cell => '<a href="' + cell.getData().url + '">' + cell.getValue() + '</a>' | |||
}, | }, | ||
{ | { |
Revision as of 09:58, 6 September 2022
Development version of the List of Guidelines.
Not ready for production!