diff options
author | Tobi Oetiker <tobi@oetiker.ch> | 2008-04-26 14:56:56 +0200 |
---|---|---|
committer | Tobi Oetiker <tobi@oetiker.ch> | 2008-04-26 14:56:56 +0200 |
commit | ad4960d32b3d5bc6d8ee58dc5cb0f6553a36f21d (patch) | |
tree | 9f91d61b357ae0b453d505ac3ce7c82f42712199 /lib | |
parent | e1aa9c368e3ad73b576d4410ffc937d1d03c50f1 (diff) | |
download | smokeping-ad4960d32b3d5bc6d8ee58dc5cb0f6553a36f21d.tar.gz smokeping-ad4960d32b3d5bc6d8ee58dc5cb0f6553a36f21d.tar.xz |
integrated menuactive patch
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Smokeping.pm | 6 |
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/ / /g; my $menuadd =""; $menuadd = " " x (20 - length($menu)) if length($menu) < 20; - $print .= qq{<tr><td class="$class" colspan="2"> - <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"> - <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"> </td><td align="left">$prline</td></tr>} |