diff --git a/static/scripts/table.js b/static/scripts/table.js index 669afc5..f96f10b 100644 --- a/static/scripts/table.js +++ b/static/scripts/table.js @@ -1,11 +1,16 @@ class BrickTable { constructor(table, per_page) { - const columns = [] + const columns = []; + const no_sort_and_filter = []; const no_sort = []; const number = []; // Read the table header for parameters table.querySelectorAll('th').forEach((th, index) => { + if (th.dataset.tableNoSortAndFilter) { + no_sort_and_filter.push(index); + } + if (th.dataset.tableNoSort) { no_sort.push(index); } @@ -15,8 +20,12 @@ class BrickTable { } }); + if (no_sort_and_filter.length) { + columns.push({ select: no_sort_and_filter, sortable: false, searchable: false }); + } + if (no_sort.length) { - columns.push({ select: no_sort, sortable: false, searchable: false }); + columns.push({ select: no_sort, sortable: false }); } if (number.length) { diff --git a/templates/instructions/table.html b/templates/instructions/table.html index 8ad9f3c..b2c8007 100644 --- a/templates/instructions/table.html +++ b/templates/instructions/table.html @@ -6,9 +6,9 @@
Image | +Image | Set | Name | Theme | @@ -13,7 +13,7 @@Parts | Retirement | {% if g.login.is_authenticated() %} -Actions | +Actions | {% endif %}
---|