Widget: DCTList: Difference between revisions

From LINKS Community Center
Jump to: navigation, search
Eschmidt (talk | contribs)
No edit summary
Eschmidt (talk | contribs)
No edit summary
Line 662: Line 662:


                 if (encoded) {
                 if (encoded) {
                     const action = JSON.parse(decodeURIComponent(atob(encoded)));
                     const actions = JSON.parse(decodeURIComponent(atob(encoded)));


                     const filter = action.filter;
                     const filter = actions.filter;
                     if (filter) {
                     if (filter) {
                         // Functions filter
                         // Functions filter
                         const functions = filter.functions;
                         const functions = filter.functions;
                         if (functions) {
                         if (functions) {
                             Object.keys(functions).forEach(fnCat => {
                             Object.keys(functions).forEach(subfun => {
                                 document.getElementById('func-filter-' + escapeAttr(fnCat))
                                 document.getElementById('subfunc-filter-' + escapeAttr(subfun)).checked = !!functions[subfun];
                                    .closest('.func-filter-block')
                                    .querySelectorAll('input[type="checkbox"]').forEach(box => box.checked = !!functions[fnCat]);
                             });
                             });



Revision as of 12:02, 5 June 2023

Current version of the DCT List.
Not ready for production!