removed obsolete JS from table widget
This commit is contained in:
parent
acce67d562
commit
dcd23bd0cd
@ -14,10 +14,6 @@
|
|||||||
// attach click handler to each table-header
|
// attach click handler to each table-header
|
||||||
ths.forEach(function(th) {
|
ths.forEach(function(th) {
|
||||||
th.addEventListener('click', clickHandler);
|
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
|
// handles click on table header
|
||||||
@ -70,22 +66,9 @@
|
|||||||
console.error(err);
|
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 $ dbtIdent} + '-table-wrapper';
|
||||||
var selector = #{String $ wIdent "table-only"}.replace('-only', '-wrapper');
|
setupSorting(document.querySelector(selector));
|
||||||
setupSorting(document.querySelector('#' + selector));
|
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
|||||||
Reference in New Issue
Block a user