Revision 15eda163
Von Sven Schöling vor fast 7 Jahren hinzugefügt
SL/Layout/MenuLeft.pm | ||
---|---|---|
3 | 3 |
use strict; |
4 | 4 |
use parent qw(SL::Layout::Base); |
5 | 5 |
|
6 |
use URI; |
|
7 |
|
|
8 | 6 |
use List::MoreUtils qw(apply); |
7 |
use SL::JSON qw(to_json); |
|
8 |
use URI; |
|
9 | 9 |
|
10 | 10 |
sub stylesheets { |
11 | 11 |
qw(icons16.css icons24.css menu.css) |
12 | 12 |
} |
13 | 13 |
|
14 | 14 |
sub javascripts_inline { |
15 |
my $self = shift; |
|
16 |
my $sections = [ section_menu($self->menu) ]; |
|
17 |
$self->presenter->render('menu/menu', |
|
18 |
sections => $sections, |
|
19 |
) |
|
15 |
"\$(function(){kivi.LeftMenu.init(@{[ to_json([ section_menu($_[0]->menu) ]) ]})});" |
|
20 | 16 |
} |
21 | 17 |
|
22 | 18 |
sub javascripts { |
23 | 19 |
qw( |
24 | 20 |
js/jquery.cookie.js |
21 |
js/kivi.LeftMenu.js |
|
25 | 22 |
); |
26 | 23 |
} |
27 | 24 |
|
Auch abrufbar als: Unified diff
HTML Menü: Javascript ausgelagert in eigene Datei