Use CSS instead of JavaScript for menu items
This commit is contained in:
committed by
Chris Morgan
parent
0f41ee390c
commit
6808c187eb
@@ -63,8 +63,9 @@ p.indent { padding-left: 1em; padding-right: 1em;}
|
|||||||
.menuTitle { font-size: 12px; color: #ffffff; font-weight: bold; text-decoration: none; }
|
.menuTitle { font-size: 12px; color: #ffffff; font-weight: bold; text-decoration: none; }
|
||||||
.menuTitle:visited { font-size: 12px; color: #ffffff; font-weight: bold; text-decoration: none; }
|
.menuTitle:visited { font-size: 12px; color: #ffffff; font-weight: bold; text-decoration: none; }
|
||||||
.menuTitle:hover { font-size: 12px; color: #ffffff; font-weight: bold; text-decoration: none; }
|
.menuTitle:hover { font-size: 12px; color: #ffffff; font-weight: bold; text-decoration: none; }
|
||||||
.menuLink { font-size: 11px; color: #ffffff; font-weight: bold; }
|
.menuLink { padding-left: 4px; padding-top: 5px; padding-bottom: 5px; background-color: #ffffff; font-size: 11px; width: 140px; display: block; }
|
||||||
.menuItem { font-size: 11px; color: #000000; }
|
.menulink:hover { background-color: #e0e6ff; }
|
||||||
|
.menuItem { padding-left: 4px; padding-top: 5px; padding-bottom: 5px; background-color: #ffffff; font-size: 11px; width: 140px; display: block; }
|
||||||
.menuItem:visited { font-size: 11px; color: #000000; }
|
.menuItem:visited { font-size: 11px; color: #000000; }
|
||||||
.menuItem:hover { font-size: 11px; color: #A50D0D; }
|
.menuItem:hover { font-size: 11px; color: #A50D0D; }
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class htmlmenu {
|
|||||||
<td>
|
<td>
|
||||||
<table width="155" border="0" cellspacing="0" cellpadding="1">
|
<table width="155" border="0" cellspacing="0" cellpadding="1">
|
||||||
<tr class="topMenu"><td>
|
<tr class="topMenu"><td>
|
||||||
<table width="100%" border="0" cellspacing="0" cellpadding="5">
|
<table width="100%" border="0" cellspacing="0" cellpadding="5"><tr><td class="sidemenu">
|
||||||
';
|
';
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -43,38 +43,23 @@ class htmlmenu {
|
|||||||
|
|
||||||
if($shUrl)
|
if($shUrl)
|
||||||
{
|
{
|
||||||
$oTableCell = new TableCell("<span class=MenuItem> <u>".
|
echo "<a href=\"$shUrl\" class=\"menuLink\">$sName</a>";
|
||||||
"<a href=\"$shUrl\">$sName</a></u></span>");
|
|
||||||
|
|
||||||
$oHighlightColor = new Color(0xe0, 0xe6, 0xff);
|
|
||||||
$oInactiveColor = new Color(0xff, 0xff, 0xff);
|
|
||||||
$oTableRowHighlight = new TableRowHighlight($oHighlightColor, $oInactiveColor);
|
|
||||||
|
|
||||||
$oTableRowClick = new TableRowClick($shUrl);
|
|
||||||
$oTableRowClick->SetHighlight($oTableRowHighlight);
|
|
||||||
|
|
||||||
$oTableRow->SetRowClick($oTableRowClick);
|
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
$oTableCell = new TableCell("<span class=menuItem> $sName</span></td></tr>");
|
echo "<div class=\"menuItem\">$sName</div>";
|
||||||
}
|
}
|
||||||
$oTableCell->SetAlign($sAlign);
|
|
||||||
$oTableCell->SetWidth("100%");
|
|
||||||
|
|
||||||
$oTableRow->SetClass("sidemenu");
|
|
||||||
$oTableRow->AddCell($oTableCell);
|
|
||||||
|
|
||||||
echo $oTableRow->GetString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function addmisc($sStuff, $sAlign = "left")
|
function addmisc($sStuff, $sAlign = "left")
|
||||||
{
|
{
|
||||||
echo " <tr class=sideMenu><td width='100%' align=$sAlign><span class=menuItem> $sStuff</span></td></tr>\n";
|
echo "<div align=\"$sAlign\" class=\"menuItem\">$sStuff</div>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
function done($form = null)
|
function done($form = null)
|
||||||
{
|
{
|
||||||
echo '
|
echo '
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
Reference in New Issue
Block a user