git-svn-id: file:///svn-source/pmgr/branches/pre_0.1_work_20090819@752 97e9348a-65ac-dc4b-aefc-98561f571b83
75 lines
2.0 KiB
PHP
75 lines
2.0 KiB
PHP
<?php /* -*- mode:PHP -*- */
|
|
|
|
/* sidemenu.ctp */
|
|
/*
|
|
*
|
|
* @filesource
|
|
* @copyright Copyright 2009, Abijah Perkins
|
|
* @package pmgr
|
|
*/
|
|
|
|
// REVISIT <AP>: 20090823
|
|
// Add way to slide the entire menu off the page
|
|
|
|
echo('<DIV ID="sidemenu">' . "\n");
|
|
|
|
$section = 0;
|
|
$active_section = null;
|
|
foreach ($menu['areas'] AS $area_name => $area) {
|
|
if (empty($area['subareas']))
|
|
continue;
|
|
|
|
foreach ($area['subareas'] AS $subarea_name => $subarea) {
|
|
if (empty($subarea['priorities']))
|
|
continue;
|
|
|
|
if (!isset($active_section) &&
|
|
!empty($menu['active']['area']) && $area_name == $menu['active']['area'] &&
|
|
(empty($menu['active']['subarea']) || $subarea_name == $menu['active']['subarea']))
|
|
$active_section = $section;
|
|
|
|
++$section;
|
|
|
|
echo('<H3' .
|
|
//' id="sidemenu-section-'.$area_name.'-'.$subarea_name.'"' .
|
|
' 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['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");
|
|
//pr(compact('section', 'active_section'));
|
|
|
|
?>
|
|
|
|
<script type="text/javascript"><!--
|
|
jQuery(document).ready(function(){
|
|
jQuery('#sidemenu').accordion
|
|
({ fillSpace : true,
|
|
event : 'mouseover',
|
|
<?php if (isset($active_section)) echo "active : $active_section,\n"; ?>
|
|
<?php /* REVISIT <AP>: 20090823
|
|
* Prevent animation until we can figure out why we
|
|
* get animation width jitter */ ?>
|
|
animated : false,
|
|
});
|
|
});
|
|
|
|
--></script>
|