From 4b380d37b300fbc7cbea0fd54c939c95bc43f876 Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Fri, 21 Jul 2006 19:18:10 +0000 Subject: [PATCH] Add a subtle highlight when mouse is over top X rows to provide better feedback to users that they may click anywhere in the row to visit the application version. Add underlining to the text in the test results table to provide similar feedback. --- include/html.php | 7 ++++--- include/testData.php | 2 +- include/util.php | 2 +- scripts.js | 7 +++++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/include/html.php b/include/html.php index 066def4..4ce17e9 100644 --- a/include/html.php +++ b/include/html.php @@ -62,11 +62,12 @@ function html_tr($arr, $class = "", $extra = "") return do_html_tr("td", $arr, $class, $extra); } -function html_tr_highlight_clickable($sClass, $sHighlightColor, $sInactiveColor, $sUrl) +function html_tr_highlight_clickable($sUrl, $sClass, $sHighlightColor, $sInactiveColor, + $sTextDecorationHighlight = "none", $sTextDecorationInactive = "none") { echo ''; } diff --git a/include/testData.php b/include/testData.php index 4d4e87e..ade0cd3 100644 --- a/include/testData.php +++ b/include/testData.php @@ -418,7 +418,7 @@ class testData{ echo ' Current',"\n"; } else /* make all non-current rows clickable so clicking on them selects the test as current */ { - html_tr_highlight_clickable($bgcolor, "", "color2", $link.$oTest->iTestingId); + html_tr_highlight_clickable($link.$oTest->iTestingId, $bgcolor, "", "color2", "underline"); echo ' [ '.$oApp->sName.' '.$oVersion->sName.' diff --git a/scripts.js b/scripts.js index cbd9cbe..1e86376 100644 --- a/scripts.js +++ b/scripts.js @@ -19,17 +19,20 @@ function deleteURL(text, url) { } } -function ChangeTrColor(tableRow, bHighLight, sHighlightColor, sInactiveColor) +function ChangeTr(tableRow, bRowActive, sHighlightColor, sInactiveColor, + sTextDecorationHighlight, sTextDecorationInactive) { - if (bHighLight) + if (bRowActive) { tableRow.style.backgroundColor = sHighlightColor; tableRow.style.cursor = "hand"; + tableRow.style.textDecoration = sTextDecorationHighlight; } else { tableRow.style.backgroundColor = sInactiveColor; tableRow.style.cursor = "pointer"; + tableRow.style.textDecoration = sTextDecorationInactive; } }