summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2012-04-28 17:18:39 -0400
committerNed Batchelder <ned@nedbatchelder.com>2012-04-28 17:18:39 -0400
commit8be223fd898a085469cb773c4d13e05e64892a7b (patch)
treec791c970a2bcd5ab7126a2b275388494de49dec7
parent6f9c5ec42c5ceb73fabd28cb27e5afb4894a463c (diff)
downloadpython-coveragepy-8be223fd898a085469cb773c4d13e05e64892a7b.tar.gz
Keep all the Javascript in the .js files.
-rw-r--r--coverage/htmlfiles/coverage_html.js5
-rw-r--r--coverage/htmlfiles/pyfile.html8
2 files changed, 9 insertions, 4 deletions
diff --git a/coverage/htmlfiles/coverage_html.js b/coverage/htmlfiles/coverage_html.js
index da3e22c..5906e65 100644
--- a/coverage/htmlfiles/coverage_html.js
+++ b/coverage/htmlfiles/coverage_html.js
@@ -122,6 +122,11 @@ coverage.pyfile_ready = function ($) {
.bind('keydown', '1', coverage.to_first_chunk)
;
+ $(".button_toggle_run").click(function (evt) {coverage.toggle_lines(evt.target, "run");});
+ $(".button_toggle_exc").click(function (evt) {coverage.toggle_lines(evt.target, "exc");});
+ $(".button_toggle_mis").click(function (evt) {coverage.toggle_lines(evt.target, "mis");});
+ $(".button_toggle_par").click(function (evt) {coverage.toggle_lines(evt.target, "par");});
+
coverage.assign_shortkeys();
coverage.wire_up_help_panel();
};
diff --git a/coverage/htmlfiles/pyfile.html b/coverage/htmlfiles/pyfile.html
index 434edfd..2d3d8a3 100644
--- a/coverage/htmlfiles/pyfile.html
+++ b/coverage/htmlfiles/pyfile.html
@@ -28,11 +28,11 @@
<img id='keyboard_icon' src='keybd_closed.png'>
<h2 class='stats'>
{{nums.n_statements}} statements
- <span class='{{c_run}} shortkey_r' onclick='coverage.toggle_lines(this, "run")'>{{nums.n_executed}} run</span>
- <span class='{{c_mis}} shortkey_m' onclick='coverage.toggle_lines(this, "mis")'>{{nums.n_missing}} missing</span>
- <span class='{{c_exc}} shortkey_x' onclick='coverage.toggle_lines(this, "exc")'>{{nums.n_excluded}} excluded</span>
+ <span class='{{c_run}} shortkey_r button_toggle_run'>{{nums.n_executed}} run</span>
+ <span class='{{c_mis}} shortkey_m button_toggle_mis'>{{nums.n_missing}} missing</span>
+ <span class='{{c_exc}} shortkey_x button_toggle_exc'>{{nums.n_excluded}} excluded</span>
{% if arcs %}
- <span class='{{c_par}} shortkey_p' onclick='coverage.toggle_lines(this, "par")'>{{n_par}} partial</span>
+ <span class='{{c_par}} shortkey_p button_toggle_par'>{{n_par}} partial</span>
{% endif %}
</h2>
</div>