From bc7705468cd21b95de431f539ba668c6467d4a5a Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 6 Dec 2009 19:59:39 -0500 Subject: Make the two html templates more similar in style. --- coverage/htmlfiles/coverage_html.js | 15 ++++ coverage/htmlfiles/index.html | 149 ++++++++++++++++++------------------ coverage/htmlfiles/pyfile.html | 52 +++++-------- 3 files changed, 110 insertions(+), 106 deletions(-) (limited to 'coverage/htmlfiles') diff --git a/coverage/htmlfiles/coverage_html.js b/coverage/htmlfiles/coverage_html.js index c0abab81..faea61af 100644 --- a/coverage/htmlfiles/coverage_html.js +++ b/coverage/htmlfiles/coverage_html.js @@ -62,3 +62,18 @@ function index_page_ready($) { document.cookie = cookie_name + "=" + sort_list.toString() + "; path=/" }); } + +// -- pyfile stuff -- + +function toggle_lines(btn, cls) { + var btn = $(btn); + var hide = "hide_"+cls; + if (btn.hasClass(hide)) { + $("#source ."+cls).removeClass(hide); + btn.removeClass(hide); + } + else { + $("#source ."+cls).addClass(hide); + btn.addClass(hide); + } +} diff --git a/coverage/htmlfiles/index.html b/coverage/htmlfiles/index.html index 0f387644..e5b2534e 100644 --- a/coverage/htmlfiles/index.html +++ b/coverage/htmlfiles/index.html @@ -1,80 +1,81 @@ - - - Coverage report - - - - - - - + + + Coverage report + + + + + + + - + -
- - - {# The title='' attr doesn't work in Safari. #} - - - - - - {% if arcs %} - - - {% endif %} - - - - {# HTML syntax requires thead, tfoot, tbody #} - - - - - - - {% if arcs %} - - - {% endif %} - - - - - {% for file in files %} - - - - - - {% if arcs %} - - - {% endif %} - - - {% endfor %} - -
Modulestatementsrunexcludedbranchesbr execcoverage
Total{{totals.n_statements}}{{totals.n_executed}}{{totals.n_excluded}}{{totals.n_branches}}{{totals.n_executed_branches}}{{totals.pc_covered|format_pct}}%
{{file.cu.name}}{{file.nums.n_statements}}{{file.nums.n_executed}}{{file.nums.n_excluded}}{{file.nums.n_branches}}{{file.nums.n_executed_branches}}{{file.nums.pc_covered|format_pct}}%
-
+
+ + + {# The title='' attr doesn't work in Safari. #} + + + + + + {% if arcs %} + + + {% endif %} + + + + {# HTML syntax requires thead, tfoot, tbody #} + + + + + + + {% if arcs %} + + + {% endif %} + + + + + {% for file in files %} + + + + + + {% if arcs %} + + + {% endif %} + + + {% endfor %} + +
Modulestatementsrunexcludedbranchesbr execcoverage
Total{{totals.n_statements}}{{totals.n_executed}}{{totals.n_excluded}}{{totals.n_branches}}{{totals.n_executed_branches}}{{totals.pc_covered|format_pct}}%
{{file.cu.name}}{{file.nums.n_statements}}{{file.nums.n_executed}}{{file.nums.n_excluded}}{{file.nums.n_branches}}{{file.nums.n_executed_branches}}{{file.nums.pc_covered|format_pct}}%
+
- - + + + diff --git a/coverage/htmlfiles/pyfile.html b/coverage/htmlfiles/pyfile.html index 0e95db10..2afc9759 100644 --- a/coverage/htmlfiles/pyfile.html +++ b/coverage/htmlfiles/pyfile.html @@ -1,26 +1,14 @@ - -Coverage for {{cu.name|escape}}: {{nums.pc_covered|format_pct}}% - - - + + Coverage for {{cu.name|escape}}: {{nums.pc_covered|format_pct}}% + + + +