Skip to content
Snippets Groups Projects
Commit e39da946 authored by Chris Lawton's avatar Chris Lawton
Browse files

toggle show/hiding of child table rows

parent 5ae070a5
No related branches found
No related tags found
No related merge requests found
...@@ -74,6 +74,18 @@ import '@fancyapps/fancybox'; ...@@ -74,6 +74,18 @@ import '@fancyapps/fancybox';
// Add <tr> toggle arrow // Add <tr> toggle arrow
$('.tr--parent td.title').prepend('<span class="js-tr-toggle arrow"></span>'); $('.tr--parent td.title').prepend('<span class="js-tr-toggle arrow"></span>');
// Toggle show/hide for submissions overview table rows
const children = Array.prototype.slice.call(
document.querySelectorAll('.js-tr-toggle')
);
children.forEach(function (child) {
child.addEventListener('click', function (e) {
$(e.target).closest('.tr--parent').toggleClass('is-expanded');
});
});
}); });
// Add active class to filters - dropdowns are dynamically appended to the dom, // Add active class to filters - dropdowns are dynamically appended to the dom,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment