Author: Lars Michelsen <[email protected]>
Date: Mon Sep 5 08:54:32 2011 +0200
Committer: Lars Michelsen <[email protected]>
Commit-Date: Mon Sep 5 08:54:32 2011 +0200
Header menu handles map parent/child relations correctly
---
share/userfiles/templates/default.css | 11 ++++++--
share/userfiles/templates/default.header.html | 30 +++++++++++++-----------
2 files changed, 24 insertions(+), 17 deletions(-)
diff --git a/share/userfiles/templates/default.css
b/share/userfiles/templates/default.css
index f42612a..5744bf8 100644
--- a/share/userfiles/templates/default.css
+++ b/share/userfiles/templates/default.css
@@ -588,6 +588,11 @@ td#popupWindowContent a:hover
{color:#779D2A;text-decoration:underline}
.dropdown img {vertical-align:middle;margin-left:10px}
.dropdown ul
{margin:0;padding:0;list-style:none;width:205px;z-index:100;position:absolute;top:31px;display:none}
.dropdown li {margin:0;padding:0}
+.dropdown li.lvl2 a{padding-left:10px;width:188px}
+.dropdown li.lvl3 a{padding-left:20px;width:178px}
+.dropdown li.lvl4 a{padding-left:30px;width:168px}
+.dropdown li.lvl5 a{padding-left:40px;width:158px}
+.dropdown li.lvl5 a{padding-left:50px;width:148px}
.dropdown a, .dropdown a:active, .dropdown a:visited, .dropdown li.spacer,
.dropdown dl.subdropdown dt
{display:block;width:193px;background:#eaf0f2;margin:0;color:#43B3CF;text-decoration:none;border-left:1px
solid #a4a4a4;border-right:1px solid #a4a4a4;padding:5px;z-index:100}
.dropdown a.left, .dropdown a.left:active, .dropdown a.left:visited
{float:left;width:152px;border-right:0}
.dropdown a.right, .dropdown a.right:active, .dropdown a.right:visited
{float:right;width:30px;border-left:1px solid #43B3CF}
@@ -610,9 +615,9 @@ td#popupWindowContent a:hover
{color:#779D2A;text-decoration:underline}
#sidebar li a
{display:block;padding-left:20px;width:180px;color:#43B3CF;text-decoration:none;}
#sidebar li.lvl2 a{padding-left:30px;width:170px}
#sidebar li.lvl3 a{padding-left:40px;width:160px}
-#sidebar li.lvl3 a{padding-left:50px;width:150px}
-#sidebar li.lvl4 a{padding-left:60px;width:140px}
-#sidebar li.lvl5 a{padding-left:70px;width:130px}
+#sidebar li.lvl4 a{padding-left:50px;width:150px}
+#sidebar li.lvl5 a{padding-left:60px;width:140px}
+#sidebar li.lvl6 a{padding-left:70px;width:130px}
#sidebar li.open a.title {background:
url('../images/templates/default.folder_open.gif') no-repeat left #eaf0f2;}
#sidebar li.closed a.title {background:
url('../images/templates/default.folder_closed.gif') no-repeat left #eaf0f2;}
#sidebar li a:hover {background-color:#d9e1e4;color:#779D2A}
diff --git a/share/userfiles/templates/default.header.html
b/share/userfiles/templates/default.header.html
index 9b97030..2038da3 100644
--- a/share/userfiles/templates/default.header.html
+++ b/share/userfiles/templates/default.header.html
@@ -6,26 +6,28 @@
<li class="logo"><a href="http://www.nagvis.org/"><img
src="{$pathImages}/internal/logo_96x25.png" alt="NagVis" /></a></li>
<li onmouseover="!sidebarOpen() ? ddMenu('views',1) : void(0)"
onmouseout="ddMenuHide(['views'])" class="dropdown">
<span id="views-ddheader"
onclick="toggleSidebar(true);ddMenuHide(['views'])">{$langOpen} <img
src="{$pathTemplateImages}default.header_down.png" alt="∇" /></span>
+ {template headMaps maps pathBase type indent=1}
+ {foreach $maps map}
+ <li class="lvl{$indent}">
+ {if $map.configError == true}<a class="error"
href="#">{$map.mapAlias}</a>
+ {else}<a
href="{$pathBase}/frontend/nagvis-js/index.php?mod={$type}&act=view&show={$map.mapName}{$map.urlParams}">{$map.mapAlias}</a>
{/if}
+ </li>
+ {if $map.childs}
+ {headMaps $map.childs $pathBase $type $indent+1}
+ {/if}
+ {/foreach}
+ {/template}
<ul id="views-ddcontent">
{if $permittedOverview}
- <li><a
href="{$pathBase}/frontend/nagvis-js/index.php">{$langOverview}</a></li>
+ <li><a
href="{$pathBase}/frontend/nagvis-js/index.php">{$langOverview}</a></li>
{/if}
{if count($maps) > 0}
- <li class="spacer"><hr /></li>
- {foreach $maps map}<li>
- {if $map.configError == true}<a class="left error"
href="#">{$map.mapAlias}</a>
- {else}<a
href="{$pathBase}/frontend/nagvis-js/index.php?mod=Map&act=view&show={$map.mapName}{$map.urlParams}">{$map.mapAlias}</a>
{/if}
- </li>{/foreach}
+ <li class="spacer"><hr /></li>
+ {headMaps $maps $pathBase "Map"}
{/if}
{if count($automaps) > 0}
- <li class="spacer"><hr /></li>
- {foreach $automaps map}
- <li>{if isset($map) && $map.configError == True}
- <a class="error" href="#">{$map.mapAlias}</a>
- {else}
- <a
href="{$pathBase}/frontend/nagvis-js/index.php?mod=AutoMap&act=view&show={$map.mapName}{$map.urlParams}">{$map.mapAlias}</a>
- {/if}</li>
- {/foreach}
+ <li class="spacer"><hr /></li>
+ {headMaps $automaps $pathBase "Map"}
{/if}
<li class="spacer underline"></li>
</ul>
------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins