Modified the menu to use the accordion widget, which is slick and allows it to match the current theme.

git-svn-id: file:///svn-source/pmgr/branches/pre_0.1_work_20090819@745 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-08-23 18:30:17 +00:00
parent 65c3f28484
commit 11be0ff9cb
2 changed files with 36 additions and 34 deletions

View File

@@ -8,6 +8,11 @@
* @package pmgr
*/
// REVISIT <AP>: 20090823
// Add way to slide the entire menu off the page
echo('<DIV ID="sidemenu">' . "\n");
foreach ($menu AS $area) {
if (empty($area['subarea']))
continue;
@@ -16,21 +21,37 @@ foreach ($menu AS $area) {
if (empty($subarea['priorities']))
continue;
echo('<DIV CLASS="header">' . $subarea['name'] . '</DIV>' . "\n");
echo('<H3 class="sidemenu-header">' . $subarea['name'] . "</H3>\n");
echo('<DIV class="sidemenu-content">' . "\n");
foreach ($subarea['priorities'] AS $priority) {
foreach ($priority AS $item) {
if (isset($item['header']))
echo('<DIV CLASS="header">' . $item['name'] . '</DIV>' . "\n");
elseif (isset($item['hr']))
echo('<HR>' . "\n");
elseif (isset($item['url']))
echo('<DIV CLASS="item">'
if (isset($item['url'])) {
echo('<DIV CLASS="sidemenu-item">'
. $html->link($item['name'], $item['url'],
isset($item['htmlAttributes']) ? $item['htmlAttributes'] : null,
isset($item['confirmMessage']) ? $item['confirmMessage'] : null,
isset($item['escapeTitle']) ? $item['escapeTitle'] : null)
. '</DIV>' . "\n");
}
}
}
echo('</DIV>' . "\n");
}
}
echo('</DIV>' . "\n");
?>
<script type="text/javascript"><!--
jQuery(document).ready(function(){
jQuery('#sidemenu').accordion
({ fillSpace : true,
event: 'mouseover',
<?php /* REVISIT <AP>: 20090823
* Prevent animation until we can figure out why we
* get animation width jitter */ ?>
animated : false,
});
});
--></script>