mirror of
https://github.com/ejwa/gitinspector.git
synced 2024-11-16 08:38:26 +01:00
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:
parent
4fd918fca4
commit
87fd5b467f
3 changed files with 33 additions and 23 deletions
|
@ -84,7 +84,7 @@ def output_header(repos):
|
||||||
if __selected_format__ == "htmlembedded":
|
if __selected_format__ == "htmlembedded":
|
||||||
jquery_js = ">" + __get_zip_file_content__("jquery.js")
|
jquery_js = ">" + __get_zip_file_content__("jquery.js")
|
||||||
else:
|
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),
|
print(html_header.format(title=_("Repository statistics for '{0}'").format(repos_string),
|
||||||
jquery=jquery_js,
|
jquery=jquery_js,
|
||||||
|
|
Binary file not shown.
|
@ -86,15 +86,19 @@
|
||||||
}}).each(function() {{
|
}}).each(function() {{
|
||||||
$(this).addClass("hoverable");
|
$(this).addClass("hoverable");
|
||||||
this.innerHTML = "{show_minor_authors} (" + this.hiddenCount + ") ∨";
|
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.innerHTML = "{hide_minor_authors} (" + this.hiddenCount + ") ∧";
|
||||||
$(this).parent().parent().parent().find("tbody tr").show().each(colorRows);
|
$(this).parent().parent().parent().find("tbody tr").show().each(colorRows);
|
||||||
}}, function() {{
|
}} else {{
|
||||||
this.innerHTML = "{show_minor_authors} (" + this.hiddenCount + ") ∨";
|
this.innerHTML = "{show_minor_authors} (" + this.hiddenCount + ") ∨";
|
||||||
$(this).parent().parent().parent().find("tbody tr td:last-child").filter(function() {{
|
$(this).parent().parent().parent().find("tbody tr td:last-child").filter(function() {{
|
||||||
return parseFloat(this.innerHTML) < MINOR_AUTHOR_PERCENTAGE;
|
return parseFloat(this.innerHTML) < MINOR_AUTHOR_PERCENTAGE;
|
||||||
}}).parent().hide();
|
}}).parent().hide();
|
||||||
$("table.git tbody tr:visible").each(colorRows);
|
$("table.git tbody tr:visible").each(colorRows);
|
||||||
|
}}
|
||||||
}});
|
}});
|
||||||
|
|
||||||
filterResponsibilities();
|
filterResponsibilities();
|
||||||
|
@ -103,12 +107,15 @@
|
||||||
$("div#responsibilities div h3:visible").each(colorRows);
|
$("div#responsibilities div h3:visible").each(colorRows);
|
||||||
$("div#responsibilities").prepend("<div class=\"button\">{show_minor_authors} (" + hiddenResponsibilitiesCount + ") ∨</div>");
|
$("div#responsibilities").prepend("<div class=\"button\">{show_minor_authors} (" + hiddenResponsibilitiesCount + ") ∨</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 + ") ∧";
|
this.innerHTML = "{hide_minor_authors} (" + hiddenResponsibilitiesCount + ") ∧";
|
||||||
$("div#responsibilities div").show();
|
$("div#responsibilities div").show();
|
||||||
}}, function() {{
|
}} else {{
|
||||||
this.innerHTML = "{show_minor_authors} (" + hiddenResponsibilitiesCount + ") ∨";
|
this.innerHTML = "{show_minor_authors} (" + hiddenResponsibilitiesCount + ") ∨";
|
||||||
filterResponsibilities();
|
filterResponsibilities();
|
||||||
|
}}
|
||||||
}});
|
}});
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
@ -119,13 +126,16 @@
|
||||||
$("div#timeline table.git tbody tr:visible").each(colorRows);
|
$("div#timeline table.git tbody tr:visible").each(colorRows);
|
||||||
$("div#timeline").prepend("<div class=\"button\">{show_minor_rows} (" + hiddenTimelineCount + ") ∨</div>");
|
$("div#timeline").prepend("<div class=\"button\">{show_minor_rows} (" + hiddenTimelineCount + ") ∨</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 + ") ∧";
|
this.innerHTML = "{hide_minor_rows} (" + hiddenTimelineCount + ") ∧";
|
||||||
$("div#timeline table.git tbody tr").show().each(colorRows);
|
$("div#timeline table.git tbody tr").show().each(colorRows);
|
||||||
}}, function() {{
|
}} else {{
|
||||||
this.innerHTML = "{show_minor_rows} (" + hiddenTimelineCount + ") ∨";
|
this.innerHTML = "{show_minor_rows} (" + hiddenTimelineCount + ") ∨";
|
||||||
filterTimeLine();
|
filterTimeLine();
|
||||||
$("div#timeline table.git tbody tr:visible").each(colorRows);
|
$("div#timeline table.git tbody tr:visible").each(colorRows);
|
||||||
|
}}
|
||||||
}});
|
}});
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue