Upgraded the JQuery version in the flot archive to 1.9.1 (#28).

This is the minimal version required by Bootstrap3 (which we will
base the new responsive HTML theme on). This upgrade required changes
to the JavaScript code, as toggle(...) has been deprecated since
version 1.9.x of JQuery.
This commit is contained in:
Adam Waldenberg 2015-11-03 04:25:40 +01:00
parent 4fd918fca4
commit 87fd5b467f
3 changed files with 33 additions and 23 deletions

View file

@ -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,

Binary file not shown.

View file

@ -86,15 +86,19 @@
}}).each(function() {{
$(this).addClass("hoverable");
this.innerHTML = "{show_minor_authors} (" + this.hiddenCount + ") ∨";
}}).toggle(function() {{
}}).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);
}}, function() {{
}} 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("<div class=\"button\">{show_minor_authors} (" + hiddenResponsibilitiesCount + ") &or;</div>");
$("div#responsibilities div.button").toggle(function() {{
$("div#responsibilities div.button").click(function() {{
this.clicked = !this.clicked;
if (this.clicked) {{
this.innerHTML = "{hide_minor_authors} (" + hiddenResponsibilitiesCount + ") &and;";
$("div#responsibilities div").show();
}}, function() {{
}} else {{
this.innerHTML = "{show_minor_authors} (" + hiddenResponsibilitiesCount + ") &or;";
filterResponsibilities();
}}
}});
}}
@ -119,13 +126,16 @@
$("div#timeline table.git tbody tr:visible").each(colorRows);
$("div#timeline").prepend("<div class=\"button\">{show_minor_rows} (" + hiddenTimelineCount + ") &or;</div>");
$("div#timeline div.button").toggle(function() {{
$("div#timeline div.button").click(function() {{
this.clicked = !this.clicked;
if (this.clicked) {{
this.innerHTML = "{hide_minor_rows} (" + hiddenTimelineCount + ") &and;";
$("div#timeline table.git tbody tr").show().each(colorRows);
}}, function() {{
}} else {{
this.innerHTML = "{show_minor_rows} (" + hiddenTimelineCount + ") &or;";
filterTimeLine();
$("div#timeline table.git tbody tr:visible").each(colorRows);
}}
}});
}}