From dcd23bd0cdfc049e12d5c7a19d368cc46111f315 Mon Sep 17 00:00:00 2001 From: Felix Hamann Date: Sat, 14 Apr 2018 21:14:31 +0200 Subject: [PATCH] removed obsolete JS from table widget --- templates/table/layout.julius | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/templates/table/layout.julius b/templates/table/layout.julius index f63f64d8b..612d376b5 100644 --- a/templates/table/layout.julius +++ b/templates/table/layout.julius @@ -14,10 +14,6 @@ // attach click handler to each table-header ths.forEach(function(th) { th.addEventListener('click', clickHandler); - // TODO: Remove this forEach once column-description is link - Array.from(th.querySelectorAll('a')).forEach(function(a) { - a.style.display = 'none'; - }) }); // handles click on table header @@ -70,22 +66,9 @@ console.error(err); }); } - - - // TODO: Remove after class "sortable" gets set by backend - (function () { - ths.forEach(function(th) { - var link = th.querySelector('a'); - // abort if there is no link set for this column - if (!link) return false; - th.classList.add('sortable'); - }) - })(); - } - // TODO: how to get 'terms' only? - var selector = #{String $ wIdent "table-only"}.replace('-only', '-wrapper'); - setupSorting(document.querySelector('#' + selector)); + var selector = '#' + #{String $ dbtIdent} + '-table-wrapper'; + setupSorting(document.querySelector(selector)); }); })();