appdb/include menu.php sidebar_login.php
WineHQ
wineowner at wine.codeweavers.com
Wed Apr 18 20:20:55 CDT 2007
ChangeSet ID: 31052
CVSROOT: /opt/cvs-commit
Module name: appdb
Changes by: wineowner at winehq.org 2007/04/18 20:20:55
Modified files:
include : menu.php sidebar_login.php
Log message:
Chris Morgan <cmorgan at alum.wpi.edu>
Use html_tr_hightlight_clickable() in menu.php add() to make linkable rows of menus
clickable. Provides visual feedback of which entry is active and enables users to click
anywhere in the menu row, not just on the url.
Patch: http://cvs.winehq.org/patch.py?id=31052
Old revision New revision Changes Path
1.6 1.7 +11 -7 appdb/include/menu.php
1.22 1.23 +11 -8 appdb/include/sidebar_login.php
Index: appdb/include/menu.php
diff -u -p appdb/include/menu.php:1.6 appdb/include/menu.php:1.7
--- appdb/include/menu.php:1.6 19 Apr 2007 1:20:55 -0000
+++ appdb/include/menu.php 19 Apr 2007 1:20:55 -0000
@@ -37,20 +37,24 @@ class htmlmenu {
}
/* add a table row */
- function add($name, $url = null)
+ function add($sName, $shUrl = null, $sAlign = "left")
{
- if($url)
+ if($shUrl)
{
- echo " <tr class=sideMenu><td width='100%'><span class=menuItem> <a href='$url' class=menuItem>$name</a></span></td></tr>\n";
- } else
+ // we have a valid url, make the entire table row clickable and provide some highlighting
+ // for visual feedback
+ html_tr_highlight_clickable($shUrl, "sideMenu", "#e0e6ff", "#ffffff");
+ echo "<td width='100%' align=$sAlign><span class=MenuItem> <u>$sName</u></span></td>";
+ echo "</tr>\n";
+ } else
{
- echo " <tr class=sideMenu><td width='100%'><span class=menuItem> $name</span></td></tr>\n";
+ echo " <tr class=sideMenu><td width='100%' align=$sAlign><span class=menuItem> $sName</span></td></tr>\n";
}
}
- function addmisc($stuff, $align = "left")
+ function addmisc($sStuff, $sAlign = "left")
{
- echo " <tr class=sideMenu><td width='100%' align=$align><span class=menuItem> $stuff</span></td></tr>\n";
+ echo " <tr class=sideMenu><td width='100%' align=$sAlign><span class=menuItem> $sStuff</span></td></tr>\n";
}
function done($form = null)
Index: appdb/include/sidebar_login.php
diff -u -p appdb/include/sidebar_login.php:1.22 appdb/include/sidebar_login.php:1.23
--- appdb/include/sidebar_login.php:1.22 19 Apr 2007 1:20:55 -0000
+++ appdb/include/sidebar_login.php 19 Apr 2007 1:20:55 -0000
@@ -37,8 +37,9 @@ function global_sidebar_login() {
$iAppsRejected = application::objectGetEntriesCount(true, true) +
version::objectGetEntriesCount(true, true);
if($iAppsRejected && !$_SESSION['current']->hasPriv("admin"))
- $g->addmisc("<a href='".BASE."appsubmit.php?'>Review Rejected Apps ".
- "($iAppsRejected)</a>", "center");
+ {
+ $g->add("Review Rejected Apps ($iAppsRejected)", BASE."appsubmit.php", "center");
+ }
$aMonitored = Monitor::getVersionsMonitored($_SESSION['current']);
if($aMonitored)
@@ -47,7 +48,10 @@ function global_sidebar_login() {
$g->addmisc("You monitor:\n");
while(list($i, list($iAppId, $iVersionId)) = each($aMonitored))
- $g->addmisc(version::fullNameLink($iVersionId),"center");
+ {
+ $oVersion = new version($iVersionId);
+ $g->add(version::fullName($iVersionId), $oVersion->objectMakeUrl(), "center");
+ }
}
/* Display a link to the user's queued items,
@@ -55,17 +59,16 @@ function global_sidebar_login() {
if(!$_SESSION['current']->hasPriv("admin"))
{
$g->addmisc("");
- $g->addmisc("<a href=\"".BASE."queueditems.php\">Your queued items</a>");
+ $g->add("Your queued items", BASE."queueditems.php");
}
- }
- else
+ } else
{
$g->add("Log in", BASE."account.php?sCmd=login");
$g->add("Register", BASE."account.php?sCmd=new");
}
-
- $g->done();
+
+ $g->done();
}
?>
More information about the wine-cvs
mailing list