Revision 32fa785e
Von Moritz Bunkus vor mehr als 16 Jahren hinzugefügt
SL/Menu.pm | ||
---|---|---|
107 | 107 |
return $str; |
108 | 108 |
} |
109 | 109 |
|
110 |
sub menuitem_new { |
|
111 |
$main::lxdebug->enter_sub(); |
|
112 |
|
|
113 |
my ($self, $name, $item) = @_; |
|
114 |
|
|
115 |
my $form = $main::form; |
|
116 |
|
|
117 |
my $module = $self->{$name}->{module} || $form->{script}; |
|
118 |
my $action = $self->{$name}->{action}; |
|
119 |
|
|
120 |
$item->{target} = $self->{$name}->{target} || "main_window"; |
|
121 |
$item->{href} = $self->{$name}->{href} || "${module}?action=" . $form->escape($action); |
|
122 |
|
|
123 |
my @vars = qw(module target href); |
|
124 |
push @vars, $action unless ($self->{$name}->{href}); |
|
125 |
|
|
126 |
map { delete $self->{$name}{$_} } @vars; |
|
127 |
|
|
128 |
# add other params |
|
129 |
foreach my $key (keys %{ $self->{$name} }) { |
|
130 |
my ($value, $conf) = split(m/=/, $self->{$name}->{$key}, 2); |
|
131 |
$value = $myconfig->{$value} . "/$conf" if ($conf); |
|
132 |
$item->{href} .= "&" . $form->escape($key) . "=" . $form->escape($value); |
|
133 |
} |
|
134 |
|
|
135 |
$main::lxdebug->leave_sub(); |
|
136 |
} |
|
137 |
|
|
110 | 138 |
sub menuitem_v3 { |
111 | 139 |
$main::lxdebug->enter_sub(); |
112 | 140 |
|
... | ... | |
223 | 251 |
return $str; |
224 | 252 |
} |
225 | 253 |
|
226 |
sub menuitemNew { |
|
227 |
my ($self, $myconfig, $form, $item) = @_; |
|
228 |
|
|
229 |
my $module = $form->{script}; |
|
230 |
my $action = "section_menu"; |
|
231 |
|
|
232 |
#if ($self->{$item}{module}) { |
|
233 |
$module = $self->{$item}{module}; |
|
234 |
|
|
235 |
#} |
|
236 |
if ($self->{$item}{action}) { |
|
237 |
$action = $self->{$item}{action}; |
|
238 |
} |
|
239 |
|
|
240 |
my $level = $form->escape($item); |
|
241 |
my $str = qq|$module?action=$action&level=$level|; |
|
242 |
my @vars = qw(module action target href); |
|
243 |
|
|
244 |
if ($self->{$item}{href}) { |
|
245 |
$str = qq|$self->{$item}{href}|; |
|
246 |
@vars = qw(module target href); |
|
247 |
} |
|
248 |
|
|
249 |
map { delete $self->{$item}{$_} } @vars; |
|
250 |
|
|
251 |
# add other params |
|
252 |
foreach my $key (keys %{ $self->{$item} }) { |
|
253 |
$str .= "&" . $form->escape($key, 1) . "="; |
|
254 |
($value, $conf) = split(/=/, $self->{$item}{$key}, 2); |
|
255 |
$value = $myconfig->{$value} . "/$conf" if ($conf); |
|
256 |
$str .= $form->escape($value, 1); |
|
257 |
} |
|
258 |
|
|
259 |
$str .= " "; |
|
260 |
|
|
261 |
} |
|
262 |
|
|
263 | 254 |
sub access_control { |
264 | 255 |
$main::lxdebug->enter_sub(2); |
265 | 256 |
|
Auch abrufbar als: Unified diff
Das Javascript-Menü durch eine andere Implementation ersetzt, die auch unter dem Internet Explorer 7 funktioniert.