diff --git a/gitinspector/format.py b/gitinspector/format.py index 9669eee..2c33bdf 100644 --- a/gitinspector/format.py +++ b/gitinspector/format.py @@ -84,7 +84,7 @@ def output_header(repos): if __selected_format__ == "htmlembedded": jquery_js = ">" + __get_zip_file_content__("jquery.js") else: - jquery_js = " src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js\">" + jquery_js = " src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js\">" print(html_header.format(title=_("Repository statistics for '{0}'").format(repos_string), jquery=jquery_js, diff --git a/gitinspector/html/flot.zip b/gitinspector/html/flot.zip index 7b2be4e..a10950a 100644 Binary files a/gitinspector/html/flot.zip and b/gitinspector/html/flot.zip differ diff --git a/gitinspector/html/html.header b/gitinspector/html/html.header index 5d7240e..e3e1782 100644 --- a/gitinspector/html/html.header +++ b/gitinspector/html/html.header @@ -86,15 +86,19 @@ }}).each(function() {{ $(this).addClass("hoverable"); this.innerHTML = "{show_minor_authors} (" + this.hiddenCount + ") ∨"; - }}).toggle(function() {{ - this.innerHTML = "{hide_minor_authors} (" + this.hiddenCount + ") ∧"; - $(this).parent().parent().parent().find("tbody tr").show().each(colorRows); - }}, function() {{ - 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(); - $("table.git tbody tr:visible").each(colorRows); + }}).click(function() {{ + this.clicked = !this.clicked; + + if (this.clicked) {{ + this.innerHTML = "{hide_minor_authors} (" + this.hiddenCount + ") ∧"; + $(this).parent().parent().parent().find("tbody tr").show().each(colorRows); + }} else {{ + 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(); + $("table.git tbody tr:visible").each(colorRows); + }} }}); filterResponsibilities(); @@ -103,12 +107,15 @@ $("div#responsibilities div h3:visible").each(colorRows); $("div#responsibilities").prepend("
{show_minor_authors} (" + hiddenResponsibilitiesCount + ") ∨
"); - $("div#responsibilities div.button").toggle(function() {{ - this.innerHTML = "{hide_minor_authors} (" + hiddenResponsibilitiesCount + ") ∧"; - $("div#responsibilities div").show(); - }}, function() {{ - this.innerHTML = "{show_minor_authors} (" + hiddenResponsibilitiesCount + ") ∨"; - filterResponsibilities(); + $("div#responsibilities div.button").click(function() {{ + this.clicked = !this.clicked; + if (this.clicked) {{ + this.innerHTML = "{hide_minor_authors} (" + hiddenResponsibilitiesCount + ") ∧"; + $("div#responsibilities div").show(); + }} else {{ + this.innerHTML = "{show_minor_authors} (" + hiddenResponsibilitiesCount + ") ∨"; + filterResponsibilities(); + }} }}); }} @@ -119,13 +126,16 @@ $("div#timeline table.git tbody tr:visible").each(colorRows); $("div#timeline").prepend("
{show_minor_rows} (" + hiddenTimelineCount + ") ∨
"); - $("div#timeline div.button").toggle(function() {{ - this.innerHTML = "{hide_minor_rows} (" + hiddenTimelineCount + ") ∧"; - $("div#timeline table.git tbody tr").show().each(colorRows); - }}, function() {{ - this.innerHTML = "{show_minor_rows} (" + hiddenTimelineCount + ") ∨"; - filterTimeLine(); - $("div#timeline table.git tbody tr:visible").each(colorRows); + $("div#timeline div.button").click(function() {{ + this.clicked = !this.clicked; + if (this.clicked) {{ + this.innerHTML = "{hide_minor_rows} (" + hiddenTimelineCount + ") ∧"; + $("div#timeline table.git tbody tr").show().each(colorRows); + }} else {{ + this.innerHTML = "{show_minor_rows} (" + hiddenTimelineCount + ") ∨"; + filterTimeLine(); + $("div#timeline table.git tbody tr:visible").each(colorRows); + }} }}); }}