The HTML output now shows the number of hidden entries in tables.

This commit is contained in:
Adam Waldenberg 2013-06-26 04:30:57 +02:00
parent cd1c1f0c65
commit aec012b877

View file

@ -64,15 +64,16 @@
}});
$("table.git tfoot tr td:first-child").filter(function() {{
return $(this).parent().parent().parent().find("tbody tr:hidden").length > 0;
this.hiddenCount = $(this).parent().parent().parent().find("tbody tr:hidden").length;
return this.hiddenCount > 0;
}}).each(function() {{
$(this).addClass("hoverable");
this.innerHTML = "{show_minor_authors} ∨";
this.innerHTML = "{show_minor_authors} (" + this.hiddenCount + ") ∨";
}}).toggle(function() {{
this.innerHTML = "{hide_minor_authors} ∧";
this.innerHTML = "{hide_minor_authors} (" + this.hiddenCount + ") ∧";
$(this).parent().parent().parent().find("tbody tr").show().each(colorRows);
}}, function() {{
this.innerHTML = "{show_minor_authors} ∨";
this.innerHTML = "{show_minor_authors} (" + this.hiddenCount + ") ∨";
$(this).parent().parent().parent().find("tbody tr td:last-child").filter(function() {{
return parseFloat(this.innerHTML) < MINOR_AUTHOR_PERCENTAGE;
}}).parent().hide();
@ -81,15 +82,16 @@
filterTimeLine();
if ($("div#timeline table.git tbody tr:hidden").length > 0) {{
var hiddenTimelineCount = $("div#timeline table.git tbody tr:hidden").length;
if (hiddenTimelineCount > 0) {{
$("div#timeline table.git tbody tr:visible").each(colorRows);
$("div#timeline").prepend("<div class=\"button\">{show_minor_rows} &or;</div>");
$("div#timeline").prepend("<div class=\"button\">{show_minor_rows} (" + hiddenTimelineCount + ") &or;</div>");
$("div#timeline div.button").toggle(function() {{
this.innerHTML = "{hide_minor_rows} &and;";
this.innerHTML = "{hide_minor_rows} (" + hiddenTimelineCount + ") &and;";
$("div#timeline table.git tbody tr").show().each(colorRows);
}}, function() {{
this.innerHTML = "{show_minor_rows} &or;";
this.innerHTML = "{show_minor_rows} (" + hiddenTimelineCount + ") &or;";
filterTimeLine();
$("div#timeline table.git tbody tr:visible").each(colorRows);
}});