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.
This commit is contained in:
@@ -62,11 +62,12 @@ function html_tr($arr, $class = "", $extra = "")
|
|||||||
return do_html_tr("td", $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 '<tr class='.$sClass.' '.
|
echo '<tr class='.$sClass.' '.
|
||||||
'onmouseover="ChangeTrColor(this, true, \''.$sHighlightColor.'\', \''.$sInactiveColor.'\');"'.
|
'onmouseover="ChangeTr(this, true, \''.$sHighlightColor.'\', \''.$sInactiveColor.'\', \''.$sTextDecorationHighlight.'\', \''.$sTextDecorationInactive.'\');"'.
|
||||||
'onmouseout="ChangeTrColor(this, false, \''.$sHighlightColor.'\', \''.$sInactiveColor.'\');"'.
|
'onmouseout="ChangeTr(this, false, \''.$sHighlightColor.'\', \''.$sInactiveColor.'\', \''.$sTextDecorationHighlight.'\', \''.$sTextDecorationInactive.'\');"'.
|
||||||
'onclick="DoNav(\''.$sUrl.'\');">';
|
'onclick="DoNav(\''.$sUrl.'\');">';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -418,7 +418,7 @@ class testData{
|
|||||||
echo ' <td align="center" class="color2"><b>Current</b></td>',"\n";
|
echo ' <td align="center" class="color2"><b>Current</b></td>',"\n";
|
||||||
} else /* make all non-current rows clickable so clicking on them selects the test as current */
|
} 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 ' <td align="center" class="color2">[<a href="'.$link.$oTest->iTestingId;
|
echo ' <td align="center" class="color2">[<a href="'.$link.$oTest->iTestingId;
|
||||||
|
|
||||||
if(is_string($showAll))
|
if(is_string($showAll))
|
||||||
|
|||||||
@@ -280,7 +280,7 @@ function outputTopXRow($oRow)
|
|||||||
$oVersion = new Version($oRow->versionId);
|
$oVersion = new Version($oRow->versionId);
|
||||||
$oApp = new Application($oVersion->iAppId);
|
$oApp = new Application($oVersion->iAppId);
|
||||||
$img = Screenshot::get_random_screenshot_img(null, $oRow->versionId, false); // image, disable extra formatting
|
$img = Screenshot::get_random_screenshot_img(null, $oRow->versionId, false); // image, disable extra formatting
|
||||||
html_tr_highlight_clickable("white", "white", "white", 'appview.php?iVersionId='.$oRow->versionId);
|
html_tr_highlight_clickable('appview.php?iVersionId='.$oRow->versionId, "white", "#fffef6", "white");
|
||||||
echo '
|
echo '
|
||||||
<td class="app_name">
|
<td class="app_name">
|
||||||
<a href="appview.php?iVersionId='.$oRow->versionId.'">'.$oApp->sName.' '.$oVersion->sName.'</a></td>
|
<a href="appview.php?iVersionId='.$oRow->versionId.'">'.$oApp->sName.' '.$oVersion->sName.'</a></td>
|
||||||
|
|||||||
@@ -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.backgroundColor = sHighlightColor;
|
||||||
tableRow.style.cursor = "hand";
|
tableRow.style.cursor = "hand";
|
||||||
|
tableRow.style.textDecoration = sTextDecorationHighlight;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tableRow.style.backgroundColor = sInactiveColor;
|
tableRow.style.backgroundColor = sInactiveColor;
|
||||||
tableRow.style.cursor = "pointer";
|
tableRow.style.cursor = "pointer";
|
||||||
|
tableRow.style.textDecoration = sTextDecorationInactive;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user