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
commitfec2d525b3848888e805ec782c9ade1f193a0add (patch)
tree257b49de9411e0ebdb574077d6f4e512276a9710 /coverage/htmlfiles/coverage_html.js
parentc24c5b0ce6aa1b2cc90529fefec248dadd32125d (diff)
downloadpython-coveragepy-git-fec2d525b3848888e805ec782c9ade1f193a0add.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 d7423c83..2800dd45 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();