From de763d70b4b2e0501565e579fb4726e033594589 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stephan=20K=C3=B6hler?= Date: Fri, 23 Sep 2005 14:05:08 +0000 Subject: [PATCH] =?utf8?q?Neues=20Menu=20von=20Holger=20L.=20-Wenn=20manue?= =?utf8?q?ll=20eingespielt=20vorher=20makesymlinks=20und=20locales.pl=20au?= =?utf8?q?sf=C3=BChren!=20-Auswahl=20=C3=BCber=20Programm->Benutzereinstel?= =?utf8?q?lungen=20"Setup=20Menu"=20New/Old,=20dann=20ab-=20und=20neuanmel?= =?utf8?q?den.=20-Die=20Auswahl=20im=20der=20Adminmaske=20funktioniert=20n?= =?utf8?q?och=20nicht!?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Menu.pm | 42 +++- SL/User.pm | 2 +- bin/mozilla/am.pl | 90 ++++----- bin/mozilla/login.pl | 12 +- bin/mozilla/menunew.pl | 436 +++++++++++++++++++++++++++++++++++++++++ locale/de/all | 2 +- locale/de/am | 2 +- locale/de/locales.pl | 8 +- makesymlinks | 2 +- 9 files changed, 534 insertions(+), 62 deletions(-) create mode 100644 bin/mozilla/menunew.pl diff --git a/SL/Menu.pm b/SL/Menu.pm index b10fc67b4..0bdf945e4 100644 --- a/SL/Menu.pm +++ b/SL/Menu.pm @@ -67,8 +67,10 @@ sub menuitem { } my $level = $form->escape($item); - my $str = + + my $str = qq|{path}&action=$action&level=$level&login=$form->{login}&password=$form->{password}|; + my @vars = qw(module action target href); if ($self->{$item}{href}) { @@ -97,6 +99,44 @@ sub menuitem { return $str; } +sub menuitemNew { + my ($self, $myconfig, $form, $item) = @_; + + my $module = $form->{script}; + my $action = "section_menu"; + + #if ($self->{$item}{module}) { + $module = $self->{$item}{module}; + + #} + if ($self->{$item}{action}) { + $action = $self->{$item}{action}; + } + + my $level = $form->escape($item); + my $str = + qq|$module?path=$form->{path}&action=$action&level=$level&login=$form->{login}&password=$form->{password}|; + my @vars = qw(module action target href); + + if ($self->{$item}{href}) { + $str = qq|$self->{$item}{href}|; + @vars = qw(module target href); + } + + map { delete $self->{$item}{$_} } @vars; + + # add other params + foreach my $key (keys %{ $self->{$item} }) { + $str .= "&" . $form->escape($key, 1) . "="; + ($value, $conf) = split /=/, $self->{$item}{$key}, 2; + $value = $myconfig->{$value} . "/$conf" if ($conf); + $str .= $form->escape($value, 1); + } + + $str .= " "; + +} + sub access_control { $main::lxdebug->enter_sub(); diff --git a/SL/User.pm b/SL/User.pm index a034e033f..9fa0035c6 100644 --- a/SL/User.pm +++ b/SL/User.pm @@ -841,7 +841,7 @@ sub config_vars { currency dateformat dbconnect dbdriver dbhost dbport dboptions dbname dbuser dbpasswd email fax name numberformat password printer role sid signature stylesheet tel templates vclimit angebote bestellungen rechnungen - anfragen lieferantenbestellungen einkaufsrechnungen steuernummer ustid duns); + anfragen lieferantenbestellungen einkaufsrechnungen steuernummer ustid duns menustyle); $main::lxdebug->leave_sub(); diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl index ced3b0814..d75766a3f 100644 --- a/bin/mozilla/am.pl +++ b/bin/mozilla/am.pl @@ -282,27 +282,21 @@ sub account_header { + . $locale->text('Expense') . qq| + . $locale->text('Account') . qq|
 | - . $locale->text('Asset') - . qq|\n
+ . $locale->text('Asset') . qq|\n
 | - . $locale->text('Liability') - . qq|\n
+ . $locale->text('Liability') . qq|\n
 | - . $locale->text('Equity') - . qq|\n
+ . $locale->text('Equity') . qq|\n
 | - . $locale->text('Revenue') - . qq|\n
+ . $locale->text('Revenue') . qq|\n
 | - . $locale->text('Expense') - . qq|
   | . $locale->text('Heading') . qq|
 | - . $locale->text('Account') - . qq|
@@ -316,8 +310,7 @@ sub account_header { + . $locale->text('Is this a summary account to record') . qq| @@ -1419,8 +1404,7 @@ sub sic_header { + . $locale->text('Heading') . qq| @@ -1605,7 +1589,8 @@ sub config { %countrycodes = User->country_codes; $countrycodes = ''; foreach $key (sort { $countrycodes{$a} cmp $countrycodes{$b} } - keys %countrycodes) { + keys %countrycodes + ) { $countrycodes .= ($myconfig{countrycode} eq $key) ? " + + + + @@ -1731,8 +1724,7 @@ sub config { + . $locale->text('Last Numbers & Default Accounts') . qq|
| - . $locale->text('Is this a summary account to record') - . qq| {AR}> | . $locale->text('AR') @@ -345,41 +338,33 @@ sub account_header {
{AR_amount}> | - . $locale->text('Revenue') - . qq|\n
+ . $locale->text('Revenue') . qq|\n
{AR_paid}> | - . $locale->text('Receipt') - . qq|\n
+ . $locale->text('Receipt') . qq|\n
{AR_tax}> | . $locale->text('Tax') . qq|
{AP_amount}> | - . $locale->text('Expense/Asset') - . qq|\n
+ . $locale->text('Expense/Asset') . qq|\n
{AP_paid}> | - . $locale->text('Payment') - . qq|\n
+ . $locale->text('Payment') . qq|\n
{AP_tax}> | . $locale->text('Tax') . qq|
{IC_sale}> | - . $locale->text('Revenue') - . qq|\n
+ . $locale->text('Revenue') . qq|\n
{IC_cogs}> | - . $locale->text('COGS') - . qq|\n
+ . $locale->text('COGS') . qq|\n
{IC_taxpart}> | . $locale->text('Tax') . qq|
{IC_income}> | - . $locale->text('Revenue') - . qq|\n
+ . $locale->text('Revenue') . qq|\n
{IC_expense}> | - . $locale->text('Expense') - . qq|\n
+ . $locale->text('Expense') . qq|\n
{IC_taxservice}> | . $locale->text('Tax') . qq|
| - . $locale->text('Heading') - . qq|
| . $locale->text('Description') . qq|| . $locale->text('Stylesheet') . qq|
| . $locale->text('Setup Menu') . qq| New +  Old
 
| - . $locale->text('Last Numbers & Default Accounts') - . qq|
@@ -1759,7 +1751,9 @@ sub config {
| - . $locale->text('Enter up to 3 letters separated by a colon (i.e CAD:USD:EUR) for your native and foreign currencies') + . $locale->text( + 'Enter up to 3 letters separated by a colon (i.e CAD:USD:EUR) for your native and foreign currencies' + ) . qq|
@@ -1772,38 +1766,31 @@ sub config { | . $locale->text('Last Invoice Number') . qq| {defaults}{invnumber}> | - . $locale->text('Last Customer Number') - . qq| + . $locale->text('Last Customer Number') . qq| {defaults}{customernumber}> | - . $locale->text('Last Sales Order Number') - . qq| + . $locale->text('Last Sales Order Number') . qq| {defaults}{sonumber}> | - . $locale->text('Last Vendor Number') - . qq| + . $locale->text('Last Vendor Number') . qq| {defaults}{vendornumber}> | - . $locale->text('Last Purchase Order Number') - . qq| + . $locale->text('Last Purchase Order Number') . qq| {defaults}{ponumber}> | - . $locale->text('Last Article Number') - . qq| + . $locale->text('Last Article Number') . qq| {defaults}{articlenumber}> | - . $locale->text('Last Sales Quotation Number') - . qq| + . $locale->text('Last Sales Quotation Number') . qq| {defaults}{sqnumber}> | - . $locale->text('Last Service Number') - . qq| + . $locale->text('Last Service Number') . qq| {defaults}{servicenumber}> @@ -1944,8 +1931,7 @@ sub audit_control { \n|; + print + qq|menu[$pm][$sm] = new Item('$label', '$uri', '$target', defLength, 0, 0);\n|; + $sm++; + } else { # Hauptmenu + my $ml_ = $form->escape($ml); + $mm++; + $pm++; + %mlz = ($ml, $pm, "s$ml", 1); + $sm = 1; + $breit = 20 + length($label) * 5; + print + qq|menu[0][$mm] = new Item(' $label', '#', '', $breit, 10, $pm); \n|; + print qq|menu[$pm] = new Array();\n|; + print + qq|menu[$pm][0] = new Menu(true, '>', 0, 22, 160, defOver, defBack, 'itemBorder', 'itemText');\n|; + + #print qq|\n|; + §ion_menu($menu, $item); + + #print qq|
\n|; + } + } + } +} diff --git a/locale/de/all b/locale/de/all index 756192e0e..c3b25cc21 100644 --- a/locale/de/all +++ b/locale/de/all @@ -297,7 +297,6 @@ $self{texts} = { 'Edit Warehouse' => 'Lager bearbeiten', 'Employee' => 'Bearbeiter', 'Enforce transaction reversal for all dates' => 'Gegenbuchungen für jeden Zeitraum aktualisieren', - 'Enter up to 3 letters separated by a colon (i.e CAD:USD:EUR) for your native and foreign currencies' => 'Durch Doppelpunkte getrennte Währungskürzel mit maximal 3 Buchstaben aufführen; Ihre eigene LandesWährung zuerst (z.B. EUR:USD:CAD)', 'Equity' => 'Passiva', 'Exch' => 'Wechselkurs.', 'Exchangerate' => 'Wechselkurs', @@ -634,6 +633,7 @@ $self{texts} = { 'Service Items' => 'Dienstleistungen', 'Service Number missing!' => 'Dienstleistungsnummer fehlt!', 'Services' => 'Dienstleistungen', + 'Setup Menu' => '', 'Setup Templates' => 'Vorlagen auswählen', 'Ship' => 'Lagerausgang', 'Ship Merchandise' => 'Waren versenden', diff --git a/locale/de/am b/locale/de/am index 82d698b97..0af03053a 100644 --- a/locale/de/am +++ b/locale/de/am @@ -64,7 +64,6 @@ $self{texts} = { 'Edit Template' => 'Vorlage bearbeiten', 'Edit Warehouse' => 'Lager bearbeiten', 'Enforce transaction reversal for all dates' => 'Gegenbuchungen für jeden Zeitraum aktualisieren', - 'Enter up to 3 letters separated by a colon (i.e CAD:USD:EUR) for your native and foreign currencies' => 'Durch Doppelpunkte getrennte Währungskürzel mit maximal 3 Buchstaben aufführen; Ihre eigene LandesWährung zuerst (z.B. EUR:USD:CAD)', 'Equity' => 'Passiva', 'Expense' => 'Aufwandskonto', 'Expense Account' => 'Aufwandskonto', @@ -117,6 +116,7 @@ $self{texts} = { 'Salesman' => 'Vertreter', 'Save' => 'Speichern', 'Service Items' => 'Dienstleistungen', + 'Setup Menu' => 'Setup Menu', 'Signature' => 'Unterschrift', 'Standard Industrial Codes' => 'SIC', 'Steuersatz' => 'Steuersatz', diff --git a/locale/de/locales.pl b/locale/de/locales.pl index 8981e5aeb..0d251c03d 100755 --- a/locale/de/locales.pl +++ b/locale/de/locales.pl @@ -62,7 +62,13 @@ foreach $file (@progfiles) { &scanmenu("$basedir/$item"); } } - + + if ($file eq 'menunew.pl') { + foreach $item (@menufiles) { + &scanmenu("$basedir/$item"); + } + } + $file =~ s/\.pl//; diff --git a/makesymlinks b/makesymlinks index 39ebcd6da..704618022 100755 --- a/makesymlinks +++ b/makesymlinks @@ -3,7 +3,7 @@ # Erstellt die benotigten Symlinks ln -vsf login.pl admin.pl -for i in ap ar bp ca cp ct gl ic ir is menu oe pe rc rp datev licenses fa ustva; do +for i in ap ar bp ca cp ct gl ic ir is menu oe pe rc rp datev licenses fa ustva menunew; do ln -vsf am.pl $i.pl done -- 2.20.1
| - . $locale->text('Enforce transaction reversal for all dates') - . qq| + . $locale->text('Enforce transaction reversal for all dates') . qq| | . $locale->text('Yes') . qq| | diff --git a/bin/mozilla/login.pl b/bin/mozilla/login.pl index cea155976..e88872113 100644 --- a/bin/mozilla/login.pl +++ b/bin/mozilla/login.pl @@ -84,8 +84,7 @@ sub login_screen {
$spacer|.$menu->menuitem(\%myconfig, \%$form, $item, $level).qq|$label
 $label