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/index.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/index.html')
-rw-r--r-- | coverage/htmlfiles/index.html | 93 |
1 files changed, 44 insertions, 49 deletions
diff --git a/coverage/htmlfiles/index.html b/coverage/htmlfiles/index.html index b5d2bcd1..e1d3e9b5 100644 --- a/coverage/htmlfiles/index.html +++ b/coverage/htmlfiles/index.html @@ -11,14 +11,7 @@ {% 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.ba-throttle-debounce.min.js"></script> - <script type="text/javascript" src="jquery.tablesorter.min.js"></script> - <script type="text/javascript" src="jquery.hotkeys.js"></script> - <script type="text/javascript" src="coverage_html.js"></script> - <script type="text/javascript"> - jQuery(document).ready(coverage.index_ready); - </script> + <script type="text/javascript" src="coverage_html.js" defer></script> </head> <body class="indexfile"> @@ -28,7 +21,28 @@ <span class="pc_cov">{{totals.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>n</kbd> + <kbd>s</kbd> + <kbd>m</kbd> + <kbd>x</kbd> + {% if has_arcs %} + <kbd>b</kbd> + <kbd>p</kbd> + {% endif %} + <kbd>c</kbd> change column sorting + </p> + </div> + </div> + </div> <form id="filter_container"> <input id="filter" type="text" value="" placeholder="filter..." /> @@ -36,54 +50,22 @@ </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">n</span> - <span class="key">s</span> - <span class="key">m</span> - <span class="key">x</span> - {% if has_arcs %} - <span class="key">b</span> - <span class="key">p</span> - {% endif %} - <span class="key">c</span> change column sorting - </p> - </div> -</aside> - <main id="index"> - <table class="index"> + <table class="index" data-sortable> <thead> {# The title="" attr doesn"t work in Safari. #} <tr class="tablehead" title="Click to sort"> - <th class="name left headerSortDown shortkey_n">Module</th> - <th class="shortkey_s">statements</th> - <th class="shortkey_m">missing</th> - <th class="shortkey_x">excluded</th> + <th class="name left" aria-sort="none" data-shortcut="n">Module</th> + <th aria-sort="none" data-default-sort-order="descending" data-shortcut="s">statements</th> + <th aria-sort="none" data-default-sort-order="descending" data-shortcut="m">missing</th> + <th aria-sort="none" data-default-sort-order="descending" data-shortcut="x">excluded</th> {% if has_arcs %} - <th class="shortkey_b">branches</th> - <th class="shortkey_p">partial</th> + <th aria-sort="none" data-default-sort-order="descending" data-shortcut="b">branches</th> + <th aria-sort="none" data-default-sort-order="descending" data-shortcut="p">partial</th> {% endif %} - <th class="right shortkey_c">coverage</th> + <th class="right" aria-sort="none" data-shortcut="c">coverage</th> </tr> </thead> - {# HTML syntax requires thead, tfoot, tbody #} - <tfoot> - <tr class="total"> - <td class="name left">Total</td> - <td>{{totals.n_statements}}</td> - <td>{{totals.n_missing}}</td> - <td>{{totals.n_excluded}}</td> - {% if has_arcs %} - <td>{{totals.n_branches}}</td> - <td>{{totals.n_partial_branches}}</td> - {% endif %} - <td class="right" data-ratio="{{totals.ratio_covered|pair}}">{{totals.pc_covered_str}}%</td> - </tr> - </tfoot> <tbody> {% for file in files %} <tr class="file"> @@ -99,6 +81,19 @@ </tr> {% endfor %} </tbody> + <tfoot> + <tr class="total"> + <td class="name left">Total</td> + <td>{{totals.n_statements}}</td> + <td>{{totals.n_missing}}</td> + <td>{{totals.n_excluded}}</td> + {% if has_arcs %} + <td>{{totals.n_branches}}</td> + <td>{{totals.n_partial_branches}}</td> + {% endif %} + <td class="right" data-ratio="{{totals.ratio_covered|pair}}">{{totals.pc_covered_str}}%</td> + </tr> + </tfoot> </table> <p id="no_rows"> |