projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Locale: Bei parase_date_string undef sofort undef zurückgeben.
[kivitendo-erp.git]
/
SL
/
Layout
/
MenuLeft.pm
diff --git
a/SL/Layout/MenuLeft.pm
b/SL/Layout/MenuLeft.pm
index
2cee4ea
..
14ee2ea
100644
(file)
--- a/
SL/Layout/MenuLeft.pm
+++ b/
SL/Layout/MenuLeft.pm
@@
-14,13
+14,16
@@
sub stylesheets {
sub javascripts_inline {
my $self = shift;
my $sections = [ section_menu($self->menu) ];
sub javascripts_inline {
my $self = shift;
my $sections = [ section_menu($self->menu) ];
- $self->
render('menu/menu', { partial => 1, no_output => 1 }
,
+ $self->
presenter->render('menu/menu'
,
sections => $sections,
)
}
sub javascripts {
sections => $sections,
)
}
sub javascripts {
- 'js/jquery.cookie.js';
+ qw(
+ js/jquery.cookie.js
+ js/switchmenuframe.js
+ );
}
sub pre_content {
}
sub pre_content {
@@
-47,7
+50,7
@@
sub section_menu {
my $menuitem = $menu->{$item};
my $olabel = apply { s/.*--// } $item;
my $ml = apply { s/--.*// } $item;
my $menuitem = $menu->{$item};
my $olabel = apply { s/.*--// } $item;
my $ml = apply { s/--.*// } $item;
- my $icon_class = apply {
y/ /-/
} $item;
+ my $icon_class = apply {
$_ =lc $_; s/[^a-z0-9_-]/-/g
} $item;
my $spacer = "s" . (0 + $item =~ s/--/--/g);
next if $level && $item ne "$level--$olabel";
my $spacer = "s" . (0 + $item =~ s/--/--/g);
next if $level && $item ne "$level--$olabel";
@@
-67,8
+70,6
@@
sub section_menu {
$menuitem->{href} .= $::form->escape($value, 1);
}
$menuitem->{href} .= $::form->escape($value, 1);
}
- my $anchor = $menuitem->{href};
-
my @common_args = ($label, $spacer, "$id_prefix\_$id");
if (!$level) { # toplevel
my @common_args = ($label, $spacer, "$id_prefix\_$id");
if (!$level) { # toplevel
@@
-80,7
+81,7
@@
sub section_menu {
#make_image(label => 'submenu'),
push @items, section_menu($menu, $item, "$id_prefix\_$id");
} elsif ($menuitem->{module}) {
#make_image(label => 'submenu'),
push @items, section_menu($menu, $item, "$id_prefix\_$id");
} elsif ($menuitem->{module}) {
- push @items, [ @common_args, "icon16 $icon_class", 'i', $
anchor
];
+ push @items, [ @common_args, "icon16 $icon_class", 'i', $
menuitem->{href}, $menuitem->{target}
];
#make_image(size => 16, label => $item),
}
} continue {
#make_image(size => 16, label => $item),
}
} continue {
@@
-126,6
+127,8
@@
Each entry is another array with the following fields:
2: unique id
3: icon classes
4: role classes
2: unique id
3: icon classes
4: role classes
+ 5: href
+ 6: target
From each entry the following dom will be generated, with [0] being entry 0 of
the data array:
From each entry the following dom will be generated, with [0] being entry 0 of
the data array: