use List::MoreUtils qw(apply);
-sub new {
- my ($class, @slurp) = @_;
-
- my $self = $class->SUPER::new(@slurp);
-
- $self;
-}
-
sub stylesheets {
qw(css/icons16.css css/icons24.css)
}
my $anchor = $menuitem->{href};
- my %common_args = (
- l => $label,
- s => $spacer,
- id => "$id_prefix\_$id",
- );
+ my @common_args = ($label, $spacer, "$id_prefix\_$id");
if (!$level) { # toplevel
- push @items, { %common_args,
- i => "icon24 $icon_class", # make_image(size => 24, label => $item),
- c => 'm',
- };
+ push @items, [ @common_args, "icon24 $icon_class", 'm' ];
+ # make_image(size => 24, label => $item),
push @items, section_menu($menu, $item, "$id_prefix\_$id");
} elsif ($menuitem->{submenu}) {
- push @items, { %common_args,
- i => "icon16 submenu", #make_image(label => 'submenu'),
- c => 'sm',
- };
+ push @items, [ @common_args, "icon16 submenu", 'sm' ];
+ #make_image(label => 'submenu'),
push @items, section_menu($menu, $item, "$id_prefix\_$id");
} elsif ($menuitem->{module}) {
- push @items, { %common_args,
- i => "icon16 $icon_class", #make_image(size => 16, label => $item),
- h => $anchor,
- c => 'i',
- };
+ push @items, [ @common_args, "icon16 $icon_class", 'i', $anchor ];
+ #make_image(size => 16, label => $item),
}
} continue {
$id++;
[%- USE JSON %]
-$(function(){$([% JSON.json(sections) %]).each(function(i,b){var a=$('<a class="ml">').append($('<span class="mii ms">').append($('<div>').addClass(b.i)),$('<span class="mic">').append(b.l));if(b.h)a.attr('href', b.h);if(b.t)a.attr('target', b.t);$('#html-menu').append($('<div class="mi">').addClass(b.c).addClass(b.s).attr('id','mi'+b.id).append(a))});$('#html-menu div.i, #html-menu div.sm').not('[id^='+$.cookie('html-menu-selection')+'_]').hide();$('#html-menu div.m').each(function(){$(this).click(function(){$.cookie('html-menu-selection',$(this).attr('id'));$('#html-menu div.mi').not('div.m').not('[id^='+$(this).attr('id')+'_]').hide();$('#html-menu div.mi[id^='+$(this).attr('id')+'_]').toggle()})})})
+$(function(){$([% JSON.json(sections) %]).each(function(i,b){var a=$('<a class="ml">').append($('<span class="mii ms">').append($('<div>').addClass(b[3])),$('<span class="mic">').append(b[0]));if(b[5])a.attr('href', b[5]);$('#html-menu').append($('<div class="mi">').addClass(b[4]).addClass(b[1]).attr('id','mi'+b[2]).append(a))});$('#html-menu div.i, #html-menu div.sm').not('[id^='+$.cookie('html-menu-selection')+'_]').hide();$('#html-menu div.m').each(function(){$(this).click(function(){$.cookie('html-menu-selection',$(this).attr('id'));$('#html-menu div.mi').not('div.m').not('[id^='+$(this).attr('id')+'_]').hide();$('#html-menu div.mi[id^='+$(this).attr('id')+'_]').toggle()})})})