Difference between revisions of "Widget:DCTList"

From LINKS Community Center
Jump to: navigation, search
Line 371: Line 371:
 
         */
 
         */
 
         function dctFilter(dct, filterState) {
 
         function dctFilter(dct, filterState) {
            console.log(filterState)
 
 
             // If filtering property is empty, don't apply the filter (set the check to true).
 
             // If filtering property is empty, don't apply the filter (set the check to true).
 
             // Passing an empty object (as with applyFilters(true)) should result in an unfiltered table.
 
             // Passing an empty object (as with applyFilters(true)) should result in an unfiltered table.
Line 472: Line 471:
 
                         '<label for="filter-' + identifier + '"><img src="' + curr.image + '"> ' + curr.name + '</label></div>'
 
                         '<label for="filter-' + identifier + '"><img src="' + curr.image + '"> ' + curr.name + '</label></div>'
 
                 }, '');
 
                 }, '');
             })
+
             });
 
             document.getElementById('data-source-filter').innerHTML = dataSourceFilterHtml;
 
             document.getElementById('data-source-filter').innerHTML = dataSourceFilterHtml;
  
Line 511: Line 510:
 
                             const dct = cell.getData();
 
                             const dct = cell.getData();
 
                             let out = '<a href="' + dct.url + '">' + dct.name + '</a><br>';
 
                             let out = '<a href="' + dct.url + '">' + dct.name + '</a><br>';
                             if (dct.businessModel.includes('Freeware')) {
+
                             if (dct.businessModel.includes(FREE_KEY)) {
 
                                 out += '<small><span class="badge badge-success">Freeware</span></small> ';
 
                                 out += '<small><span class="badge badge-success">Freeware</span></small> ';
 
                             }
 
                             }
                             if (dct.businessModel.includes('Free plan available')) {
+
                             if (dct.businessModel.includes(FREE_PLAN_KEY)) {
 
                                 out += '<small><span class="badge badge-success">Free plan</span></small> ';
 
                                 out += '<small><span class="badge badge-success">Free plan</span></small> ';
 
                             }
 
                             }

Revision as of 11:57, 28 September 2022

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