mirror of
https://github.com/ejwa/gitinspector.git
synced 2024-09-27 18:01:30 +02:00
Added hovering support to the pie charts in the HTML output.
The name of the author is now highlighted in the table whenever a pie piece in the pie chart is hovered over. Currently, it does not work the other way around (because of a limitation in the flot library).
This commit is contained in:
parent
6b2f26ed04
commit
2bfb3cfa67
@ -200,6 +200,8 @@ class BlameOutput(Outputable):
|
|||||||
blame_xml += " label: \"Minor Authors\""
|
blame_xml += " label: \"Minor Authors\""
|
||||||
blame_xml += " }"
|
blame_xml += " }"
|
||||||
blame_xml += " }"
|
blame_xml += " }"
|
||||||
|
blame_xml += " }, grid: {"
|
||||||
|
blame_xml += " hoverable: true"
|
||||||
blame_xml += " }"
|
blame_xml += " }"
|
||||||
blame_xml += " });"
|
blame_xml += " });"
|
||||||
blame_xml += "</script></div></div>"
|
blame_xml += "</script></div></div>"
|
||||||
|
@ -210,6 +210,8 @@ class ChangesOutput(Outputable):
|
|||||||
changes_xml += " label: \"Minor Authors\""
|
changes_xml += " label: \"Minor Authors\""
|
||||||
changes_xml += " }"
|
changes_xml += " }"
|
||||||
changes_xml += " }"
|
changes_xml += " }"
|
||||||
|
changes_xml += " }, grid: {"
|
||||||
|
changes_xml += " hoverable: true"
|
||||||
changes_xml += " }"
|
changes_xml += " }"
|
||||||
changes_xml += " });"
|
changes_xml += " });"
|
||||||
changes_xml += "</script>"
|
changes_xml += "</script>"
|
||||||
|
@ -94,6 +94,24 @@
|
|||||||
$("div#timeline table.git tbody tr:visible").each(colorRows);
|
$("div#timeline table.git tbody tr:visible").each(colorRows);
|
||||||
}});
|
}});
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
$("#blame_chart, #changes_chart").bind("plothover", function(event, pos, obj) {{
|
||||||
|
if (obj) {{
|
||||||
|
var selection = "table tbody tr td:contains(\"" + obj.series.label + "\")";
|
||||||
|
var element = $(this).parent().find(selection);
|
||||||
|
|
||||||
|
if (element) {{
|
||||||
|
if (this.hoveredElement && this.hoveredElement.html() != element.parent().html()) {{
|
||||||
|
this.hoveredElement.removeClass("piehover");
|
||||||
|
}}
|
||||||
|
|
||||||
|
element.parent().addClass("piehover");
|
||||||
|
this.hoveredElement = element.parent();
|
||||||
|
}}
|
||||||
|
}} else if (this.hoveredElement) {{
|
||||||
|
this.hoveredElement.removeClass("piehover");
|
||||||
|
}}
|
||||||
|
}});
|
||||||
}});
|
}});
|
||||||
</script>
|
</script>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
@ -176,6 +194,9 @@
|
|||||||
table.git tr.odd {{
|
table.git tr.odd {{
|
||||||
background-color: #dbdbdb;
|
background-color: #dbdbdb;
|
||||||
}}
|
}}
|
||||||
|
table.git tr.piehover {{
|
||||||
|
background-color: #dddece;
|
||||||
|
}}
|
||||||
div.chart {{
|
div.chart {{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 5px;
|
top: 5px;
|
||||||
|
Loading…
Reference in New Issue
Block a user