IDEA-193759: Remove outdated webpart of pycoverage

We do not use it anyway, and jquery has vulnerabilities
This commit is contained in:
Ilya.Kazakevich
2018-06-13 16:12:53 +03:00
parent 175f6419d4
commit 6e3ce302af
11 changed files with 0 additions and 1349 deletions
@@ -1,584 +0,0 @@
// Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
// For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
// Coverage.py HTML report browser code.
/*jslint browser: true, sloppy: true, vars: true, plusplus: true, maxerr: 50, indent: 4 */
/*global coverage: true, document, window, $ */
coverage = {};
// Find all the elements with shortkey_* class, and use them to assign a shortcut key.
coverage.assign_shortkeys = function () {
$("*[class*='shortkey_']").each(function (i, e) {
$.each($(e).attr("class").split(" "), function (i, c) {
if (/^shortkey_/.test(c)) {
$(document).bind('keydown', c.substr(9), function () {
$(e).click();
});
}
});
});
};
// Create the events for the help panel.
coverage.wire_up_help_panel = function () {
$("#keyboard_icon").click(function () {
// Show the help panel, and position it so the keyboard icon in the
// panel is in the same place as the keyboard icon in the header.
$(".help_panel").show();
var koff = $("#keyboard_icon").offset();
var poff = $("#panel_icon").position();
$(".help_panel").offset({
top: koff.top-poff.top,
left: koff.left-poff.left
});
});
$("#panel_icon").click(function () {
$(".help_panel").hide();
});
};
// Create the events for the filter box.
coverage.wire_up_filter = function () {
// Cache elements.
var table = $("table.index");
var table_rows = table.find("tbody tr");
var table_row_names = table_rows.find("td.name a");
var no_rows = $("#no_rows");
// Create a duplicate table footer that we can modify with dynamic summed values.
var table_footer = $("table.index tfoot tr");
var table_dynamic_footer = table_footer.clone();
table_dynamic_footer.attr('class', 'total_dynamic hidden');
table_footer.after(table_dynamic_footer);
// Observe filter keyevents.
$("#filter").on("keyup change", $.debounce(150, function (event) {
var filter_value = $(this).val();
if (filter_value === "") {
// Filter box is empty, remove all filtering.
table_rows.removeClass("hidden");
// Show standard footer, hide dynamic footer.
table_footer.removeClass("hidden");
table_dynamic_footer.addClass("hidden");
// Hide placeholder, show table.
if (no_rows.length > 0) {
no_rows.hide();
}
table.show();
}
else {
// Filter table items by value.
var hidden = 0;
var shown = 0;
// Hide / show elements.
$.each(table_row_names, function () {
var element = $(this).parents("tr");
if ($(this).text().indexOf(filter_value) === -1) {
// hide
element.addClass("hidden");
hidden++;
}
else {
// show
element.removeClass("hidden");
shown++;
}
});
// Show placeholder if no rows will be displayed.
if (no_rows.length > 0) {
if (shown === 0) {
// Show placeholder, hide table.
no_rows.show();
table.hide();
}
else {
// Hide placeholder, show table.
no_rows.hide();
table.show();
}
}
// Manage dynamic header:
if (hidden > 0) {
// Calculate new dynamic sum values based on visible rows.
for (var column = 2; column < 20; column++) {
// Calculate summed value.
var cells = table_rows.find('td:nth-child(' + column + ')');
if (!cells.length) {
// No more columns...!
break;
}
var sum = 0, numer = 0, denom = 0;
$.each(cells.filter(':visible'), function () {
var ratio = $(this).data("ratio");
if (ratio) {
var splitted = ratio.split(" ");
numer += parseInt(splitted[0], 10);
denom += parseInt(splitted[1], 10);
}
else {
sum += parseInt(this.innerHTML, 10);
}
});
// Get footer cell element.
var footer_cell = table_dynamic_footer.find('td:nth-child(' + column + ')');
// Set value into dynamic footer cell element.
if (cells[0].innerHTML.indexOf('%') > -1) {
// Percentage columns use the numerator and denominator,
// and adapt to the number of decimal places.
var match = /\.([0-9]+)/.exec(cells[0].innerHTML);
var places = 0;
if (match) {
places = match[1].length;
}
var pct = numer * 100 / denom;
footer_cell.text(pct.toFixed(places) + '%');
}
else {
footer_cell.text(sum);
}
}
// Hide standard footer, show dynamic footer.
table_footer.addClass("hidden");
table_dynamic_footer.removeClass("hidden");
}
else {
// Show standard footer, hide dynamic footer.
table_footer.removeClass("hidden");
table_dynamic_footer.addClass("hidden");
}
}
}));
// Trigger change event on setup, to force filter on page refresh
// (filter value may still be present).
$("#filter").trigger("change");
};
// Loaded on index.html
coverage.index_ready = function ($) {
// Look for a cookie containing previous sort settings:
var sort_list = [];
var cookie_name = "COVERAGE_INDEX_SORT";
var i;
// This almost makes it worth installing the jQuery cookie plugin:
if (document.cookie.indexOf(cookie_name) > -1) {
var cookies = document.cookie.split(";");
for (i = 0; i < cookies.length; i++) {
var parts = cookies[i].split("=");
if ($.trim(parts[0]) === cookie_name && parts[1]) {
sort_list = eval("[[" + parts[1] + "]]");
break;
}
}
}
// Create a new widget which exists only to save and restore
// the sort order:
$.tablesorter.addWidget({
id: "persistentSort",
// Format is called by the widget before displaying:
format: function (table) {
if (table.config.sortList.length === 0 && sort_list.length > 0) {
// This table hasn't been sorted before - we'll use
// our stored settings:
$(table).trigger('sorton', [sort_list]);
}
else {
// This is not the first load - something has
// already defined sorting so we'll just update
// our stored value to match:
sort_list = table.config.sortList;
}
}
});
// Configure our tablesorter to handle the variable number of
// columns produced depending on report options:
var headers = [];
var col_count = $("table.index > thead > tr > th").length;
headers[0] = { sorter: 'text' };
for (i = 1; i < col_count-1; i++) {
headers[i] = { sorter: 'digit' };
}
headers[col_count-1] = { sorter: 'percent' };
// Enable the table sorter:
$("table.index").tablesorter({
widgets: ['persistentSort'],
headers: headers
});
coverage.assign_shortkeys();
coverage.wire_up_help_panel();
coverage.wire_up_filter();
// Watch for page unload events so we can save the final sort settings:
$(window).unload(function () {
document.cookie = cookie_name + "=" + sort_list.toString() + "; path=/";
});
};
// -- pyfile stuff --
coverage.pyfile_ready = function ($) {
// 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');
coverage.set_sel(parseInt(frag.substr(2), 10));
}
else {
coverage.set_sel(0);
}
$(document)
.bind('keydown', 'j', coverage.to_next_chunk_nicely)
.bind('keydown', 'k', coverage.to_prev_chunk_nicely)
.bind('keydown', '0', coverage.to_top)
.bind('keydown', '1', coverage.to_first_chunk)
;
$(".button_toggle_run").click(function (evt) {coverage.toggle_lines(evt.target, "run");});
$(".button_toggle_exc").click(function (evt) {coverage.toggle_lines(evt.target, "exc");});
$(".button_toggle_mis").click(function (evt) {coverage.toggle_lines(evt.target, "mis");});
$(".button_toggle_par").click(function (evt) {coverage.toggle_lines(evt.target, "par");});
coverage.assign_shortkeys();
coverage.wire_up_help_panel();
coverage.init_scroll_markers();
// Rebuild scroll markers after window high changing
$(window).resize(coverage.resize_scroll_markers);
};
coverage.toggle_lines = function (btn, cls) {
btn = $(btn);
var hide = "hide_"+cls;
if (btn.hasClass(hide)) {
$("#source ."+cls).removeClass(hide);
btn.removeClass(hide);
}
else {
$("#source ."+cls).addClass(hide);
btn.addClass(hide);
}
};
// Return the nth line div.
coverage.line_elt = function (n) {
return $("#t" + n);
};
// Return the nth line number div.
coverage.num_elt = function (n) {
return $("#n" + n);
};
// Return the container of all the code.
coverage.code_container = function () {
return $(".linenos");
};
// Set the selection. b and e are line numbers.
coverage.set_sel = function (b, e) {
// The first line selected.
coverage.sel_begin = b;
// The next line not selected.
coverage.sel_end = (e === undefined) ? b+1 : e;
};
coverage.to_top = function () {
coverage.set_sel(0, 1);
coverage.scroll_window(0);
};
coverage.to_first_chunk = function () {
coverage.set_sel(0, 1);
coverage.to_next_chunk();
};
coverage.is_transparent = function (color) {
// Different browsers return different colors for "none".
return color === "transparent" || color === "rgba(0, 0, 0, 0)";
};
coverage.to_next_chunk = function () {
var c = coverage;
// Find the start of the next colored chunk.
var probe = c.sel_end;
var color, probe_line;
while (true) {
probe_line = c.line_elt(probe);
if (probe_line.length === 0) {
return;
}
color = probe_line.css("background-color");
if (!c.is_transparent(color)) {
break;
}
probe++;
}
// There's a next chunk, `probe` points to it.
var begin = probe;
// Find the end of this chunk.
var next_color = color;
while (next_color === color) {
probe++;
probe_line = c.line_elt(probe);
next_color = probe_line.css("background-color");
}
c.set_sel(begin, probe);
c.show_selection();
};
coverage.to_prev_chunk = function () {
var c = coverage;
// Find the end of the prev colored chunk.
var probe = c.sel_begin-1;
var probe_line = c.line_elt(probe);
if (probe_line.length === 0) {
return;
}
var color = probe_line.css("background-color");
while (probe > 0 && c.is_transparent(color)) {
probe--;
probe_line = c.line_elt(probe);
if (probe_line.length === 0) {
return;
}
color = probe_line.css("background-color");
}
// There's a prev chunk, `probe` points to its last line.
var end = probe+1;
// Find the beginning of this chunk.
var prev_color = color;
while (prev_color === color) {
probe--;
probe_line = c.line_elt(probe);
prev_color = probe_line.css("background-color");
}
c.set_sel(probe+1, end);
c.show_selection();
};
// Return the line number of the line nearest pixel position pos
coverage.line_at_pos = function (pos) {
var l1 = coverage.line_elt(1),
l2 = coverage.line_elt(2),
result;
if (l1.length && l2.length) {
var l1_top = l1.offset().top,
line_height = l2.offset().top - l1_top,
nlines = (pos - l1_top) / line_height;
if (nlines < 1) {
result = 1;
}
else {
result = Math.ceil(nlines);
}
}
else {
result = 1;
}
return result;
};
// Returns 0, 1, or 2: how many of the two ends of the selection are on
// the screen right now?
coverage.selection_ends_on_screen = function () {
if (coverage.sel_begin === 0) {
return 0;
}
var top = coverage.line_elt(coverage.sel_begin);
var next = coverage.line_elt(coverage.sel_end-1);
return (
(top.isOnScreen() ? 1 : 0) +
(next.isOnScreen() ? 1 : 0)
);
};
coverage.to_next_chunk_nicely = function () {
coverage.finish_scrolling();
if (coverage.selection_ends_on_screen() === 0) {
// The selection is entirely off the screen: select the top line on
// the screen.
var win = $(window);
coverage.select_line_or_chunk(coverage.line_at_pos(win.scrollTop()));
}
coverage.to_next_chunk();
};
coverage.to_prev_chunk_nicely = function () {
coverage.finish_scrolling();
if (coverage.selection_ends_on_screen() === 0) {
var win = $(window);
coverage.select_line_or_chunk(coverage.line_at_pos(win.scrollTop() + win.height()));
}
coverage.to_prev_chunk();
};
// Select line number lineno, or if it is in a colored chunk, select the
// entire chunk
coverage.select_line_or_chunk = function (lineno) {
var c = coverage;
var probe_line = c.line_elt(lineno);
if (probe_line.length === 0) {
return;
}
var the_color = probe_line.css("background-color");
if (!c.is_transparent(the_color)) {
// The line is in a highlighted chunk.
// Search backward for the first line.
var probe = lineno;
var color = the_color;
while (probe > 0 && color === the_color) {
probe--;
probe_line = c.line_elt(probe);
if (probe_line.length === 0) {
break;
}
color = probe_line.css("background-color");
}
var begin = probe + 1;
// Search forward for the last line.
probe = lineno;
color = the_color;
while (color === the_color) {
probe++;
probe_line = c.line_elt(probe);
color = probe_line.css("background-color");
}
coverage.set_sel(begin, probe);
}
else {
coverage.set_sel(lineno);
}
};
coverage.show_selection = function () {
var c = coverage;
// Highlight the lines in the chunk
c.code_container().find(".highlight").removeClass("highlight");
for (var probe = c.sel_begin; probe > 0 && probe < c.sel_end; probe++) {
c.num_elt(probe).addClass("highlight");
}
c.scroll_to_selection();
};
coverage.scroll_to_selection = function () {
// Scroll the page if the chunk isn't fully visible.
if (coverage.selection_ends_on_screen() < 2) {
// Need to move the page. The html,body trick makes it scroll in all
// browsers, got it from http://stackoverflow.com/questions/3042651
var top = coverage.line_elt(coverage.sel_begin);
var top_pos = parseInt(top.offset().top, 10);
coverage.scroll_window(top_pos - 30);
}
};
coverage.scroll_window = function (to_pos) {
$("html,body").animate({scrollTop: to_pos}, 200);
};
coverage.finish_scrolling = function () {
$("html,body").stop(true, true);
};
coverage.init_scroll_markers = function () {
var c = coverage;
// Init some variables
c.lines_len = $('td.text p').length;
c.body_h = $('body').height();
c.header_h = $('div#header').height();
c.missed_lines = $('td.text p.mis, td.text p.par');
// Build html
c.resize_scroll_markers();
};
coverage.resize_scroll_markers = function () {
var c = coverage,
min_line_height = 3,
max_line_height = 10,
visible_window_h = $(window).height();
$('#scroll_marker').remove();
// Don't build markers if the window has no scroll bar.
if (c.body_h <= visible_window_h) {
return;
}
$("body").append("<div id='scroll_marker'>&nbsp;</div>");
var scroll_marker = $('#scroll_marker'),
marker_scale = scroll_marker.height() / c.body_h,
line_height = scroll_marker.height() / c.lines_len;
// Line height must be between the extremes.
if (line_height > min_line_height) {
if (line_height > max_line_height) {
line_height = max_line_height;
}
}
else {
line_height = min_line_height;
}
var previous_line = -99,
last_mark,
last_top;
c.missed_lines.each(function () {
var line_top = Math.round($(this).offset().top * marker_scale),
id_name = $(this).attr('id'),
line_number = parseInt(id_name.substring(1, id_name.length));
if (line_number === previous_line + 1) {
// If this solid missed block just make previous mark higher.
last_mark.css({
'height': line_top + line_height - last_top
});
}
else {
// Add colored line in scroll_marker block.
scroll_marker.append('<div id="m' + line_number + '" class="marker"></div>');
last_mark = $('#m' + line_number);
last_mark.css({
'height': line_height,
'top': line_top
});
last_top = line_top;
}
previous_line = line_number;
});
};
@@ -1,118 +0,0 @@
{# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 #}
{# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt #}
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>{{ title|escape }}</title>
<link rel="stylesheet" href="style.css" type="text/css">
{% 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.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>
</head>
<body class="indexfile">
<div id="header">
<div class="content">
<h1>{{ title|escape }}:
<span class="pc_cov">{{totals.pc_covered_str}}%</span>
</h1>
<img id="keyboard_icon" src="keybd_closed.png" alt="Show keyboard shortcuts" />
<form id="filter_container">
<input id="filter" type="text" value="" placeholder="filter..." />
</form>
</div>
</div>
<div 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> &nbsp; change column sorting
</p>
</div>
</div>
<div id="index">
<table class="index">
<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>
{% if has_arcs %}
<th class="shortkey_b">branches</th>
<th class="shortkey_p">partial</th>
{% endif %}
<th class="right shortkey_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">
<td class="name left"><a href="{{file.html_filename}}">{{file.relative_filename}}</a></td>
<td>{{file.nums.n_statements}}</td>
<td>{{file.nums.n_missing}}</td>
<td>{{file.nums.n_excluded}}</td>
{% if has_arcs %}
<td>{{file.nums.n_branches}}</td>
<td>{{file.nums.n_partial_branches}}</td>
{% endif %}
<td class="right" data-ratio="{{file.nums.ratio_covered|pair}}">{{file.nums.pc_covered_str}}%</td>
</tr>
{% endfor %}
</tbody>
</table>
<p id="no_rows">
No items found using the specified filter.
</p>
</div>
<div id="footer">
<div class="content">
<p>
<a class="nav" href="{{__url__}}">coverage.py v{{__version__}}</a>,
created at {{ time_stamp }}
</p>
</div>
</div>
</body>
</html>
@@ -1,9 +0,0 @@
/*
* jQuery throttle / debounce - v1.1 - 3/7/2010
* http://benalman.com/projects/jquery-throttle-debounce-plugin/
*
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
(function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,j,i){var h,d=0;if(typeof f!=="boolean"){i=j;j=f;f=c}function g(){var o=this,m=+new Date()-d,n=arguments;function l(){d=+new Date();j.apply(o,n)}function k(){h=c}if(i&&!h){l()}h&&clearTimeout(h);if(i===c&&m>e){l()}else{if(f!==true){h=setTimeout(i?k:l,i===c?e-m:e)}}}if($.guid){g.guid=j.guid=j.guid||$.guid++}return g};$.debounce=function(d,e,f){return f===c?a(d,e,false):a(d,f,e!==false)}})(this);
@@ -1,99 +0,0 @@
/*
* jQuery Hotkeys Plugin
* Copyright 2010, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
*
* Based upon the plugin by Tzury Bar Yochay:
* http://github.com/tzuryby/hotkeys
*
* Original idea by:
* Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/
*/
(function(jQuery){
jQuery.hotkeys = {
version: "0.8",
specialKeys: {
8: "backspace", 9: "tab", 13: "return", 16: "shift", 17: "ctrl", 18: "alt", 19: "pause",
20: "capslock", 27: "esc", 32: "space", 33: "pageup", 34: "pagedown", 35: "end", 36: "home",
37: "left", 38: "up", 39: "right", 40: "down", 45: "insert", 46: "del",
96: "0", 97: "1", 98: "2", 99: "3", 100: "4", 101: "5", 102: "6", 103: "7",
104: "8", 105: "9", 106: "*", 107: "+", 109: "-", 110: ".", 111 : "/",
112: "f1", 113: "f2", 114: "f3", 115: "f4", 116: "f5", 117: "f6", 118: "f7", 119: "f8",
120: "f9", 121: "f10", 122: "f11", 123: "f12", 144: "numlock", 145: "scroll", 191: "/", 224: "meta"
},
shiftNums: {
"`": "~", "1": "!", "2": "@", "3": "#", "4": "$", "5": "%", "6": "^", "7": "&",
"8": "*", "9": "(", "0": ")", "-": "_", "=": "+", ";": ": ", "'": "\"", ",": "<",
".": ">", "/": "?", "\\": "|"
}
};
function keyHandler( handleObj ) {
// Only care when a possible input has been specified
if ( typeof handleObj.data !== "string" ) {
return;
}
var origHandler = handleObj.handler,
keys = handleObj.data.toLowerCase().split(" ");
handleObj.handler = function( event ) {
// Don't fire in text-accepting inputs that we didn't directly bind to
if ( this !== event.target && (/textarea|select/i.test( event.target.nodeName ) ||
event.target.type === "text") ) {
return;
}
// Keypress represents characters, not special keys
var special = event.type !== "keypress" && jQuery.hotkeys.specialKeys[ event.which ],
character = String.fromCharCode( event.which ).toLowerCase(),
key, modif = "", possible = {};
// check combinations (alt|ctrl|shift+anything)
if ( event.altKey && special !== "alt" ) {
modif += "alt+";
}
if ( event.ctrlKey && special !== "ctrl" ) {
modif += "ctrl+";
}
// TODO: Need to make sure this works consistently across platforms
if ( event.metaKey && !event.ctrlKey && special !== "meta" ) {
modif += "meta+";
}
if ( event.shiftKey && special !== "shift" ) {
modif += "shift+";
}
if ( special ) {
possible[ modif + special ] = true;
} else {
possible[ modif + character ] = true;
possible[ modif + jQuery.hotkeys.shiftNums[ character ] ] = true;
// "$" can be triggered as "Shift+4" or "Shift+$" or just "$"
if ( modif === "shift+" ) {
possible[ jQuery.hotkeys.shiftNums[ character ] ] = true;
}
}
for ( var i = 0, l = keys.length; i < l; i++ ) {
if ( possible[ keys[i] ] ) {
return origHandler.apply( this, arguments );
}
}
};
}
jQuery.each([ "keydown", "keyup", "keypress" ], function() {
jQuery.event.special[ this ] = { add: keyHandler };
});
})( jQuery );
@@ -1,53 +0,0 @@
/* Copyright (c) 2010
* @author Laurence Wheway
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* @version 1.2.0
*/
(function($) {
jQuery.extend({
isOnScreen: function(box, container) {
//ensure numbers come in as intgers (not strings) and remove 'px' is it's there
for(var i in box){box[i] = parseFloat(box[i])};
for(var i in container){container[i] = parseFloat(container[i])};
if(!container){
container = {
left: $(window).scrollLeft(),
top: $(window).scrollTop(),
width: $(window).width(),
height: $(window).height()
}
}
if( box.left+box.width-container.left > 0 &&
box.left < container.width+container.left &&
box.top+box.height-container.top > 0 &&
box.top < container.height+container.top
) return true;
return false;
}
})
jQuery.fn.isOnScreen = function (container) {
for(var i in container){container[i] = parseFloat(container[i])};
if(!container){
container = {
left: $(window).scrollLeft(),
top: $(window).scrollTop(),
width: $(window).width(),
height: $(window).height()
}
}
if( $(this).offset().left+$(this).width()-container.left > 0 &&
$(this).offset().left < container.width+container.left &&
$(this).offset().top+$(this).height()-container.top > 0 &&
$(this).offset().top < container.height+container.top
) return true;
return false;
}
})(jQuery);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 B

@@ -1,105 +0,0 @@
{# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 #}
{# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt #}
<!DOCTYPE html>
<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 {{fr.relative_filename|escape}}: {{nums.pc_covered_str}}%</title>
<link rel="stylesheet" href="style.css" type="text/css">
{% 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>
</head>
<body class="pyfile">
<div id="header">
<div class="content">
<h1>Coverage for <b>{{fr.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" />
<h2 class="stats">
{{nums.n_statements}} statements &nbsp;
<span class="{{c_run}} shortkey_r button_toggle_run">{{nums.n_executed}} run</span>
<span class="{{c_mis}} shortkey_m button_toggle_mis">{{nums.n_missing}} missing</span>
<span class="{{c_exc}} shortkey_x button_toggle_exc">{{nums.n_excluded}} excluded</span>
{% if has_arcs %}
<span class="{{c_par}} shortkey_p button_toggle_par">{{nums.n_partial_branches}} partial</span>
{% endif %}
</h2>
</div>
</div>
<div 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> &nbsp; toggle line displays
</p>
<p class="keyhelp">
<span class="key">j</span>
<span class="key">k</span> &nbsp; next/prev highlighted chunk
</p>
<p class="keyhelp">
<span class="key">0</span> &nbsp; (zero) top of page
</p>
<p class="keyhelp">
<span class="key">1</span> &nbsp; (one) first highlighted chunk
</p>
</div>
</div>
<div id="source">
<table>
<tr>
<td class="linenos">
{% for line in lines -%}
<p id="n{{line.number}}" class="{{line.class}}"><a href="#n{{line.number}}">{{line.number}}</a></p>
{% endfor %}
</td>
<td class="text">
{# These are the source lines, which are very sensitive to whitespace. -#}
{# The `{ # - # }` below are comments which slurp up the following space. -#}
{% for line in lines -%}
<p id="t{{line.number}}" class="{{line.class}}">{#-#}
{% if line.annotate -%}
<span class="annotate short">{{line.annotate}}</span>{#-#}
<span class="annotate long">{{line.annotate_long}}</span>{#-#}
{% endif -%}
{{line.html}}<span class="strut">&nbsp;</span>{#-#}
</p>
{% endfor %}
</td>
</tr>
</table>
</div>
<div id="footer">
<div class="content">
<p>
<a class="nav" href="index.html">&#xab; index</a> &nbsp; &nbsp; <a class="nav" href="{{__url__}}">coverage.py v{{__version__}}</a>,
created at {{ time_stamp }}
</p>
</div>
</div>
</body>
</html>
@@ -1,375 +0,0 @@
/* Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 */
/* For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt */
/* CSS styles for coverage.py. */
/* Page-wide styles */
html, body, h1, h2, h3, p, table, td, th {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
/* Set baseline grid to 16 pt. */
body {
font-family: georgia, serif;
font-size: 1em;
}
html>body {
font-size: 16px;
}
/* Set base font size to 12/16 */
p {
font-size: .75em; /* 12/16 */
line-height: 1.33333333em; /* 16/12 */
}
table {
border-collapse: collapse;
}
td {
vertical-align: top;
}
table tr.hidden {
display: none !important;
}
p#no_rows {
display: none;
font-size: 1.2em;
}
a.nav {
text-decoration: none;
color: inherit;
}
a.nav:hover {
text-decoration: underline;
color: inherit;
}
/* Page structure */
#header {
background: #f8f8f8;
width: 100%;
border-bottom: 1px solid #eee;
}
#source {
padding: 1em;
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
.indexfile #footer {
margin: 1em 3em;
}
.pyfile #footer {
margin: 1em 1em;
}
#footer .content {
padding: 0;
font-size: 85%;
font-family: verdana, sans-serif;
color: #666666;
font-style: italic;
}
#index {
margin: 1em 0 0 3em;
}
/* Header styles */
#header .content {
padding: 1em 3em;
}
h1 {
font-size: 1.25em;
display: inline-block;
}
#filter_container {
display: inline-block;
float: right;
margin: 0 2em 0 0;
}
#filter_container input {
width: 10em;
}
h2.stats {
margin-top: .5em;
font-size: 1em;
}
.stats span {
border: 1px solid;
padding: .1em .25em;
margin: 0 .1em;
cursor: pointer;
border-color: #999 #ccc #ccc #999;
}
.stats span.hide_run, .stats span.hide_exc,
.stats span.hide_mis, .stats span.hide_par,
.stats span.par.hide_run.hide_par {
border-color: #ccc #999 #999 #ccc;
}
.stats span.par.hide_run {
border-color: #999 #ccc #ccc #999;
}
.stats span.run {
background: #ddffdd;
}
.stats span.exc {
background: #eeeeee;
}
.stats span.mis {
background: #ffdddd;
}
.stats span.hide_run {
background: #eeffee;
}
.stats span.hide_exc {
background: #f5f5f5;
}
.stats span.hide_mis {
background: #ffeeee;
}
.stats span.par {
background: #ffffaa;
}
.stats span.hide_par {
background: #ffffcc;
}
/* Help panel */
#keyboard_icon {
float: right;
margin: 5px;
cursor: pointer;
}
.help_panel {
position: absolute;
background: #ffffcc;
padding: .5em;
border: 1px solid #883;
display: none;
}
.indexfile .help_panel {
width: 20em; height: 4em;
}
.pyfile .help_panel {
width: 16em; height: 8em;
}
.help_panel .legend {
font-style: italic;
margin-bottom: 1em;
}
#panel_icon {
float: right;
cursor: pointer;
}
.keyhelp {
margin: .75em;
}
.keyhelp .key {
border: 1px solid black;
border-color: #888 #333 #333 #888;
padding: .1em .35em;
font-family: monospace;
font-weight: bold;
background: #eee;
}
/* Source file styles */
.linenos p {
text-align: right;
margin: 0;
padding: 0 .5em;
color: #999999;
font-family: verdana, sans-serif;
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%;
}
.text p {
margin: 0;
padding: 0 0 0 .5em;
border-left: 2px solid #ffffff;
white-space: pre;
position: relative;
}
.text p.mis {
background: #ffdddd;
border-left: 2px solid #ff0000;
}
.text p.run, .text p.run.hide_par {
background: #ddffdd;
border-left: 2px solid #00ff00;
}
.text p.exc {
background: #eeeeee;
border-left: 2px solid #808080;
}
.text p.par, .text p.par.hide_run {
background: #ffffaa;
border-left: 2px solid #eeee99;
}
.text p.hide_run, .text p.hide_exc, .text p.hide_mis, .text p.hide_par,
.text p.hide_run.hide_par {
background: inherit;
}
.text span.annotate {
font-family: georgia;
color: #666;
float: right;
padding-right: .5em;
}
.text p.hide_par span.annotate {
display: none;
}
.text span.annotate.long {
display: none;
}
.text p:hover span.annotate.long {
display: block;
max-width: 50%;
white-space: normal;
float: right;
position: absolute;
top: 1.75em;
right: 1em;
width: 30em;
height: auto;
color: #333;
background: #ffffcc;
border: 1px solid #888;
padding: .25em .5em;
z-index: 999;
border-radius: .2em;
box-shadow: #cccccc .2em .2em .2em;
}
/* Syntax coloring */
.text .com {
color: green;
font-style: italic;
line-height: 1px;
}
.text .key {
font-weight: bold;
line-height: 1px;
}
.text .str {
color: #000080;
}
/* index styles */
#index td, #index th {
text-align: right;
width: 5em;
padding: .25em .5em;
border-bottom: 1px solid #eee;
}
#index th {
font-style: italic;
color: #333;
border-bottom: 1px solid #ccc;
cursor: pointer;
}
#index th:hover {
background: #eee;
border-bottom: 1px solid #999;
}
#index td.left, #index th.left {
padding-left: 0;
}
#index td.right, #index th.right {
padding-right: 0;
}
#index th.headerSortDown, #index th.headerSortUp {
border-bottom: 1px solid #000;
white-space: nowrap;
background: #eee;
}
#index th.headerSortDown:after {
content: " ↓";
}
#index th.headerSortUp:after {
content: " ↑";
}
#index td.name, #index th.name {
text-align: left;
width: auto;
}
#index td.name a {
text-decoration: none;
color: #000;
}
#index tr.total,
#index tr.total_dynamic {
}
#index tr.total td,
#index tr.total_dynamic td {
font-weight: bold;
border-top: 1px solid #ccc;
border-bottom: none;
}
#index tr.file:hover {
background: #eeeeee;
}
#index tr.file:hover td.name {
text-decoration: underline;
color: #000;
}
/* scroll marker styles */
#scroll_marker {
position: fixed;
right: 0;
top: 0;
width: 16px;
height: 100%;
background: white;
border-left: 1px solid #eee;
}
#scroll_marker .marker {
background: #eedddd;
position: absolute;
min-height: 3px;
width: 100%;
}