summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTobi Oetiker <tobi@oetiker.ch>2008-04-26 14:56:56 +0200
committerTobi Oetiker <tobi@oetiker.ch>2008-04-26 14:56:56 +0200
commitad4960d32b3d5bc6d8ee58dc5cb0f6553a36f21d (patch)
tree9f91d61b357ae0b453d505ac3ce7c82f42712199 /lib
parente1aa9c368e3ad73b576d4410ffc937d1d03c50f1 (diff)
downloadsmokeping-ad4960d32b3d5bc6d8ee58dc5cb0f6553a36f21d.tar.gz
smokeping-ad4960d32b3d5bc6d8ee58dc5cb0f6553a36f21d.tar.xz
integrated menuactive patch
Diffstat (limited to 'lib')
-rw-r--r--lib/Smokeping.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm
index 50fad0f..db0e1b9 100644
--- a/lib/Smokeping.pm
+++ b/lib/Smokeping.pm
@@ -660,7 +660,11 @@ sub target_menu($$$$;$){
$menu =~ s/ /&nbsp;/g;
my $menuadd ="";
$menuadd = "&nbsp;" x (20 - length($menu)) if length($menu) < 20;
- $print .= qq{<tr><td class="$class" colspan="2">&nbsp;-&nbsp;<a class="menulink" HREF="$path$key$suffix">$menu</a>$menuadd</td></tr>\n};
+ my $menuclass = "menulink";
+ if ($key eq $current and !@$open) {
+ $menuclass = "menulinkactive";
+ }
+ $print .= qq{<tr><td class="$class" colspan="2">&nbsp;-&nbsp;<a class="$menuclass" HREF="$path$key$suffix">$menu</a>$menuadd</td></tr>\n};
if ($key eq $current){
my $prline = target_menu $tree->{$key}, $open, "$path$key.",$filter, $suffix;
$print .= qq{<tr><td class="$class">&nbsp;&nbsp;</td><td align="left">$prline</td></tr>}