diff --git a/html/html.header b/html/html.header index d63fa08..ff10252 100644 --- a/html/html.header +++ b/html/html.header @@ -23,6 +23,12 @@ }} }} + var filterTimeLine = function() {{ + $("div#timeline table.git tbody tr").filter(function() {{ + return $(this).find("td:has(div)").length == 0; + }}).hide(); + }} + $("table.git tbody tr td:last-child").filter(function() {{ return parseFloat(this.innerHTML) < MINOR_AUTHOR_PERCENTAGE; }}).parent().hide(); @@ -47,6 +53,26 @@ }}).parent().hide(); $("table.git tbody tr:visible").each(colorRows); }}); + + filterTimeLine(); + + if ($("div#timeline table.git tbody tr:hidden").length > 0) {{ + $("div#timeline table.git tbody tr:visible").each(colorRows); + $("div#timeline").prepend("
"); + + $("div#timeline div.button").hover(function() {{ + $(this).addClass("hover"); + }}, function() {{ + $(this).removeClass("hover"); + }}).toggle(function() {{ + this.innerHTML = "Hide rows with minor work ∧" + $("div#timeline table.git tbody tr").show().each(colorRows); + }}, function() {{ + this.innerHTML = "Show rows with minor work ∨"; + filterTimeLine(); + $("div#timeline table.git tbody tr:visible").each(colorRows); + }}); + }} }}); diff --git a/timeline.py b/timeline.py index 433afa8..7f8e1f1 100644 --- a/timeline.py +++ b/timeline.py @@ -188,7 +188,7 @@ class Timeline(Outputable): names = timeline_data.get_authors() max_periods_per_row = 8 - timeline_xml = "" + __timeline_info_text__ + ".
" print(timeline_xml)