projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix für Bug 1081. Bei Buchung einer Einkaufsrechnung geht das Rabatt verloren. 1...
[kivitendo-erp.git]
/
bin
/
mozilla
/
menu.pl
diff --git
a/bin/mozilla/menu.pl
b/bin/mozilla/menu.pl
index
3da92a9
..
a8b4697
100644
(file)
--- a/
bin/mozilla/menu.pl
+++ b/
bin/mozilla/menu.pl
@@
-38,6
+38,7
@@
$menufile = "menu.ini";
use SL::Menu;
use Data::Dumper;
$menufile = "menu.ini";
use SL::Menu;
use Data::Dumper;
+use URI;
1;
1;
@@
-48,14
+49,18
@@
$framesize = ($ENV{HTTP_USER_AGENT} =~ /links/i) ? "240" : "190";
sub display {
$lxdebug->enter_sub();
sub display {
$lxdebug->enter_sub();
+ my $callback = $form->unescape($form->{callback});
+ $callback = URI->new($callback)->rel($callback) if $callback;
+ $callback = "login.pl?action=company_logo" if $callback =~ /^(\.\/)?$/;
+
$form->header;
print qq|
<frameset rows="28px,*" cols="*" framespacing="0" frameborder="0">
$form->header;
print qq|
<frameset rows="28px,*" cols="*" framespacing="0" frameborder="0">
- <frame src="kopf.pl
?login=$form->{login}&password=$form->{password}
" name="kopf" scrolling="NO">
+ <frame src="kopf.pl" name="kopf" scrolling="NO">
<frameset cols="$framesize,*" framespacing="0" frameborder="0" border="0" >
<frameset cols="$framesize,*" framespacing="0" frameborder="0" border="0" >
- <frame src="$form->{script}?
login=$form->{login}&password=$form->{password}&
action=acc_menu" name="acc_menu" scrolling="auto" noresize marginwidth="0">
- <frame src="
login.pl?login=$form->{login}&password=$form->{password}&action=company_logo
" name="main_window" scrolling="auto">
+ <frame src="$form->{script}?action=acc_menu" name="acc_menu" scrolling="auto" noresize marginwidth="0">
+ <frame src="
$callback
" name="main_window" scrolling="auto">
</frameset>
<noframes>
You need a browser that can read frames to see this page.
</frameset>
<noframes>
You need a browser that can read frames to see this page.
@@
-70,11
+75,8
@@
sub display {
sub acc_menu {
$lxdebug->enter_sub();
$mainlevel = $form->{level};
sub acc_menu {
$lxdebug->enter_sub();
$mainlevel = $form->{level};
- $mainlevel =~ s/
$mainlevel
--//g;
+ $mainlevel =~ s/
\Q$mainlevel\E
--//g;
my $menu = new Menu "$menufile";
my $menu = new Menu "$menufile";
- $menu = new Menu "custom_$menufile" if (-f "custom_$menufile");
- $menu = new Menu "$form->{login}_$menufile"
- if (-f "$form->{login}_$menufile");
$form->{title} = $locale->text('Accounting Menu');
$form->{title} = $locale->text('Accounting Menu');
@@
-109,7
+111,7
@@
sub section_menu {
$item = shift @menuorder;
$label = $item;
$ml = $item;
$item = shift @menuorder;
$label = $item;
$ml = $item;
- $label =~ s/
$level
--//g;
+ $label =~ s/
\Q$level\E
--//g;
$ml =~ s/--.*//;
if ($ml eq $mainlevel) { $zeige = 1; }
else { $zeige = 0; }
$ml =~ s/--.*//;
if ($ml eq $mainlevel) { $zeige = 1; }
else { $zeige = 0; }
@@
-118,9
+120,9
@@
sub section_menu {
$label_icon = $label . ".gif";
$mlab = $label;
$label = $locale->text($label);
$label_icon = $label . ".gif";
$mlab = $label;
$label = $locale->text($label);
-
+
# multi line hack, sschoeling jul06
# multi line hack, sschoeling jul06
- # if a label is too long, try to split it at whitespaces, then join it to chunks of less
+ # if a label is too long, try to split it at whitespaces, then join it to chunks of less
# than 20 chars and store it in an array.
# use this array later instead of the -ed label
@chunks = ();
# than 20 chars and store it in an array.
# use this array later instead of the -ed label
@chunks = ();
@@
-128,9
+130,10
@@
sub section_menu {
map {
if (($l += length $_) < 20) {
$chunks[$i] .= " $_";
map {
if (($l += length $_) < 20) {
$chunks[$i] .= " $_";
- } else {
- $l = length $_;
- $chunks[++$i] = $_;
+ } else {
+ $l = length $_;
+ $chunks[++$i] = $_;
+
}
} split / /, $label;
map { s/ / / } @chunks;
}
} split / /, $label;
map { s/ / / } @chunks;
@@
-141,7
+144,7
@@
sub section_menu {
if ($menu->{$item}{submenu}) {
$menu->{$item}{$item} = !$form->{$item};
if ($menu->{$item}{submenu}) {
$menu->{$item}{$item} = !$form->{$item};
- if ($form->{level} && $item =~ /^
$form->{level}
/) {
+ if ($form->{level} && $item =~ /^
\Q$form->{level}\E
/) {
# expand menu
if ($zeige) {
# expand menu
if ($zeige) {
@@
-201,7
+204,7
@@
sub section_menu {
} else {
my $ml_ = $form->escape($ml);
print
} else {
my $ml_ = $form->escape($ml);
print
- qq|<tr><td class="bg" height="22" align="left" valign="middle" ><img src="image/$item.png" style="vertical-align:middle"> <a href="menu.pl?action=acc_menu&level=$ml_
&login=$form->{login}&password=$form->{password}
" class="nohover">$label</a> </td></tr>\n|;
+ qq|<tr><td class="bg" height="22" align="left" valign="middle" ><img src="image/$item.png" style="vertical-align:middle"> <a href="menu.pl?action=acc_menu&level=$ml_" class="nohover">$label</a> </td></tr>\n|;
§ion_menu($menu, $item);
#print qq|<br>\n|;
§ion_menu($menu, $item);
#print qq|<br>\n|;