summaryrefslogtreecommitdiff
path: root/coverage/htmlfiles
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2011-06-05 10:22:09 -0400
committerNed Batchelder <ned@nedbatchelder.com>2011-06-05 10:22:09 -0400
commite142563737bf23b8ef5478317ac6ea2722dd7e91 (patch)
tree2b78dd0f1518636518b750b96a1b5c97b1dbfc9c /coverage/htmlfiles
parent762cbb49e371d22b8925eebb733b2cec78dbd29d (diff)
downloadpython-coveragepy-git-e142563737bf23b8ef5478317ac6ea2722dd7e91.tar.gz
Add a keyboard help panel to the index page.
Diffstat (limited to 'coverage/htmlfiles')
-rw-r--r--coverage/htmlfiles/coverage_html.js1
-rw-r--r--coverage/htmlfiles/index.html19
-rw-r--r--coverage/htmlfiles/style.css7
3 files changed, 27 insertions, 0 deletions
diff --git a/coverage/htmlfiles/coverage_html.js b/coverage/htmlfiles/coverage_html.js
index e95a9efa..e9af5ffd 100644
--- a/coverage/htmlfiles/coverage_html.js
+++ b/coverage/htmlfiles/coverage_html.js
@@ -95,6 +95,7 @@ coverage.index_ready = function ($) {
});
coverage.assign_shortkeys();
+ coverage.wire_up_help_panel();
// Watch for page unload events so we can save the final sort settings:
$(window).unload(function () {
diff --git a/coverage/htmlfiles/index.html b/coverage/htmlfiles/index.html
index fb37d401..16f55180 100644
--- a/coverage/htmlfiles/index.html
+++ b/coverage/htmlfiles/index.html
@@ -19,6 +19,25 @@
<h1>Coverage report:
<span class='pc_cov'>{{totals.pc_covered_str}}%</span>
</h1>
+ <img id='keyboard_icon' src='keybd_closed.png'>
+ </div>
+</div>
+
+<div class='help_panel'>
+ <img id='panel_icon' src='keybd_open.png'>
+ <p class='legend'>Hot-keys on this page</p>
+ <div>
+ <p class='keyhelp'>
+ <span class='key'>n</span>
+ <span class='key'>s</span>
+ <span class='key'>m</span>
+ <span class='key'>x</span>
+ {% if arcs %}
+ <span class='key'>b</span>
+ <span class='key'>p</span>
+ {% endif %}
+ <span class='key'>c</span> &nbsp; change column sorting
+ </p>
</div>
</div>
diff --git a/coverage/htmlfiles/style.css b/coverage/htmlfiles/style.css
index 852994d9..c40357b8 100644
--- a/coverage/htmlfiles/style.css
+++ b/coverage/htmlfiles/style.css
@@ -114,6 +114,13 @@ h2.stats {
padding: .5em;
border: 1px solid #883;
display: none;
+}
+
+#indexfile .help_panel {
+ width: 20em; height: 4em;
+}
+
+#pyfile .help_panel {
width: 16em; height: 8em;
}