removed obsolete JS from table widget

This commit is contained in:
Felix Hamann 2018-04-14 21:14:31 +02:00
parent acce67d562
commit dcd23bd0cd

View File

@ -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));
});
})();