appdb/ ./scripts.js include/html.php include/t ...

WineHQ wineowner at wine.codeweavers.com
Fri Jul 21 14:18:10 CDT 2006


ChangeSet ID:	26739
CVSROOT:	/opt/cvs-commit
Module name:	appdb
Changes by:	wineowner at winehq.org	2006/07/21 14:18:10

Modified files:
	.              : scripts.js 
	include        : html.php testData.php util.php 

Log message:
	Chris Morgan <cmorgan at alum.wpi.edu>
	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.

Patch: http://cvs.winehq.org/patch.py?id=26739

Old revision  New revision  Changes     Path
 1.4           1.5           +5 -2       appdb/scripts.js
 1.9           1.10          +4 -3       appdb/include/html.php
 1.6           1.7           +1 -1       appdb/include/testData.php
 1.73          1.74          +1 -1       appdb/include/util.php

Index: appdb/scripts.js
diff -u -p appdb/scripts.js:1.4 appdb/scripts.js:1.5
--- appdb/scripts.js:1.4	21 Jul 2006 19:18:10 -0000
+++ appdb/scripts.js	21 Jul 2006 19:18:10 -0000
@@ -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;
     }
 }
 
Index: appdb/include/html.php
diff -u -p appdb/include/html.php:1.9 appdb/include/html.php:1.10
--- appdb/include/html.php:1.9	21 Jul 2006 19:18:10 -0000
+++ appdb/include/html.php	21 Jul 2006 19:18:10 -0000
@@ -62,11 +62,12 @@ function html_tr($arr, $class = "", $ext
 	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.' '.
-        'onmouseover="ChangeTrColor(this, true, \''.$sHighlightColor.'\', \''.$sInactiveColor.'\');"'.
-        'onmouseout="ChangeTrColor(this, false, \''.$sHighlightColor.'\', \''.$sInactiveColor.'\');"'.
+        'onmouseover="ChangeTr(this, true, \''.$sHighlightColor.'\', \''.$sInactiveColor.'\', \''.$sTextDecorationHighlight.'\', \''.$sTextDecorationInactive.'\');"'.
+        'onmouseout="ChangeTr(this, false, \''.$sHighlightColor.'\', \''.$sInactiveColor.'\', \''.$sTextDecorationHighlight.'\', \''.$sTextDecorationInactive.'\');"'.
         'onclick="DoNav(\''.$sUrl.'\');">';
 }
 
Index: appdb/include/testData.php
diff -u -p appdb/include/testData.php:1.6 appdb/include/testData.php:1.7
--- appdb/include/testData.php:1.6	21 Jul 2006 19:18:10 -0000
+++ appdb/include/testData.php	21 Jul 2006 19:18:10 -0000
@@ -418,7 +418,7 @@ class testData{
                 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 */
             {
-                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;
 
                 if(is_string($showAll))
Index: appdb/include/util.php
diff -u -p appdb/include/util.php:1.73 appdb/include/util.php:1.74
--- appdb/include/util.php:1.73	21 Jul 2006 19:18:10 -0000
+++ appdb/include/util.php	21 Jul 2006 19:18:10 -0000
@@ -280,7 +280,7 @@ function outputTopXRow($oRow)
     $oVersion = new Version($oRow->versionId);
     $oApp = new Application($oVersion->iAppId);
     $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 '
       <td class="app_name">
             <a href="appview.php?iVersionId='.$oRow->versionId.'">'.$oApp->sName.' '.$oVersion->sName.'</a></td>



More information about the wine-cvs mailing list