diff options
author | Septatrix <24257556+Septatrix@users.noreply.github.com> | 2021-03-27 13:55:36 +0100 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-10-23 08:15:29 -0400 |
commit | 9a1954a224c7c0f578513d8f4ca5f821fcf2cf5a (patch) | |
tree | 7425ab8502f25930ed54463dbce1e7db7a821e8c /coverage/htmlfiles/pyfile.html | |
parent | 5da82cc579a69b5a53f9c15dfce28e37917d1579 (diff) | |
download | python-coveragepy-git-9a1954a224c7c0f578513d8f4ca5f821fcf2cf5a.tar.gz |
refactor(html): remove all uses of jQuery, only vanilla JS now
This is squashed from pull request #1248
Diffstat (limited to 'coverage/htmlfiles/pyfile.html')
-rw-r--r-- | coverage/htmlfiles/pyfile.html | 76 |
1 files changed, 40 insertions, 36 deletions
diff --git a/coverage/htmlfiles/pyfile.html b/coverage/htmlfiles/pyfile.html index 54e21708..523f8483 100644 --- a/coverage/htmlfiles/pyfile.html +++ b/coverage/htmlfiles/pyfile.html @@ -14,59 +14,63 @@ {% if extra_css %} <link rel="stylesheet" href="{{ extra_css }}" type="text/css"> {% endif %} - <script type="text/javascript" src="jquery.min.js"></script> - <script type="text/javascript" src="jquery.hotkeys.js"></script> - <script type="text/javascript" src="jquery.isonscreen.js"></script> - <script type="text/javascript" src="coverage_html.js"></script> - <script type="text/javascript"> - jQuery(document).ready(coverage.pyfile_ready); - </script> + <script type="text/javascript" src="coverage_html.js" defer></script> </head> <body class="pyfile"> <header> <div class="content"> <h1> - <span class="text">Coverage for </span><b>{{relative_filename|escape}}</b> : + <span class="text">Coverage for </span><b>{{relative_filename|escape}}</b>: <span class="pc_cov">{{nums.pc_covered_str}}%</span> </h1> - <img id="keyboard_icon" src="keybd_closed.png" alt="Show keyboard shortcuts" /> + <div id="help_panel_wrapper"> + <input id="help_panel_state" type="checkbox"> + <label for="help_panel_state"> + <img id="keyboard_icon" src="keybd_closed.png" alt="Show/hide keyboard shortcuts" /> + </label> + <div id="help_panel"> + <p class="legend">Shortcuts on this page</p> + <div> + <p class="keyhelp"> + <kbd>r</kbd> + <kbd>m</kbd> + <kbd>x</kbd> + <kbd>p</kbd> toggle line displays + </p> + <p class="keyhelp"> + <kbd>j</kbd> + <kbd>k</kbd> next/prev highlighted chunk + </p> + <p class="keyhelp"> + <kbd>0</kbd> (zero) top of page + </p> + <p class="keyhelp"> + <kbd>1</kbd> (one) first highlighted chunk + </p> + </div> + </div> + </div> <h2> <span class="text">{{nums.n_statements}} statements </span> - <button type="button" class="{{category.run}} shortkey_r button_toggle_run" title="Toggle lines run">{{nums.n_executed}}<span class="text"> run</span></button> - <button type="button" class="{{category.mis}} shortkey_m button_toggle_mis" title="Toggle lines missing">{{nums.n_missing}}<span class="text"> missing</span></button> - <button type="button" class="{{category.exc}} shortkey_x button_toggle_exc" title="Toggle lines excluded">{{nums.n_excluded}}<span class="text"> excluded</span></button> + <button type="button" class="{{category.run}} button_toggle_run" value="run" data-shortcut="r" title="Toggle lines run">{{nums.n_executed}}<span class="text"> run</span></button> + <button type="button" class="{{category.mis}} button_toggle_mis" value="mis" data-shortcut="m" title="Toggle lines missing">{{nums.n_missing}}<span class="text"> missing</span></button> + <button type="button" class="{{category.exc}} button_toggle_exc" value="exc" data-shortcut="x" title="Toggle lines excluded">{{nums.n_excluded}}<span class="text"> excluded</span></button> {% if has_arcs %} - <button type="button" class="{{category.par}} shortkey_p button_toggle_par" title="Toggle lines partially run">{{nums.n_partial_branches}}<span class="text"> partial</span></button> + <button type="button" class="{{category.par}} button_toggle_par" value="par" data-shortcut="p" title="Toggle lines partially run">{{nums.n_partial_branches}}<span class="text"> partial</span></button> {% endif %} </h2> - </div> -</header> -<aside class="help_panel"> - <img id="panel_icon" src="keybd_open.png" alt="Hide keyboard shortcuts" /> - <p class="legend">Hot-keys on this page</p> - <div> - <p class="keyhelp"> - <span class="key">r</span> - <span class="key">m</span> - <span class="key">x</span> - <span class="key">p</span> toggle line displays - </p> - <p class="keyhelp"> - <span class="key">j</span> - <span class="key">k</span> next/prev highlighted chunk - </p> - <p class="keyhelp"> - <span class="key">0</span> (zero) top of page - </p> - <p class="keyhelp"> - <span class="key">1</span> (one) first highlighted chunk - </p> + <div style="display: none;"> + <button type="button" class="button_next_chunk" data-shortcut="j">Next highlighted chunk</button> + <button type="button" class="button_prev_chunk" data-shortcut="k">Previous highlighted chunk</button> + <button type="button" class="button_top_of_page" data-shortcut="0">Goto top of page</button> + <button type="button" class="button_first_chunk" data-shortcut="1">Goto first highlighted chunk</button> + </div> </div> -</aside> +</header> <main id="source"> {% for line in lines -%} |