Slightly moved HTML changes & blame minor authors buttons (#28).

These are now placed above the horizontal ruler of each section instead
of the previous positioning.
This commit is contained in:
Adam Waldenberg 2015-12-25 04:39:32 +01:00
parent db03f37c94
commit 0f52711218
3 changed files with 9 additions and 8 deletions

View file

@ -61,7 +61,7 @@
$(this).append("<strong> &#x25bc;</strong>");
}});
$("table#changes, table#blame").closest("div.box").find("div > button").filter(function() {{
$("table#changes, table#blame").closest("div.box").find("button").filter(function() {{
this.hiddenCount = $(this).parent().find("tbody tr:hidden").length;
return this.hiddenCount > 0;
}}).each(function() {{
@ -207,6 +207,7 @@
-moz-border-radius: 10px;
box-shadow: 1px 1px 3px #666;
-moz-box-shadow: 1px 1px 3px #666;
text-align: center
}}
div.box div {{
text-align: center;
@ -272,7 +273,7 @@
color: rgb(51, 51, 51);
background-color: #e7b7a5;
border-color: #e2b2a0;
margin-bottom: 20px;
margin-top: 10px;
padding: 10px 25px 10px 15px;
text-align: center;
}}

View file

@ -41,11 +41,11 @@ class BlameOutput(Outputable):
def output_html(self):
blame_xml = "<div><div class=\"box\">"
blame_xml += "<h1>" + _(BLAME_INFO_TEXT) + "</h1><hr /><div>"
blame_xml += "<h1>" + _(BLAME_INFO_TEXT) + "</h1>"
blame_xml += "<button type=\"button\" class=\"btn btn-primary\""
blame_xml += " data-toggle=\"button\" aria-pressed=\"false\" autocomplete=\"off\" disabled>"
blame_xml += " <span>&#x2713;</span> " + _("Show minor authors")
blame_xml += "</button>"
blame_xml += "</button><hr />"
blame_xml += "<div class=\"row\"><div class=\"col-md-8\"><table id=\"blame\" class=\"table table-striped\">"
blame_xml += "<thead><tr> <th>{0}</th> <th>{1}</th> <th>{2}</th> <th>{3}</th> <th>{4}</th> </tr></thead>".format(
_("Author"), _("Rows"), _("Stability"), _("Age"), _("% in comments"))
@ -77,7 +77,7 @@ class BlameOutput(Outputable):
if blames[-1] != entry:
chart_data += ", "
blame_xml += "</tbody></table></div><div class=\"chart col-md-4\" id=\"blame_chart\"></div></div></div>"
blame_xml += "</tbody></table></div><div class=\"chart col-md-4\" id=\"blame_chart\"></div></div>"
blame_xml += "<script type=\"text/javascript\">"
blame_xml += " blame_plot = $.plot($(\"#blame_chart\"), [{0}], {{".format(chart_data)
blame_xml += " series: {"

View file

@ -44,11 +44,11 @@ class ChangesOutput(Outputable):
total_changes += authorinfo_list.get(i).deletions
if authorinfo_list:
changes_xml += "<h1>" + _(HISTORICAL_INFO_TEXT) + "</h1><hr /><div>"
changes_xml += "<h1>" + _(HISTORICAL_INFO_TEXT) + "</h1>"
changes_xml += "<button type=\"button\" class=\"btn btn-primary\""
changes_xml += " data-toggle=\"button\" aria-pressed=\"false\" autocomplete=\"off\" disabled>"
changes_xml += " <span>&#x2713;</span> " + _("Show minor authors")
changes_xml += "</button>"
changes_xml += "</button><hr />"
changes_xml += "<div class=\"row\"><div class=\"col-md-8\"><table id=\"changes\" class=\"table table-striped\">"
changes_xml += "<thead><tr> <th>{0}</th> <th>{1}</th> <th>{2}</th> <th>{3}</th> <th>{4}</th>".format(
_("Author"), _("Commits"), _("Insertions"), _("Deletions"), _("% of changes"))
@ -74,7 +74,7 @@ class ChangesOutput(Outputable):
if sorted(authorinfo_list)[-1] != entry:
chart_data += ", "
changes_xml += "</tbody></table></div><div class=\"chart col-md-4\" id=\"changes_chart\"></div></div></div>"
changes_xml += "</tbody></table></div><div class=\"chart col-md-4\" id=\"changes_chart\"></div></div>"
changes_xml += "<script type=\"text/javascript\">"
changes_xml += " changes_plot = $.plot($(\"#changes_chart\"), [{0}], {{".format(chart_data)
changes_xml += " series: {"