Revision da80eb32
Von Sven Donath vor etwa 14 Jahren hinzugefügt
bin/mozilla/menu.pl | ||
---|---|---|
33 | 33 |
# CHANGE LOG: |
34 | 34 |
# DS. 2002-03-25 Created |
35 | 35 |
# 2004-12-14 - New Optik - Marco Welter <mawe@linux-studio.de> |
36 |
# 2010-08-19 - Icons for sub entries and one click
|
|
36 |
# 2010-08-19 - Icons for sub entries and single click behavior, unlike XUL-Menu
|
|
37 | 37 |
# JS switchable HTML-menu - Sven Donath <lxo@dexo.de> |
38 | 38 |
####################################################################### |
39 | 39 |
|
... | ... | |
51 | 51 |
sub display { |
52 | 52 |
$main::lxdebug->enter_sub(); |
53 | 53 |
|
54 |
my $form = $main::form; |
|
54 |
my $form = $main::form;
|
|
55 | 55 |
|
56 |
my $callback = $form->unescape($form->{callback});
|
|
57 |
$callback = URI->new($callback)->rel($callback) if $callback;
|
|
58 |
$callback = "login.pl?action=company_logo" if $callback =~ /^(\.\/)?$/;
|
|
59 |
my $framesize = _calc_framesize();
|
|
56 |
my $callback = $form->unescape($form->{callback}); |
|
57 |
$callback = URI->new($callback)->rel($callback) if $callback; |
|
58 |
$callback = "login.pl?action=company_logo" if $callback =~ /^(\.\/)?$/; |
|
59 |
my $framesize = _calc_framesize(); |
|
60 | 60 |
|
61 | 61 |
$form->header; |
62 | 62 |
|
... | ... | |
82 | 82 |
|
83 | 83 |
my $form = $main::form; |
84 | 84 |
my $locale = $main::locale; |
85 |
my $framesize = _calc_framesize(); # how to get it into kopf.pl or vice versa?
|
|
85 |
my $framesize = _calc_framesize(); |
|
86 | 86 |
|
87 | 87 |
$mainlevel = $form->{level}; |
88 | 88 |
$mainlevel =~ s/\Q$mainlevel\E--//g; |
... | ... | |
94 | 94 |
|
95 | 95 |
print qq| |
96 | 96 |
<body class="menu"> |
97 |
|
|
98 |
|; |
|
97 |
|
|
98 |
|;
|
|
99 | 99 |
print qq|<div align="left">\n<table width="| |
100 |
. $framesize
|
|
100 |
. ($framesize-2)
|
|
101 | 101 |
. qq|" border="0">\n|; |
102 | 102 |
|
103 | 103 |
§ion_menu($menu); |
... | ... | |
115 | 115 |
$main::lxdebug->enter_sub(); |
116 | 116 |
my ($menu, $level) = @_; |
117 | 117 |
|
118 |
my $form = $main::form; |
|
119 |
my %myconfig = %main::myconfig; |
|
120 |
my $locale = $main::locale; |
|
118 |
my $form = $main::form; |
|
119 |
my %myconfig = %main::myconfig; |
|
120 |
my $locale = $main::locale; |
|
121 |
my $is_links_browser = 1; |
|
122 |
if ( _calc_framesize() eq 240) { $is_links_browser = 0; } |
|
121 | 123 |
|
122 | 124 |
my $zeige; |
123 | 125 |
|
... | ... | |
199 | 201 |
if ($zeige) { |
200 | 202 |
if (scalar @chunks <= 1) { |
201 | 203 |
|
202 |
qq|<tr><td class="hover" height="16" >$spacer|
|
|
204 |
qq|<tr><td class="hover" height="16" >$spacer| |
|
203 | 205 |
. $menu->menuitem(\%myconfig, \%$form, $item, $level) ; |
204 |
|
|
205 |
if (-f "image/icons/16x16/$label_icon") |
|
206 |
{ print
|
|
207 |
qq|<img src="image/icons/16x16/$label_icon" border="0" style="vertical-align:text-top" title="|
|
|
208 |
. $label
|
|
209 |
. qq|"> | }
|
|
206 |
|
|
207 |
if (-f "image/icons/16x16/$label_icon" && ($is_links_browser))
|
|
208 |
|
|
209 |
qq|<img src="image/icons/16x16/$label_icon" border="0" style="vertical-align:text-top" title="| |
|
210 |
. $label |
|
211 |
. qq|"> | } |
|
210 | 212 |
else { |
211 |
print qq|<img src="image/unterpunkt.png" border="0" style="vertical-align:text-top">|; |
|
213 |
if ($is_links_browser) { |
|
214 |
print qq|<img src="image/unterpunkt.png" border="0" style="vertical-align:text-top">|; |
|
215 |
} |
|
212 | 216 |
} |
213 |
|
|
217 |
|
|
214 | 218 |
|
215 | 219 |
qq|$label</a></td></tr>\n|; |
216 | 220 |
} else { |
... | ... | |
231 | 235 |
} else { |
232 | 236 |
my $ml_ = $form->escape($ml); |
233 | 237 |
|
234 |
qq|<tr><td class="bg" height="24" align="left" valign="middle"><a href="menu.pl?action=acc_menu&level=$ml_" class="nohover" title="$label"><img src="image/icons/24x24/$item.png" border="0" style="vertical-align:middle" title="$label"> $label</a> </td></tr>\n|; |
|
238 |
qq|<tr><td class="bg" height="24" align="left" valign="middle"> |
|
239 |
<a href="menu.pl?action=acc_menu&level=$ml_" class="nohover" title="$label">|; |
|
240 |
if ($is_links_browser) { |
|
241 |
print qq|<img src="image/icons/24x24/$item.png" border="0" style="vertical-align:middle" title="$label">|; |
|
242 |
} |
|
243 |
print qq| $label</a> </td></tr>\n|; |
|
235 | 244 |
§ion_menu($menu, $item); |
236 | 245 |
|
237 | 246 |
print qq|\n|; |
... | ... | |
248 | 257 |
|
249 | 258 |
return $is_mobile_browser && $is_mobile_style ? 130 |
250 | 259 |
: $is_lynx_browser ? 240 |
251 |
: 180;
|
|
260 |
: 200;
|
|
252 | 261 |
} |
253 | 262 |
|
254 | 263 |
1; |
Auch abrufbar als: Unified diff
Zweiter Anlauf: Das (linksseitige) HTML-Menü komaptibel zum Textbrowser Links gemacht.
(siehe Commits d2d63d und 9d5514)
Weiterhin werden die Bedienelemente (HTML-Links) im Kopf nur angezeigt,
wenn nicht der Browser Links oder Links2 verwendet wird, da sie auf JavaScript
basieren und somit keine Funktion hätten.
Entgegen der zurück genommenen Version arbeitet es jetzt ohne globale Variable.
Das Menü Ein-/Ausklappen ist jetzt voll JavaScript-basiert.