$(document).ready(function() { // Configuration for fancy sortable tables for source file groups $('.file_list').dataTable({ "aaSorting": [[ 1, "asc" ]], "bPaginate": false, "bJQueryUI": true, "aoColumns": [ null, { "sType": "percent" }, null, null, null, null, null ] }); // Syntax highlight all files up front - deactivated // $('.source_table pre code').each(function(i, e) {hljs.highlightBlock(e, ' ')}); // Syntax highlight source files on first toggle of the file view popup $("a.src_link").click(function() { // Get the source file element that corresponds to the clicked element var source_table = $($(this).attr('href')); // If not highlighted yet, do it! if (!source_table.hasClass('highlighted')) { source_table.find('pre code').each(function(i, e) {hljs.highlightBlock(e, ' ')}); source_table.addClass('highlighted'); }; }); // Set-up of popup for source file views $("a.src_link").fancybox({ 'hideOnContentClick': true, 'centerOnScroll': true, 'width': '90%', 'padding': 0, 'transitionIn': 'elastic' }); // Hide src files and file list container after load $('.source_files').hide(); $('.file_list_container').hide(); // Add tabs based upon existing file_list_containers $('.file_list_container h2').each(function(){ var container_id = $(this).parent().attr('id'); var group_name = $(this).find('.group_name').first().html(); var covered_percent = $(this).find('.covered_percent').first().html(); $('.group_tabs').append('