Sha256: ae0e8cc768a8a36624c99f78ed027dfde65755403a5dc61677361d5504b48d3f
Contents?: true
Size: 1.23 KB
Versions: 5
Compression:
Stored size: 1.23 KB
Contents
$(function() { $("#report_table").tablesorter({ widgets: ['zebra'], textExtraction: 'complex' }); $('.filter').change(function(){ var ff = $('#file_filter').val(), cf = $('#coverage_filter').val(); $('table#report_table tbody tr').each(function(i){ if ((this.className.split(" ").indexOf(ff) > -1) && (this.className.split(" ").indexOf(cf) > -1)) { this.style.display = ""; } else { this.style.display = "none"; }; restripe(); }); }); }); function restripe() { i = 0; $('table#report_table tbody tr').each(function(){ if (this.style.display != "none") { i += 1; classes = this.className.split(" "); if ($.inArray("even",classes) != -1) { classes.splice($.inArray("even",classes),1); } else if ($.inArray("odd",classes) != -1) { classes.splice($.inArray("odd",classes),1); } if (i % 2 === 0) { this.className = classes.join(" ") + " odd"; } else { this.className = classes.join(" ") + " even"; } } }); } // Fix IE's lack of support for indexOf (!) if (!Array.indexOf) { Array.prototype.indexOf = function(obj){ for(var i=0; i<this.length; i++){ if(this[i]==obj){return i;} } return -1; };}
Version data entries
5 entries across 5 versions & 1 rubygems