diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2010-09-19 16:42:27 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2010-09-19 16:42:27 -0400 |
commit | 0154a470b866ea7c1475c8afb094e4ccd8892ae1 (patch) | |
tree | c7c42b46954c6324fc7875dfcbc4f3f60f9c8e19 /doc/sample_html/coverage_html.js | |
parent | 46abc572dd752d8d79010721e30c3ad47067ab89 (diff) | |
download | python-coveragepy-git-0154a470b866ea7c1475c8afb094e4ccd8892ae1.tar.gz |
Latest sample html output for the site.coverage-3.4
Diffstat (limited to 'doc/sample_html/coverage_html.js')
-rw-r--r-- | doc/sample_html/coverage_html.js | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/doc/sample_html/coverage_html.js b/doc/sample_html/coverage_html.js index b70712c4..5219e36b 100644 --- a/doc/sample_html/coverage_html.js +++ b/doc/sample_html/coverage_html.js @@ -1,7 +1,7 @@ // Coverage.py HTML report browser code. // Loaded on index.html -function index_page_ready($) { +function index_ready($) { // Look for a cookie containing previous sort settings: sort_list = []; cookie_name = "COVERAGE_INDEX_SORT"; @@ -29,7 +29,7 @@ function index_page_ready($) { if (table.config.sortList.length == 0 && sort_list.length > 0) { // This table hasn't been sorted before - we'll use // our stored settings: - jQuery(table).trigger('sorton', [sort_list]); + $(table).trigger('sorton', [sort_list]); } else { // This is not the first load - something has @@ -43,7 +43,7 @@ function index_page_ready($) { // Configure our tablesorter to handle the variable number of // columns produced depending on report options: var headers = {}; - var col_count = jQuery("table.index > thead > tr > th").length; + var col_count = $("table.index > thead > tr > th").length; headers[0] = { sorter: 'text' }; for (var i = 1; i < col_count-1; i++) { @@ -65,8 +65,16 @@ function index_page_ready($) { // -- pyfile stuff -- +function pyfile_ready($) { + // If we're directed to a particular line number, highlight the line. + var frag = location.hash; + if (frag.length > 2 && frag[1] == 'n') { + $(frag).addClass('highlight'); + } +} + function toggle_lines(btn, cls) { - var btn = $(btn); + btn = $(btn); var hide = "hide_"+cls; if (btn.hasClass(hide)) { $("#source ."+cls).removeClass(hide); |