mirror of
https://github.com/ejwa/gitinspector.git
synced 2024-11-16 00:28:25 +01:00
The HTML output now shows the number of hidden entries in tables.
This commit is contained in:
parent
cd1c1f0c65
commit
aec012b877
1 changed files with 10 additions and 8 deletions
|
@ -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} ∨</div>");
|
||||
$("div#timeline").prepend("<div class=\"button\">{show_minor_rows} (" + hiddenTimelineCount + ") ∨</div>");
|
||||
|
||||
$("div#timeline div.button").toggle(function() {{
|
||||
this.innerHTML = "{hide_minor_rows} ∧";
|
||||
this.innerHTML = "{hide_minor_rows} (" + hiddenTimelineCount + ") ∧";
|
||||
$("div#timeline table.git tbody tr").show().each(colorRows);
|
||||
}}, function() {{
|
||||
this.innerHTML = "{show_minor_rows} ∨";
|
||||
this.innerHTML = "{show_minor_rows} (" + hiddenTimelineCount + ") ∨";
|
||||
filterTimeLine();
|
||||
$("div#timeline table.git tbody tr:visible").each(colorRows);
|
||||
}});
|
||||
|
|
Loading…
Reference in a new issue