Revision 3880d657
Von Sven Schöling vor etwa 12 Jahren hinzugefügt
bin/mozilla/menu.pl | ||
---|---|---|
44 | 44 |
|
45 | 45 |
use List::MoreUtils qw(apply); |
46 | 46 |
|
47 |
# end of main |
|
48 |
|
|
49 |
sub display { |
|
47 |
sub render { |
|
50 | 48 |
$::lxdebug->enter_sub; |
51 | 49 |
|
52 |
my $callback = $::form->unescape($::form->{callback}); |
|
53 |
$callback = URI->new($callback)->rel($callback) if $callback; |
|
54 |
$callback = "login.pl?action=company_logo" if $callback =~ /^(\.\/)?$/; |
|
55 |
my $framesize = _calc_framesize(); |
|
56 |
|
|
57 |
$::form->header(doctype => 'frameset'); |
|
58 |
|
|
59 |
print qq| |
|
60 |
<frameset rows="28px,*" cols="*" framespacing="0" frameborder="0"> |
|
61 |
<frame src="controller.pl?action=FrameHeader/header" scrolling="NO"> |
|
62 |
<frameset cols="$framesize,*" framespacing="0" frameborder="0" border="0" id="menuframe" name="menuframe"> |
|
63 |
<frame src="$::form->{script}?action=acc_menu" name="acc_menu" scrolling="auto" noresize marginwidth="0"> |
|
64 |
<frame src="$callback" name="main_window" scrolling="auto"> |
|
65 |
</frameset> |
|
66 |
<noframes> |
|
67 |
You need a browser that can read frames to see this page. |
|
68 |
</noframes> |
|
69 |
</frameset> |
|
70 |
</HTML> |
|
71 |
|; |
|
72 |
|
|
73 |
$::lxdebug->leave_sub; |
|
74 |
} |
|
75 |
|
|
76 |
sub acc_menu { |
|
77 |
$::lxdebug->enter_sub; |
|
50 |
$::form->use_stylesheet(qw(css/icons16.css css/icons24.css)); |
|
78 | 51 |
|
79 |
$::form->{stylesheet} = [ qw(css/icons16.css css/icons24.css ) ]; |
|
80 |
|
|
81 |
my $framesize = _calc_framesize() - 2; |
|
82 | 52 |
my $menu = Menu->new("menu.ini"); |
83 |
$::form->{title} = $::locale->text('kivitendo'); |
|
84 |
$::form->header; |
|
85 | 53 |
|
86 | 54 |
my $sections = [ section_menu($menu) ]; |
87 | 55 |
|
88 |
print $::form->parse_html_template('menu/menu', { |
|
89 |
framesize => $framesize, |
|
56 |
$::form->parse_html_template('menu/menu', { |
|
90 | 57 |
sections => $sections, |
58 |
inline => 1, |
|
91 | 59 |
}); |
92 |
|
|
93 |
$::lxdebug->leave_sub; |
|
94 | 60 |
} |
95 | 61 |
|
96 | 62 |
sub section_menu { |
97 |
$::lxdebug->enter_sub; |
|
63 |
$::lxdebug->enter_sub(2);
|
|
98 | 64 |
my ($menu, $level, $id_prefix) = @_; |
99 | 65 |
my @menuorder = $menu->access_control(\%::myconfig, $level); |
100 | 66 |
my @items; |
... | ... | |
114 | 80 |
|
115 | 81 |
$menuitem->{module} ||= $::form->{script}; |
116 | 82 |
$menuitem->{action} ||= "section_menu"; |
117 |
$menuitem->{target} ||= "main_window"; |
|
118 | 83 |
$menuitem->{href} ||= "$menuitem->{module}?action=$menuitem->{action}"; |
119 | 84 |
|
120 | 85 |
# add other params |
... | ... | |
159 | 124 |
$id++; |
160 | 125 |
} |
161 | 126 |
|
162 |
$::lxdebug->leave_sub; |
|
127 |
$::lxdebug->leave_sub(2);
|
|
163 | 128 |
return @items; |
164 | 129 |
} |
165 | 130 |
|
Auch abrufbar als: Unified diff
Erste Version Frameless