summaryrefslogtreecommitdiff
path: root/coverage/htmlfiles
diff options
context:
space:
mode:
Diffstat (limited to 'coverage/htmlfiles')
-rw-r--r--coverage/htmlfiles/coverage_html.js9
-rw-r--r--coverage/htmlfiles/index.html2
-rw-r--r--coverage/htmlfiles/pyfile.html10
3 files changed, 12 insertions, 9 deletions
diff --git a/coverage/htmlfiles/coverage_html.js b/coverage/htmlfiles/coverage_html.js
index 5219e36b..f9ba3cf3 100644
--- a/coverage/htmlfiles/coverage_html.js
+++ b/coverage/htmlfiles/coverage_html.js
@@ -1,7 +1,9 @@
// Coverage.py HTML report browser code.
+coverage = {};
+
// Loaded on index.html
-function index_ready($) {
+coverage.index_ready = function($) {
// Look for a cookie containing previous sort settings:
sort_list = [];
cookie_name = "COVERAGE_INDEX_SORT";
@@ -65,7 +67,7 @@ function index_ready($) {
// -- pyfile stuff --
-function pyfile_ready($) {
+coverage.pyfile_ready = function($) {
// If we're directed to a particular line number, highlight the line.
var frag = location.hash;
if (frag.length > 2 && frag[1] == 'n') {
@@ -73,7 +75,7 @@ function pyfile_ready($) {
}
}
-function toggle_lines(btn, cls) {
+coverage.toggle_lines = function(btn, cls) {
btn = $(btn);
var hide = "hide_"+cls;
if (btn.hasClass(hide)) {
@@ -85,3 +87,4 @@ function toggle_lines(btn, cls) {
btn.addClass(hide);
}
}
+
diff --git a/coverage/htmlfiles/index.html b/coverage/htmlfiles/index.html
index bec2584f..c7ab6f59 100644
--- a/coverage/htmlfiles/index.html
+++ b/coverage/htmlfiles/index.html
@@ -8,7 +8,7 @@
<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_ready);
+ jQuery(document).ready(coverage.index_ready);
</script>
</head>
<body id='indexfile'>
diff --git a/coverage/htmlfiles/pyfile.html b/coverage/htmlfiles/pyfile.html
index 05b2b464..d126081c 100644
--- a/coverage/htmlfiles/pyfile.html
+++ b/coverage/htmlfiles/pyfile.html
@@ -10,7 +10,7 @@
<script type='text/javascript' src='jquery-1.3.2.min.js'></script>
<script type='text/javascript' src='coverage_html.js'></script>
<script type='text/javascript' charset='utf-8'>
- jQuery(document).ready(pyfile_ready);
+ jQuery(document).ready(coverage.pyfile_ready);
</script>
</head>
<body id='pyfile'>
@@ -22,11 +22,11 @@
</h1>
<h2 class='stats'>
{{nums.n_statements}} statements
- <span class='{{c_run}}' onclick='toggle_lines(this, "run")'>{{nums.n_executed}} run</span>
- <span class='{{c_mis}}' onclick='toggle_lines(this, "mis")'>{{nums.n_missing}} missing</span>
- <span class='{{c_exc}}' onclick='toggle_lines(this, "exc")'>{{nums.n_excluded}} excluded</span>
+ <span class='{{c_run}}' onclick='coverage.toggle_lines(this, "run")'>{{nums.n_executed}} run</span>
+ <span class='{{c_mis}}' onclick='coverage.toggle_lines(this, "mis")'>{{nums.n_missing}} missing</span>
+ <span class='{{c_exc}}' onclick='coverage.toggle_lines(this, "exc")'>{{nums.n_excluded}} excluded</span>
{% if arcs %}
- <span class='{{c_par}}' onclick='toggle_lines(this, "par")'>{{n_par}} partial</span>
+ <span class='{{c_par}}' onclick='coverage.toggle_lines(this, "par")'>{{n_par}} partial</span>
{% endif %}
</h2>
</div>