From 0335c8271023028243ee899037f678d8e0eaa3ce Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Mon, 5 Jul 2010 15:45:22 +0000 Subject: [PATCH] - Template menus with now template (!) act as simple separators in the menu... should use MenuGroup to be not top-level instead (??) SVN:trunk[559] --- application/menunode.class.inc.php | 19 +++++++++++++++++-- css/light-grey.css | 6 ++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/application/menunode.class.inc.php b/application/menunode.class.inc.php index fc736f9f7..0840dc657 100644 --- a/application/menunode.class.inc.php +++ b/application/menunode.class.inc.php @@ -130,9 +130,18 @@ class ApplicationMenu { $index = $aMenu['index']; $oMenu = self::GetMenuNode($index); - $oPage->AddToMenu('
  • '.$oMenu->GetTitle().'
  • '); - $aCurrentMenu = self::$aMenusIndex[$index]; $aChildren = self::GetChildren($index); + $sCSSClass = (count($aChildren) > 0) ? ' class="submenu"' : ''; + $sHyperlink = $oMenu->GetHyperlink($aExtraParams); + if ($sHyperlink != '') + { + $oPage->AddToMenu(''.$oMenu->GetTitle().''); + } + else + { + $oPage->AddToMenu(''.$oMenu->GetTitle().''); + } + $aCurrentMenu = self::$aMenusIndex[$index]; if ($iActiveMenu == $index) { $bActive = true; @@ -355,6 +364,12 @@ class TemplateMenuNode extends MenuNode $this->sTemplateFile = $sTemplateFile; } + public function GetHyperlink($aExtraParams) + { + if ($this->sTemplateFile == '') return ''; + return parent::GetHyperlink($aExtraParams); + } + public function RenderContent(WebPage $oPage, $aExtraParams = array()) { $sTemplate = @file_get_contents($this->sTemplateFile); diff --git a/css/light-grey.css b/css/light-grey.css index 8968f77c7..0f5893f48 100644 --- a/css/light-grey.css +++ b/css/light-grey.css @@ -236,6 +236,11 @@ input.textSearch { .ui-accordion-content ul { list-style:none; padding-left:16px; + margin-top: 8px; +} + +.ui-accordion-content li.submenu { + margin-top: 8px; } .ui-accordion-content ul ul { @@ -244,6 +249,7 @@ input.textSearch { list-style:none; border: 0; } + .nothing { noborder-top: 1px solid #8b8b8b; padding: 4px 0px 0px 16px;