1 package SL::Layout::Javascript;
4 use parent qw(SL::Layout::Base);
6 use List::Util qw(max);
11 SL::Layout::None->new,
19 js/dhtmlsuite/menu-for-applications.js
21 $self->SUPER::use_javascript(@_);
24 sub javascripts_inline {
25 $_[0]->SUPER::javascripts_inline,
27 DHTMLSuite.createStandardObjects();
28 DHTMLSuite.configObj.setImagePath('image/dhtmlsuite/');
29 var menu_model = new DHTMLSuite.menuModel();
30 menu_model.addItemsFromMarkup('main_menu_model');
32 var menu_bar = new DHTMLSuite.menuBar();
33 menu_bar.addMenuItems(menu_model);
34 menu_bar.setTarget('main_menu_div');
40 $_[0]->SUPER::pre_content .
41 $_[0]->presenter->render("menu/menunew",
44 icon_path => sub { my $img = "image/icons/16x16/$_[0].png"; -f $img ? $img : () },
45 max_width => sub { 10 * max map { length $::locale->text($_->{name}) } @{ $_[0]{children} || [] } },
50 "<div id='content'>\n";
58 $_[0]->add_stylesheets(qw(
59 dhtmlsuite/menu-item.css
60 dhtmlsuite/menu-bar.css
64 $_[0]->SUPER::stylesheets;