Skip to content
Snippets Groups Projects
all-submissions-table.js 658 B
Newer Older
  • Learn to ignore specific revisions
  • (function ($) {
    
        'use strict';
    
        // add the toggle arrow before the submission titles
    
        $('.all-submissions-table__parent td.title').prepend('<span class="all-submissions-table__toggle js-toggle-submission"><span class="arrow"></span></span>');
    
        const children = Array.prototype.slice.call(
    
            document.querySelectorAll('.js-toggle-submission')
    
        children.forEach(function (child) {
            child.addEventListener('click', (e) => {
    
                $(e.target).closest('.all-submissions-table__parent').toggleClass('is-expanded');