Widget: DCTList: Difference between revisions
From LINKS Community Center
Eschmidt (talk | contribs) No edit summary |
Eschmidt (talk | contribs) No edit summary |
||
Line 164: | Line 164: | ||
} | } | ||
.subfunc-filter { | .subfunc-filter-block { | ||
font-size: smaller; | font-size: smaller; | ||
padding-left: 1em; | padding-left: 1em; | ||
Line 455: | Line 455: | ||
const identifier = 'func-filter-' + escapeAttr(fnCat); | const identifier = 'func-filter-' + escapeAttr(fnCat); | ||
funcFilterHtml += | funcFilterHtml += | ||
`<div> | `<div class="func-filter-block"> | ||
<div> | <div> | ||
<input type="checkbox" checked id="${identifier}" value="${fnCat}"> | <input type="checkbox" checked id="${identifier}" value="${fnCat}" class="func-cat"> | ||
<label for="${identifier}"><img src="${fnImages[fnCat]}"> ${fnCat}</label> | <label for="${identifier}"><img src="${fnImages[fnCat]}"> ${fnCat}</label> | ||
</div>`; | </div>`; | ||
Line 463: | Line 463: | ||
// add subfunctions | // add subfunctions | ||
if (index < 4) { | if (index < 4) { | ||
funcFilterHtml += '<div class="subfunc-filter">'; | funcFilterHtml += '<div class="subfunc-filter-block">'; | ||
for (const func of fnInfo.functions) { | for (const func of fnInfo.functions) { | ||
const subfuncId = 'subfunc-filter-' + escapeAttr(func); | const subfuncId = 'subfunc-filter-' + escapeAttr(func); | ||
Line 677: | Line 677: | ||
// Picking at least one subfunction activates the category. | // Picking at least one subfunction activates the category. | ||
// Picking zero subfunctions deactivates the category. | // Picking zero subfunctions deactivates the category. | ||
console.log( | const filterBlock = event.target.closes('.func-filter-block'); | ||
console.log(filterBlock) | |||
applyFilters(); | applyFilters(); | ||
}, { passive: true }); | }, { passive: true }); |
Revision as of 15:40, 18 November 2022
Development verstion of the DCT List.
Not ready for production!