Revision 473686a9
Von Holger Lindemann vor fast 16 Jahren hinzugefügt
SL/Menu.pm | ||
---|---|---|
107 | 107 |
return $str; |
108 | 108 |
} |
109 | 109 |
|
110 |
sub menuitem_js { |
|
111 |
my ($self, $myconfig, $form, $item) = @_; |
|
112 |
|
|
113 |
my $module = $form->{script}; |
|
114 |
my $action = "section_menu"; |
|
115 |
|
|
116 |
#if ($self->{$item}{module}) { |
|
117 |
$module = $self->{$item}{module}; |
|
118 |
|
|
119 |
#} |
|
120 |
if ($self->{$item}{action}) { |
|
121 |
$action = $self->{$item}{action}; |
|
122 |
} |
|
123 |
|
|
124 |
my $level = $form->escape($item); |
|
125 |
my $str = |
|
126 |
qq|$module?action=$action&level=$level&login=$form->{login}&password=$form->{password}|; |
|
127 |
my @vars = qw(module action target href); |
|
128 |
|
|
129 |
if ($self->{$item}{href}) { |
|
130 |
$str = qq|$self->{$item}{href}|; |
|
131 |
@vars = qw(module target href); |
|
132 |
} |
|
133 |
|
|
134 |
map { delete $self->{$item}{$_} } @vars; |
|
135 |
|
|
136 |
# add other params |
|
137 |
foreach my $key (keys %{ $self->{$item} }) { |
|
138 |
$str .= "&" . $form->escape($key, 1) . "="; |
|
139 |
($value, $conf) = split(/=/, $self->{$item}{$key}, 2); |
|
140 |
$value = $myconfig->{$value} . "/$conf" if ($conf); |
|
141 |
$str .= $form->escape($value, 1); |
|
142 |
} |
|
143 |
|
|
144 |
$str .= " "; |
|
145 |
|
|
146 |
} |
|
147 |
|
|
110 | 148 |
sub menuitem_new { |
111 | 149 |
$main::lxdebug->enter_sub(); |
112 | 150 |
|
Auch abrufbar als: Unified diff
altes JS-Menu wieder aktiviert - ist nicht schön, aber funktioniert besser