X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=sql-ledger%2Fold%2Fsql-ledger%2Fbin%2Fmozilla%2Fmenu.pl;fp=sql-ledger%2Fold%2Fsql-ledger%2Fbin%2Fmozilla%2Fmenu.pl;h=0000000000000000000000000000000000000000;hp=67c18bd540e0359a03131b8f6f96e9fa204c38c9;hb=0554f5dec1d99c9be70b2a0b841b5327db917dbe;hpb=ac9a5336dd181bc617710a09effc3efa1a0d5932 diff --git a/sql-ledger/old/sql-ledger/bin/mozilla/menu.pl b/sql-ledger/old/sql-ledger/bin/mozilla/menu.pl deleted file mode 100644 index 67c18bd54..000000000 --- a/sql-ledger/old/sql-ledger/bin/mozilla/menu.pl +++ /dev/null @@ -1,160 +0,0 @@ -###################################################################### -# SQL-Ledger Accounting -# Copyright (c) 1998-2002 -# -# Author: Dieter Simader -# Email: dsimader@sql-ledger.org -# Web: http://www.sql-ledger.org -# -# Contributors: Christopher Browne -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -####################################################################### -# -# two frame layout with refractured menu -# -# CHANGE LOG: -# DS. 2002-03-25 Created -####################################################################### - -$menufile = "menu.ini"; -use SL::Menu; - - -1; -# end of main - - -sub display { - - $framesize = ($ENV{HTTP_USER_AGENT} =~ /links/i) ? "240" : "135"; - - $form->header; - - print qq| - - - - - - - - - - -|; - -} - - - -sub acc_menu { - - 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->header; - - print qq| - - -|; - - §ion_menu($menu); - - print qq| - - -|; - -} - - -sub section_menu { - my ($menu, $level) = @_; - - # build tiered menus - my @menuorder = $menu->access_control(\%myconfig, $level); - - while (@menuorder) { - $item = shift @menuorder; - $label = $item; - $label =~ s/$level--//g; - - my $spacer = " " x (($item =~ s/--/--/g) * 2); - - $label =~ s/.*--//g; - $label = $locale->text($label); - $label =~ s/ / /g; - - $menu->{$item}{target} = "main_window" unless $menu->{$item}{target}; - - if ($menu->{$item}{submenu}) { - $menu->{$item}{$item} = !$form->{$item}; - - if ($form->{level} && $item =~ /^$form->{level}/) { - - # expand menu - print qq|
\n$spacer|.$menu->menuitem(\%myconfig, \%$form, $item, $level).qq|$label|; - - # remove same level items - map { shift @menuorder } grep /^$item/, @menuorder; - - §ion_menu($menu, $item); - - print qq|
\n|; - - } else { - - print qq|
\n$spacer|.$menu->menuitem(\%myconfig, \%$form, $item, $level).qq|$label ...|; - - # remove same level items - map { shift @menuorder } grep /^$item/, @menuorder; - - } - - - } else { - - if ($menu->{$item}{module}) { - if ($form->{$item} && $form->{level} eq $item) { - $menu->{$item}{$item} = !$form->{$item}; - print qq|
\n$spacer|.$menu->menuitem(\%myconfig, \%$form, $item, $level).qq|$label|; - - # remove same level items - map { shift @menuorder } grep /^$item/, @menuorder; - - §ion_menu($menu, $item); - - } else { - print qq|
\n$spacer|.$menu->menuitem(\%myconfig, \%$form, $item, $level).qq|$label|; - } - - } else { - - print qq|
$label|; - - §ion_menu($menu, $item); - - print qq|
\n|; - - } - } - } -} - -