summaryrefslogtreecommitdiff
path: root/coverage/htmlfiles/coverage_html.js
diff options
context:
space:
mode:
authorDanny Allen <danny.allen@pennantplc.co.uk>2014-05-15 13:06:53 +0100
committerDanny Allen <danny.allen@pennantplc.co.uk>2014-05-15 13:06:53 +0100
commitd163c1028f7c997ca1d9d9e89631a5d5fb58c4c4 (patch)
tree23ae0b275d2b46eb11acfe818987144f81169a37 /coverage/htmlfiles/coverage_html.js
parent77259b5d1fffff59aa5ad71e9e3a14a8084e838b (diff)
downloadpython-coveragepy-d163c1028f7c997ca1d9d9e89631a5d5fb58c4c4.tar.gz
* Respond to pull request #18 comments
Diffstat (limited to 'coverage/htmlfiles/coverage_html.js')
-rw-r--r--coverage/htmlfiles/coverage_html.js34
1 files changed, 19 insertions, 15 deletions
diff --git a/coverage/htmlfiles/coverage_html.js b/coverage/htmlfiles/coverage_html.js
index d7423c8..2800dd4 100644
--- a/coverage/htmlfiles/coverage_html.js
+++ b/coverage/htmlfiles/coverage_html.js
@@ -50,12 +50,13 @@ coverage.wire_up_filter = function () {
}
$("table.index").show();
- } else {
+ }
+ else {
// Filter table items by value
var hide = $([]);
var show = $([]);
- // - Compile elements to hide / show
+ // Compile elements to hide / show
$.each($("table.index tr td.name a"), function () {
var element = $(this).parents("tr");
@@ -63,24 +64,26 @@ coverage.wire_up_filter = function () {
// hide
hide = hide.add(element);
- } else {
+ }
+ else {
// show
show = show.add(element);
}
});
- // - Perform DOM manipulation
+ // Perform DOM manipulation
hide.addClass("hidden");
show.removeClass("hidden");
- // - Show placeholder if no rows will be displayed
+ // Show placeholder if no rows will be displayed
if ($("#no_rows").length > 0) {
if (show.length === 0) {
// Show placeholder, hide table
$("#no_rows").show();
$("table.index").hide();
- } else {
+ }
+ else {
// Hide placeholder, show table
$("#no_rows").hide();
$("table.index").show();
@@ -92,7 +95,8 @@ coverage.wire_up_filter = function () {
// Hide footer
$("table.index tfoot tr").addClass("hidden");
- } else {
+ }
+ else {
// Show footer
$("table.index tfoot tr").removeClass("hidden");
}
@@ -115,14 +119,14 @@ coverage.wire_up_next_buttons = function () {
if (button_id == "next_run") {
selector = ".run";
-
- } else if (button_id == "next_missing") {
+ }
+ else if (button_id == "next_missing") {
selector = ".mis";
-
- } else if (button_id == "next_excluded") {
+ }
+ else if (button_id == "next_excluded") {
selector = ".exc";
-
- } else {
+ }
+ else {
return false;
}
@@ -133,8 +137,8 @@ coverage.wire_up_next_buttons = function () {
if (previous_target === undefined) {
// First click, get first matching line.
target = $("p[id^='t']" + selector).first();
-
- } else {
+ }
+ else {
// Get next matching (non-contiguous) line.
var old_target = previous_target;
target = old_target.nextAll("p[id^='t']" + selector).first();