diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-12-06 19:59:39 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-12-06 19:59:39 -0500 |
commit | bc7705468cd21b95de431f539ba668c6467d4a5a (patch) | |
tree | 3c8ec520b7455d45319629783eeae3ef1fc411fc /coverage/htmlfiles | |
parent | a6212c713f44ee9e7c13cac1ce725c99b28cf938 (diff) | |
download | python-coveragepy-git-bc7705468cd21b95de431f539ba668c6467d4a5a.tar.gz |
Make the two html templates more similar in style.
Diffstat (limited to 'coverage/htmlfiles')
-rw-r--r-- | coverage/htmlfiles/coverage_html.js | 15 | ||||
-rw-r--r-- | coverage/htmlfiles/index.html | 149 | ||||
-rw-r--r-- | coverage/htmlfiles/pyfile.html | 52 |
3 files changed, 110 insertions, 106 deletions
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 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
- <head>
- <meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
- <title>Coverage report</title>
- <link rel='stylesheet' href='style.css' type='text/css'>
- <script type='text/javascript' src='jquery-1.3.2.min.js'></script>
- <script type='text/javascript' src='jquery.tablesorter.min.js'></script>
- <script type='text/javascript' src='coverage_html.js'></script>
- <script type="text/javascript" charset="utf-8">
- jQuery(document).ready(index_page_ready);
- </script>
- </head>
- <body>
+<head>
+ <meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
+ <title>Coverage report</title>
+ <link rel='stylesheet' href='style.css' type='text/css'>
+ <script type='text/javascript' src='jquery-1.3.2.min.js'></script>
+ <script type='text/javascript' src='jquery.tablesorter.min.js'></script>
+ <script type='text/javascript' src='coverage_html.js'></script>
+ <script type="text/javascript" charset="utf-8">
+ jQuery(document).ready(index_page_ready);
+ </script>
+</head>
+<body>
- <div id='header'>
- <div class='content'>
- <h1>Coverage report:
- <span class='pc_cov'>{{totals.pc_covered|format_pct}}%</span>
- </h1>
- </div>
- </div>
+<div id='header'>
+ <div class='content'>
+ <h1>Coverage report:
+ <span class='pc_cov'>{{totals.pc_covered|format_pct}}%</span>
+ </h1>
+ </div>
+</div>
- <div id='index'>
- <table class='index'>
- <thead>
- {# The title='' attr doesn't work in Safari. #}
- <tr class='tablehead' title='Click to sort'>
- <th class='name left headerSortDown'>Module</th>
- <th>statements</th>
- <th>run</th>
- <th>excluded</th>
- {% if arcs %}
- <th>branches</th>
- <th>br exec</th>
- {% endif %}
- <th class='right'>coverage</th>
- </tr>
- </thead>
- {# HTML syntax requires thead, tfoot, tbody #}
- <tfoot>
- <tr class='total'>
- <td class='name left'>Total</td>
- <td>{{totals.n_statements}}</td>
- <td>{{totals.n_executed}}</td>
- <td>{{totals.n_excluded}}</td>
- {% if arcs %}
- <td>{{totals.n_branches}}</td>
- <td>{{totals.n_executed_branches}}</td>
- {% endif %}
- <td class='right'>{{totals.pc_covered|format_pct}}%</td>
- </tr>
- </tfoot>
- <tbody>
- {% for file in files %}
- <tr class='file'>
- <td class='name left'><a href='{{file.html_filename}}'>{{file.cu.name}}</a></td>
- <td>{{file.nums.n_statements}}</td>
- <td>{{file.nums.n_executed}}</td>
- <td>{{file.nums.n_excluded}}</td>
- {% if arcs %}
- <td>{{file.nums.n_branches}}</td>
- <td>{{file.nums.n_executed_branches}}</td>
- {% endif %}
- <td class='right'>{{file.nums.pc_covered|format_pct}}%</td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- </div>
+<div id='index'>
+ <table class='index'>
+ <thead>
+ {# The title='' attr doesn't work in Safari. #}
+ <tr class='tablehead' title='Click to sort'>
+ <th class='name left headerSortDown'>Module</th>
+ <th>statements</th>
+ <th>run</th>
+ <th>excluded</th>
+ {% if arcs %}
+ <th>branches</th>
+ <th>br exec</th>
+ {% endif %}
+ <th class='right'>coverage</th>
+ </tr>
+ </thead>
+ {# HTML syntax requires thead, tfoot, tbody #}
+ <tfoot>
+ <tr class='total'>
+ <td class='name left'>Total</td>
+ <td>{{totals.n_statements}}</td>
+ <td>{{totals.n_executed}}</td>
+ <td>{{totals.n_excluded}}</td>
+ {% if arcs %}
+ <td>{{totals.n_branches}}</td>
+ <td>{{totals.n_executed_branches}}</td>
+ {% endif %}
+ <td class='right'>{{totals.pc_covered|format_pct}}%</td>
+ </tr>
+ </tfoot>
+ <tbody>
+ {% for file in files %}
+ <tr class='file'>
+ <td class='name left'><a href='{{file.html_filename}}'>{{file.cu.name}}</a></td>
+ <td>{{file.nums.n_statements}}</td>
+ <td>{{file.nums.n_executed}}</td>
+ <td>{{file.nums.n_excluded}}</td>
+ {% if arcs %}
+ <td>{{file.nums.n_branches}}</td>
+ <td>{{file.nums.n_executed_branches}}</td>
+ {% endif %}
+ <td class='right'>{{file.nums.pc_covered|format_pct}}%</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+</div>
- <div id='footer'>
- <div class='content'>
- <p>
- <a class='nav' href='{{__url__}}'>coverage.py v{{__version__}}</a>
- </p>
- </div>
- </div>
- </body>
+<div id='footer'>
+ <div class='content'>
+ <p>
+ <a class='nav' href='{{__url__}}'>coverage.py v{{__version__}}</a>
+ </p>
+ </div>
+</div>
+
+</body>
</html>
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 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
-<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
-<title>Coverage for {{cu.name|escape}}: {{nums.pc_covered|format_pct}}%</title>
-<link rel='stylesheet' href='style.css' type='text/css'>
-<script type='text/javascript' src='jquery-1.3.2.min.js'></script>
-<script type='text/javascript'>
-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);
- }
-}
-</script>
+ <meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
+ <title>Coverage for {{cu.name|escape}}: {{nums.pc_covered|format_pct}}%</title>
+ <link rel='stylesheet' href='style.css' type='text/css'>
+ <script type='text/javascript' src='jquery-1.3.2.min.js'></script>
+ <script type='text/javascript' src='coverage_html.js'></script>
</head>
<body>
+
<div id='header'>
<div class='content'>
<h1>Coverage for <b>{{cu.name|escape}}</b> :
@@ -39,20 +27,20 @@ function toggle_lines(btn, cls) { </div>
<div id='source'>
-<table cellspacing='0' cellpadding='0'>
-<tr>
-<td class='linenos' valign='top'>
- {% for line in lines %}
- <p id='n{{line.number}}' class='{{line.class}}'>{{line.number}}</p>
- {% endfor %}
-</td>
-<td class='text' valign='top'>
- {% for line in lines %}
- <p id='t{{line.number}}' class='{{line.class}}'>{% if line.annotate %}<span class='annotate' title='{{line.annotate_title}}'>{{line.annotate}}</span>{% endif %}{{line.html}}<span class='strut'> </span></p>
- {% endfor %}
-</td>
-</tr>
-</table>
+ <table cellspacing='0' cellpadding='0'>
+ <tr>
+ <td class='linenos' valign='top'>
+ {% for line in lines %}
+ <p id='n{{line.number}}' class='{{line.class}}'>{{line.number}}</p>
+ {% endfor %}
+ </td>
+ <td class='text' valign='top'>
+ {% for line in lines %}
+ <p id='t{{line.number}}' class='{{line.class}}'>{% if line.annotate %}<span class='annotate' title='{{line.annotate_title}}'>{{line.annotate}}</span>{% endif %}{{line.html}}<span class='strut'> </span></p>
+ {% endfor %}
+ </td>
+ </tr>
+ </table>
</div>
</body>
|