Difference between revisions of "Widget:DCTList"

From LINKS Community Center
Jump to: navigation, search
Line 557: Line 557:
 
                         cssClass: 'functions-cell',
 
                         cssClass: 'functions-cell',
 
                         formatter: function (cell) {
 
                         formatter: function (cell) {
                             const out = Array.from(cell.getValue().keys())
+
                             return Array.from(cell.getValue().keys())
                            .map(func => '<img class="func-img" src="' + fnImages[func] +
+
                                .map(fn => `<img class="func-img" src="${fnImages[fn]}" data-value="${fn}" alt="${fn}" title="${fn}">`)
                                    '" data-value="' + func +
 
                                    '" alt="' + func +
 
                                    '" title="' + func +
 
                                    '">')
 
 
                                 .join('');
 
                                 .join('');
 
                            // const order = Object.keys(fnImages);
 
                            // const output = cell.getValue()
 
                            //    .sort((a, b) => order.indexOf(a) - order.indexOf(b))
 
                            //    .map(func => '<img class="func-img" src="' + fnImages[func] +
 
                            //        '" data-value="' + func +
 
                            //        '" alt="' + func +
 
                            //        '" title="' + func +
 
                            //        '">')
 
                            //    .join('');
 
                            return out;
 
 
                         }
 
                         }
 
                     },
 
                     },

Revision as of 17:31, 17 November 2022

Development verstion of the DCT List.
Not ready for production!