diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2010-03-14 09:30:43 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2010-03-14 09:30:43 -0400 |
commit | 4e95c554e52b4a468dbfd4c493f60932ecb4e102 (patch) | |
tree | 7ba0a30178a84ee7eaa3c0cd816643d3664a82fb /coverage/htmlfiles | |
parent | 6c42c429cbda623681c7db28f7943ad3c458a989 (diff) | |
parent | 1bde001d3be2814c3e49d1927b22f2d15193b1d9 (diff) | |
download | python-coveragepy-git-4e95c554e52b4a468dbfd4c493f60932ecb4e102.tar.gz |
Automated merge with ssh://hg@bitbucket.org/ned/coveragepy/
Diffstat (limited to 'coverage/htmlfiles')
-rw-r--r-- | coverage/htmlfiles/coverage_html.js | 8 | ||||
-rw-r--r-- | coverage/htmlfiles/pyfile.html | 10 | ||||
-rw-r--r-- | coverage/htmlfiles/style.css | 16 |
3 files changed, 30 insertions, 4 deletions
diff --git a/coverage/htmlfiles/coverage_html.js b/coverage/htmlfiles/coverage_html.js index 2acba5c2..b6bde6ca 100644 --- a/coverage/htmlfiles/coverage_html.js +++ b/coverage/htmlfiles/coverage_html.js @@ -65,6 +65,14 @@ 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) { btn = $(btn); var hide = "hide_"+cls; diff --git a/coverage/htmlfiles/pyfile.html b/coverage/htmlfiles/pyfile.html index 209887b7..4aa4309f 100644 --- a/coverage/htmlfiles/pyfile.html +++ b/coverage/htmlfiles/pyfile.html @@ -1,11 +1,17 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> +<!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'> + {# IE8 rounds line-height incorrectly, and adding this emulateIE7 line makes it right! #} + {# http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/thread/7684445e-f080-4d8f-8529-132763348e21 #} + <meta http-equiv='X-UA-Compatible' content='IE=emulateIE7' /> <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> + <script type='text/javascript' charset='utf-8'> + jQuery(document).ready(pyfile_ready); + </script> </head> <body> @@ -31,7 +37,7 @@ <tr> <td class='linenos' valign='top'> {% for line in lines %} - <p id='n{{line.number}}' class='{{line.class}}'>{{line.number}}</p> + <p id='n{{line.number}}' class='{{line.class}}'><a href='#n{{line.number}}'>{{line.number}}</a></p> {% endfor %} </td> <td class='text' valign='top'> diff --git a/coverage/htmlfiles/style.css b/coverage/htmlfiles/style.css index 25e7d115..a9ab5358 100644 --- a/coverage/htmlfiles/style.css +++ b/coverage/htmlfiles/style.css @@ -5,8 +5,8 @@ html, body, h1, h2, h3, p, td, th { padding: 0; border: 0; outline: 0; - font-weight: inherit; - font-style: inherit; + font-weight: normal; + font-style: normal; font-size: 100%; font-family: inherit; vertical-align: baseline; @@ -108,6 +108,18 @@ h2.stats { font-size: .625em; /* 10/16 */ line-height: 1.6em; /* 16/10 */ } +.linenos p.highlight { + background: #ffdd00; + } +.linenos p a { + text-decoration: none; + color: #999999; + } +.linenos p a:hover { + text-decoration: underline; + color: #999999; + } + td.text { width: 100%; } |