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.
This commit is contained in:
@@ -37,20 +37,24 @@ class htmlmenu {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* add a table row */
|
/* 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";
|
// 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
|
} 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)
|
function done($form = null)
|
||||||
|
|||||||
@@ -37,8 +37,9 @@ function global_sidebar_login() {
|
|||||||
$iAppsRejected = application::objectGetEntriesCount(true, true) +
|
$iAppsRejected = application::objectGetEntriesCount(true, true) +
|
||||||
version::objectGetEntriesCount(true, true);
|
version::objectGetEntriesCount(true, true);
|
||||||
if($iAppsRejected && !$_SESSION['current']->hasPriv("admin"))
|
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']);
|
$aMonitored = Monitor::getVersionsMonitored($_SESSION['current']);
|
||||||
if($aMonitored)
|
if($aMonitored)
|
||||||
@@ -47,7 +48,10 @@ function global_sidebar_login() {
|
|||||||
$g->addmisc("You monitor:\n");
|
$g->addmisc("You monitor:\n");
|
||||||
|
|
||||||
while(list($i, list($iAppId, $iVersionId)) = each($aMonitored))
|
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,
|
/* Display a link to the user's queued items,
|
||||||
@@ -55,11 +59,10 @@ function global_sidebar_login() {
|
|||||||
if(!$_SESSION['current']->hasPriv("admin"))
|
if(!$_SESSION['current']->hasPriv("admin"))
|
||||||
{
|
{
|
||||||
$g->addmisc("");
|
$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("Log in", BASE."account.php?sCmd=login");
|
||||||
$g->add("Register", BASE."account.php?sCmd=new");
|
$g->add("Register", BASE."account.php?sCmd=new");
|
||||||
|
|||||||
Reference in New Issue
Block a user