From: Niclas Zimmermann Date: Thu, 18 Oct 2012 12:28:21 +0000 (+0200) Subject: Merge branch 'master' of vc.linet-services.de:public/lx-office-erp X-Git-Tag: release-3.0.0beta1~109^2 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/fc41222c61dbee590005f04c50e8603581462543?hp=35ca31c0901ccfde86d6935d63f86ecc309b6807 Merge branch 'master' of vc.linet-services.de:public/lx-office-erp --- diff --git a/SL/Controller/BackgroundJobHistory.pm b/SL/Controller/BackgroundJobHistory.pm index fbee5c028..29f2bc79a 100644 --- a/SL/Controller/BackgroundJobHistory.pm +++ b/SL/Controller/BackgroundJobHistory.pm @@ -79,7 +79,7 @@ sub check_task_server { } sub add_stylesheet { - $::form->use_stylesheet('lx-office-erp/background_jobs.css'); + $::request->{layout}->use_stylesheet('lx-office-erp/background_jobs.css'); } 1; diff --git a/SL/Controller/Base.pm b/SL/Controller/Base.pm index 6d879e82a..7fe1d36ea 100644 --- a/SL/Controller/Base.pm +++ b/SL/Controller/Base.pm @@ -84,7 +84,7 @@ sub render { } else { $::form->{title} = $locals{title} if $locals{title}; - $::form->header; + $::form->header(no_menu => $options->{no_menu}); } } diff --git a/SL/Controller/FrameHeader.pm b/SL/Controller/FrameHeader.pm index 855350c73..69c48eb70 100644 --- a/SL/Controller/FrameHeader.pm +++ b/SL/Controller/FrameHeader.pm @@ -6,9 +6,8 @@ use parent qw(SL::Controller::Base); sub action_header { my ($self) = @_; - delete $::form->{stylesheet}; $::form->use_stylesheet('frame_header/header.css'); - $self->render('menu/header', + $self->render('menu/header', { partial => 1, no_output => 1 }, now => DateTime->now_local, is_fastcgi => scalar($::dispatcher->interface_type =~ /fastcgi/i), is_links => scalar($ENV{HTTP_USER_AGENT} =~ /links/i)); diff --git a/SL/Controller/Layout.pm b/SL/Controller/Layout.pm new file mode 100644 index 000000000..98c012cbc --- /dev/null +++ b/SL/Controller/Layout.pm @@ -0,0 +1,27 @@ +package SL::Controller::Layout; + +use strict; +use parent qw(SL::Controller::Base); + +use JSON (); + +sub action_empty { + my ($self) = @_; + + if ($::form->{format} eq 'json') { + my $layout = { + pre_content => $::request->{layout}->pre_content, + start_content => $::request->{layout}->start_content, + end_content => $::request->{layout}->end_content, + post_content => $::request->{layout}->post_content, + javascripts => [ $::request->{layout}->javascripts ], + javascripts_inline => [ $::request->{layout}->javascripts_inline ], + stylesheets => [ $::request->{layout}->stylesheets ], + stylesheets_inline => [ $::request->{layout}->stylesheets_inline ], + }; + + $self->render(\ JSON::to_json($layout), { type => 'js', raw => 1 }); + } +} + +1; diff --git a/SL/Controller/LoginScreen.pm b/SL/Controller/LoginScreen.pm index 47dfa90c9..89f21ccfa 100644 --- a/SL/Controller/LoginScreen.pm +++ b/SL/Controller/LoginScreen.pm @@ -7,6 +7,7 @@ use parent qw(SL::Controller::Base); use SL::Dispatcher::AuthHandler::User; use SL::User; +__PACKAGE__->run_before('set_layout'); # # actions # @@ -19,7 +20,7 @@ sub action_user_login { return if $self->_redirect_to_main_script_if_already_logged_in; # Otherwise show the login form. - $self->render('login_screen/user_login'); + $self->render('login_screen/user_login', { no_menu => 1 }, error => error_state($::form->{error})); } sub action_logout { @@ -27,7 +28,7 @@ sub action_logout { $::auth->destroy_session; $::auth->create_or_refresh_session; - $self->render('login_screen/user_login', error => $::locale->text('You are logged out!')); + $self->render('login_screen/user_login', { no_menu => 1 }, error => $::locale->text('You are logged out!')); } sub action_login { @@ -38,6 +39,7 @@ sub action_login { $::form->{login} = $::myconfig{login}; $::locale = Locale->new($::myconfig{countrycode}) if $::myconfig{countrycode}; my $user = User->new(login => $::myconfig{login}); + $::request->{layout} = SL::Layout::Dispatcher->new(style => $user->{menustyle}); # if we get an error back, bale out my $result = $user->login($::form); @@ -54,7 +56,7 @@ sub action_login { # Other login errors. if (0 > $result) { $::auth->punish_wrong_login; - return $self->render('login_screen/user_login', error => $::locale->text('Incorrect username or password!')); + return $self->render('login_screen/user_login', { no_menu => 1 }, error => $::locale->text('Incorrect username or password!')); } # Everything is fine. @@ -83,15 +85,7 @@ sub _redirect_to_main_script { return $self->redirect_to($::form->{callback}) if $::form->{callback}; - my %style_to_script_map = ( - v3 => 'v3', - neu => 'new', - v4 => 'v4', - ); - - my $menu_script = $style_to_script_map{$user->{menustyle}} || ''; - - $self->redirect_to(controller => "menu${menu_script}.pl", action => 'display'); + $self->redirect_to(controller => "login.pl", action => 'company_logo'); } sub _redirect_to_main_script_if_already_logged_in { @@ -116,4 +110,15 @@ sub _redirect_to_main_script_if_already_logged_in { return 1; } +sub error_state { + return { + session => $::locale->text('The session is invalid or has expired.'), + password => $::locale->text('Incorrect password!'), + }->{$_[0]}; +} + +sub set_layout { + $::request->{layout} = SL::Layout::Dispatcher->new(style => 'login'); +} + 1; diff --git a/SL/Controller/SellPriceInformation.pm b/SL/Controller/SellPriceInformation.pm index 522f10125..bf85c8634 100644 --- a/SL/Controller/SellPriceInformation.pm +++ b/SL/Controller/SellPriceInformation.pm @@ -149,7 +149,7 @@ sub list_objects { }); } - return $self->{report}->generate_with_headers; + return $self->{report}->generate_with_headers(no_layout => 1); } sub link_to { diff --git a/SL/Dispatcher.pm b/SL/Dispatcher.pm index 43bf6680b..35a351877 100644 --- a/SL/Dispatcher.pm +++ b/SL/Dispatcher.pm @@ -35,6 +35,7 @@ use SL::Form; use SL::Helper::DateTime; use SL::InstanceConfiguration; use SL::Template::Plugin::HTMLFixes; +use SL::Layout::None; # Trailing new line is added so that Perl will not add the line # number 'die' was called in. @@ -81,7 +82,7 @@ sub show_error { $::form->{error} = $::locale->text('The session is invalid or has expired.') if ($error_type eq 'session'); $::form->{error} = $::locale->text('Incorrect password!') if ($error_type eq 'password'); - $::form->header; + $::form->header(no_menu => 1); print $::form->parse_html_template($template, \%params); $::lxdebug->leave_sub; @@ -181,7 +182,10 @@ sub handle_request { $::locale = Locale->new($::lx_office_conf{system}->{language}); $::form = Form->new; $::instance_conf = SL::InstanceConfiguration->new; - $::request = { cgi => CGI->new({}) }; + $::request = { + cgi => CGI->new({}), + layout => SL::Layout::None->new, + }; my $session_result = $::auth->restore_session; $::auth->create_or_refresh_session; @@ -225,7 +229,9 @@ sub handle_request { ::run($session_result); } else { - show_error('login_screen/user_login', 'session') if SL::Auth::SESSION_EXPIRED == $session_result; + if (SL::Auth::SESSION_EXPIRED == $session_result) { + print $::request->{cgi}->redirect('controller.pl?action=LoginScreen/user_login&error=session'); + } my %auth_result = $self->{auth_handler}->handle( routing_type => $routing_type, @@ -263,6 +269,8 @@ sub handle_request { } }; + $::form->footer; + # cleanup $::auth->save_session; $::auth->expire_sessions; diff --git a/SL/Dispatcher/AuthHandler.pm b/SL/Dispatcher/AuthHandler.pm index 22b2be44d..c24443151 100644 --- a/SL/Dispatcher/AuthHandler.pm +++ b/SL/Dispatcher/AuthHandler.pm @@ -1,4 +1,4 @@ -package SL::Dispatcher::AuthHandler; + package SL::Dispatcher::AuthHandler; use strict; @@ -14,6 +14,7 @@ sub handle { my ($self, %param) = @_; my $auth_level = $self->get_auth_level(%param); + my $handler_name = "SL::Dispatcher::AuthHandler::" . ucfirst($auth_level); $self->{handlers} ||= {}; $self->{handlers}->{$handler_name} ||= $handler_name->new; diff --git a/SL/Dispatcher/AuthHandler/Admin.pm b/SL/Dispatcher/AuthHandler/Admin.pm index 77202e8e4..2e41ee90e 100644 --- a/SL/Dispatcher/AuthHandler/Admin.pm +++ b/SL/Dispatcher/AuthHandler/Admin.pm @@ -1,15 +1,18 @@ package SL::Dispatcher::AuthHandler::Admin; use strict; - use parent qw(Rose::Object); +use SL::Layout::Dispatcher; + sub handle { %::myconfig = (); return if $::form->{'{AUTH}admin_password'} && ($::auth->authenticate_root($::form->{'{AUTH}admin_password'}) == $::auth->OK()); return if !$::form->{'{AUTH}admin_password'} && ($::auth->authenticate_root($::auth->get_session_value('admin_password')) == $::auth->OK()); + $::request->{layout} = SL::Layout::Dispatcher->new(style => 'admin'); + $::auth->punish_wrong_login; $::auth->delete_session_value('admin_password'); SL::Dispatcher::show_error('admin/adminlogin', 'password'); diff --git a/SL/Dispatcher/AuthHandler/User.pm b/SL/Dispatcher/AuthHandler/User.pm index 150245c58..1273d679f 100644 --- a/SL/Dispatcher/AuthHandler/User.pm +++ b/SL/Dispatcher/AuthHandler/User.pm @@ -1,9 +1,10 @@ package SL::Dispatcher::AuthHandler::User; use strict; - use parent qw(Rose::Object); +use SL::Layout::Dispatcher; + sub handle { my ($self, %param) = @_; @@ -15,6 +16,7 @@ sub handle { $self->_error(%param) unless $::myconfig{login}; $::locale = Locale->new($::myconfig{countrycode}); + $::request->{layout} = SL::Layout::Dispatcher->new(style => $::myconfig{menustyle}); my $ok = $::form->{'{AUTH}login'} && (SL::Auth::OK() == $::auth->authenticate($::myconfig{login}, $::form->{'{AUTH}password'})); $ok ||= !$::form->{'{AUTH}login'} && (SL::Auth::OK() == $::auth->authenticate($::myconfig{login}, undef)); @@ -31,7 +33,7 @@ sub _error { my $self = shift; $::auth->punish_wrong_login; - SL::Dispatcher::show_error('login_screen/user_login', 'password', @_); + print $::request->{cgi}->redirect('controller.pl?action=LoginScreen/user_login&error=password'); } 1; diff --git a/SL/Drafts.pm b/SL/Drafts.pm index 7298f5c1d..16111af9c 100644 --- a/SL/Drafts.pm +++ b/SL/Drafts.pm @@ -36,7 +36,7 @@ sub get_module { return ($module, $submodule); } -my @dont_save = qw(login password stylesheet action); +my @dont_save = qw(login password action); sub save { $main::lxdebug->enter_sub(); diff --git a/SL/Form.pm b/SL/Form.pm index 539cd9cb2..3660bf88a 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -56,6 +56,7 @@ use SL::DBUtils; use SL::DO; use SL::IC; use SL::IS; +use SL::Layout::Dispatcher; use SL::Locale; use SL::Mailer; use SL::Menu; @@ -447,52 +448,38 @@ sub create_http_response { return $output; } -sub use_stylesheet { - my $self = shift; - - $self->{stylesheet} = [ $self->{stylesheet} ] unless ref $self->{stylesheet} eq 'ARRAY'; - $self->{stylesheet} = [ grep { -f } - map { m:^css/: ? $_ : "css/$_" } - grep { $_ } - (@{ $self->{stylesheet} }, @_) - ]; - - return @{ $self->{stylesheet} }; -} - -sub get_stylesheet_for_user { - my $css_path = 'css'; - if (my $user_style = $::myconfig{stylesheet}) { - $user_style =~ s/\.css$//; # nuke trailing .css, this is a remnand of pre 2.7.0 stylesheet handling - if (-d "$css_path/$user_style" && - -f "$css_path/$user_style/main.css") { - $css_path = "$css_path/$user_style"; - } else { - $css_path = "$css_path/lx-office-erp"; - } - } else { - $css_path = "$css_path/lx-office-erp"; - } - $::myconfig{css_path} = $css_path; # needed for menunew, FIXME: don't do this here - - return $css_path; -} - sub header { $::lxdebug->enter_sub; - # extra code is currently only used by menuv3 and menuv4 to set their css. - # it is strongly deprecated, and will be changed in a future version. my ($self, %params) = @_; my $db_charset = $::lx_office_conf{system}->{dbcharset} || Common::DEFAULT_CHARSET; my @header; $::lxdebug->leave_sub and return if !$ENV{HTTP_USER_AGENT} || $self->{header}++; - my $css_path = $self->get_stylesheet_for_user; + if ($params{no_layout}) { + $::request->{layout} = SL::Layout::Dispatcher->new(style => 'none'); + } + + my $layout = $::request->{layout}; + + # standard css for all + # this should gradually move to the layouts that need it + $layout->use_stylesheet("$_.css") for qw( + main menu tabcontent list_accounts jquery.autocomplete + jquery.multiselect2side frame_header/header + ui-lightness/jquery-ui-1.8.12.custom + js/jscalendar/calendar-win2k-1 + ); + + $layout->use_javascript("$_.js") for qw( + jquery common jscalendar/calendar jscalendar/lang/calendar-de + jscalendar/calendar-setup part_selection jquery-ui jquery.cookie jqModal + switchmenuframe + ); $self->{favicon} ||= "favicon.ico"; - $self->{titlebar} = "$self->{title} - $self->{titlebar}" if $self->{title}; + $self->{titlebar} = join ' - ', grep $_, $self->{title}, $self->{login}, $::myconfig{dbname}, $self->{version} if $self->{title}; # build includes if ($self->{refresh_url} || $self->{refresh_time}) { @@ -501,38 +488,18 @@ sub header { push @header, ""; } - push @header, map { qq|| } $self->use_stylesheet; - - push @header, "" if $self->{landscape}; - push @header, "" if -f $self->{favicon}; - push @header, map { qq|| } - qw(jquery common jscalendar/calendar jscalendar/lang/calendar-de jscalendar/calendar-setup part_selection jquery-ui jqModal switchmenuframe); + push @header, map { qq|| } $layout->stylesheets; + push @header, " " if $self->{landscape}; + push @header, "" if -f $self->{favicon}; + push @header, map { qq|| } $layout->javascripts; push @header, $self->{javascript} if $self->{javascript}; - push @header, map { qq|| } - qw(main menu tabcontent list_accounts jquery.autocomplete jquery.multiselect2side frame_header/header ui-lightness/jquery-ui-1.8.12.custom); - push @header, map { qq|| } push @header, map { $_->show_javascript } @{ $self->{AJAX} || [] }; - push @header, "" if $self->{fokus}; - push @header, sprintf "", - join ' - ', grep $_, $self->{title}, $self->{login}, $::myconfig{dbname}, $self->{version} if $self->{title}; - - # if there is a title, we put some JavaScript in to the page, wich writes a - # meaningful title-tag for our frameset. - my $title_hack = ''; - if ($self->{title}) { - $title_hack = qq| - |; - } my %doctypes = ( strict => qq||, transitional => qq||, frameset => qq||, + html5 => qq||, ); # output @@ -556,15 +523,34 @@ EOT ***********************************************/ - $params{extra_code} - $title_hack + EOT + print $::request->{layout}->pre_content; + print $::request->{layout}->start_content; + + $layout->header_done; $::lxdebug->leave_sub; } +sub footer { + return unless $::request->{layout}->need_footer; + + print $::request->{layout}->end_content; + print $::request->{layout}->post_content; + + if (my @inline_scripts = $::request->{layout}->javascripts_inline) { + print "\n"; + } + + print < + +EOL +} + sub ajax_response_header { $main::lxdebug->enter_sub(); @@ -3590,6 +3576,30 @@ sub reformat_numbers { $::myconfig{numberformat} = $saved_numberformat; } +sub layout { + my ($self) = @_; + $::lxdebug->enter_sub; + + my %style_to_script_map = ( + v3 => 'v3', + neu => 'new', + v4 => 'v4', + ); + + my $menu_script = $style_to_script_map{$::myconfig{menustyle}} || ''; + + package main; + require "bin/mozilla/menu$menu_script.pl"; + package Form; + require SL::Controller::FrameHeader; + + + my $layout = SL::Controller::FrameHeader->new->action_header . ::render(); + + $::lxdebug->leave_sub; + return $layout; +} + 1; __END__ diff --git a/SL/InstallationCheck.pm b/SL/InstallationCheck.pm index d29578b41..451c41831 100644 --- a/SL/InstallationCheck.pm +++ b/SL/InstallationCheck.pm @@ -39,7 +39,7 @@ BEGIN { { name => "Digest::SHA", url => "http://search.cpan.org/~mshelor/", debian => 'libdigest-sha-perl' }, { name => "IO::Socket::SSL", url => "http://search.cpan.org/~sullr/", debian => 'libio-socket-ssl-perl' }, { name => "Net::LDAP", url => "http://search.cpan.org/~gbarr/", debian => 'libnet-ldap-perl' }, - # Net::LDAP is core since 5.7.3 + # Net::SMTP is core since 5.7.3 { name => "Net::SMTP::SSL", version => '1.01', url => "http://search.cpan.org/~cwest/", debian => 'libnet-smtp-ssl-perl' }, { name => "Net::SMTP::TLS", version => '0.12', url => "http://search.cpan.org/~awestholm/", debian => 'libnet-smtp-tls-perl' }, ); @@ -49,6 +49,7 @@ BEGIN { { name => "Moose::Role", url => "http://search.cpan.org/~doy/", debian => 'libmoose-role-perl' }, { name => "Perl::Tags", url => "http://search.cpan.org/~osfameron/", debian => 'libperl-tags-perl' }, { name => "Test::Deep", url => "http://search.cpan.org/~rjbs/", debian => 'libtest-deep-perl' }, + { name => "GD", version => '2.00', url => "http://search.cpan.org/~lds/", debian => 'libgd-perl' }, ); $_->{fullname} = join ' ', grep $_, @$_{qw(name version)} diff --git a/SL/Layout/Admin.pm b/SL/Layout/Admin.pm new file mode 100644 index 000000000..00e312540 --- /dev/null +++ b/SL/Layout/Admin.pm @@ -0,0 +1,18 @@ +package SL::Layout::Admin; + +use strict; +use parent qw(SL::Layout::Base); + +sub init_sub_layouts { + [ SL::Layout::None->new ] +} + +sub start_content { + "
\n"; +} + +sub end_content { + "
\n"; +} + +1; diff --git a/SL/Layout/Base.pm b/SL/Layout/Base.pm new file mode 100644 index 000000000..0c209e2af --- /dev/null +++ b/SL/Layout/Base.pm @@ -0,0 +1,151 @@ +package SL::Layout::Base; + +use strict; +use parent qw(SL::Controller::Base); + +use List::MoreUtils qw(uniq); + +use Rose::Object::MakeMethods::Generic ( + 'scalar --get_set_init' => qw(menu), + 'scalar' => qw(focus), + 'array' => [ + 'add_stylesheets_inline' => { interface => 'add', hash_key => 'stylesheets_inline' }, + 'add_javascripts_inline' => { interface => 'add', hash_key => 'javascripts_inline' }, + 'sub_layouts', => { interface => 'get_set_init' }, + 'add_sub_layouts' => { interface => 'add', hash_key => 'sub_layouts' }, + ], +); + +use SL::Menu; + +my %menu_cache; + +sub new { + my ($class, @slurp) = @_; + + my $self = $class->SUPER::new(@slurp); +} + +sub init_menu { + Menu->new('menu.ini'); +} + +########################################## +# inheritable/overridable +########################################## + +sub pre_content { + join '', map { $_->pre_content } $_[0]->sub_layouts; +} + +sub start_content { + join '', map { $_->start_content } $_[0]->sub_layouts; +} + +sub end_content { + join '', map { $_->end_content } $_[0]->sub_layouts; +} + +sub post_content { + join '', map { $_->post_content } $_[0]->sub_layouts; +} + +sub stylesheets_inline { + uniq ( map { $_->stylesheets_inline } $_[0]->sub_layouts ), + @{ $_[0]->{stylesheets_inline} || [] }; +} + +sub javascripts_inline { + uniq ( map { $_->javascripts_inline } $_[0]->sub_layouts ), + @{ $_[0]->{javascripts_inline} || [] }; +} + +sub init_sub_layouts { [] } + + +######################################### +# Interface +######################################## + +sub add_stylesheets { + &use_stylesheet; +} + +sub use_stylesheet { + my $self = shift; + push @{ $self->{stylesheets} ||= [] }, @_ if @_; + @{ $self->{stylesheets} ||= [] }; +} + +sub stylesheets { + my ($self) = @_; + my $css_path = $self->get_stylesheet_for_user; + + return uniq grep { $_ } map { $self->_find_stylesheet($_, $css_path) } + $self->use_stylesheet, map { $_->stylesheets } $self->sub_layouts; +} + +sub _find_stylesheet { + my ($self, $stylesheet, $css_path) = @_; + + return "$css_path/$stylesheet" if -f "$css_path/$stylesheet"; + return "css/$stylesheet" if -f "css/$stylesheet"; + return $stylesheet if -f $stylesheet; +} + +sub get_stylesheet_for_user { + my $css_path = 'css'; + if (my $user_style = $::myconfig{stylesheet}) { + $user_style =~ s/\.css$//; # nuke trailing .css, this is a remnand of pre 2.7.0 stylesheet handling + if (-d "$css_path/$user_style" && + -f "$css_path/$user_style/main.css") { + $css_path = "$css_path/$user_style"; + } else { + $css_path = "$css_path/lx-office-erp"; + } + } else { + $css_path = "$css_path/lx-office-erp"; + } + $::myconfig{css_path} = $css_path; # needed for menunew, FIXME: don't do this here + + return $css_path; +} + +sub add_javascripts { + &use_javascript +} + +sub use_javascript { + my $self = shift; + push @{ $self->{javascripts} ||= [] }, @_ if @_; + @{ $self->{javascripts} ||= [] }; +} + +sub javascripts { + my ($self) = @_; + + return uniq map { $self->_find_javascript($_) } + $self->use_javascript, map { $_->javascripts } $self->sub_layouts; +} + +sub _find_javascript { + my ($self, $javascript) = @_; + + return "js/$javascript" if -f "js/$javascript"; + return $javascript if -f $javascript; +} + + +############################################ +# track state of form header +############################################ + +sub header_done { + $_[0]{_header_done} = 1; +} + +sub need_footer { + $_[0]{_header_done}; +} + +1; diff --git a/SL/Layout/Classic.pm b/SL/Layout/Classic.pm new file mode 100644 index 000000000..9503d05fe --- /dev/null +++ b/SL/Layout/Classic.pm @@ -0,0 +1,18 @@ +package SL::Layout::Classic; + +use strict; +use parent qw(SL::Layout::Base); + +use SL::Layout::Top; +use SL::Layout::MenuLeft; +use SL::Layout::None; + +sub init_sub_layouts { + [ + SL::Layout::Top->new, + SL::Layout::MenuLeft->new, + SL::Layout::None->new, + ] +} + +1; diff --git a/SL/Layout/Css.pm b/SL/Layout/Css.pm new file mode 100644 index 000000000..2bb0455ca --- /dev/null +++ b/SL/Layout/Css.pm @@ -0,0 +1,129 @@ +package SL::Layout::Css; + +use strict; + +use List::Util qw(max); +use Exporter qw(import); + +our @EXPORT = qw(clock_line print_menu menuitem_v3); + +sub clock_line { + my ($Sekunden, $Minuten, $Stunden, $Monatstag, $Monat, + $Jahr, $Wochentag, $Jahrestag, $Sommerzeit) + = localtime(time); + $Monat += 1; + $Jahrestag += 1; + $Monat = $Monat < 10 ? $Monat = "0" . $Monat : $Monat; + $Monatstag = $Monatstag < 10 ? $Monatstag = "0" . $Monatstag : $Monatstag; + $Jahr += 1900; + my @Wochentage = ("Sonntag", "Montag", "Dienstag", "Mittwoch", + "Donnerstag", "Freitag", "Samstag"); + my @Monatsnamen = ("", "Januar", "Februar", "März", + "April", "Mai", "Juni", "Juli", + "August", "September", "Oktober", "November", + "Dezember"); + return + $Wochentage[$Wochentag] . ", der " + . $Monatstag . "." + . $Monat . "." + . $Jahr . " - "; +} + +sub print_menu { + my ($self, $parent, $depth) = @_; + + my $html; + + die if ($depth * 1 > 5); + + my @menuorder; + my $menu = $self->menu; + + @menuorder = $menu->access_control(\%::myconfig, $parent); + + $parent .= "--" if ($parent); + + foreach my $item (@menuorder) { + substr($item, 0, length($parent)) = ""; + next if (($item eq "") || ($item =~ /--/)); + + my $menu_item = $menu->{"${parent}${item}"}; + my $menu_title = $::locale->text($item); + my $menu_text = $menu_title; + + if ($menu_item->{"submenu"} || !defined($menu_item->{"module"}) || + ($menu_item->{"module"} eq "menu.pl")) { + + my $h = $self->print_menu("${parent}${item}", $depth * 1 + 1)."\n"; + if (!$parent) { + $html .= qq|\n|; + } else { + $html .= qq|
  • ${menu_text}
      ${h}
  • \n|; + } + } else { + if ($self->{sub_class} && $depth > 1) { + $html .= qq|
  • |; + } else { + $html .= qq|
  • |; + } + $html .= $self->menuitem_v3("${parent}$item", { "title" => $menu_title }); + $html .= qq|${menu_text}
  • \n|; + } + } + + return $html; +} + +sub menuitem_v3 { + $main::lxdebug->enter_sub(); + + my ($self, $item, $other) = @_; + my $menuitem = $self->menu->{$item}; + + my $action = "section_menu"; + my $module; + + if ($menuitem->{module}) { + $module = $menuitem->{module}; + } + if ($menuitem->{action}) { + $action = $menuitem->{action}; + } + + my $level = $::form->escape($item); + + my $str = qq|escape($key, 1) . "="; + my ($value, $conf) = split(/=/, $menuitem->{$key}, 2); + $value = $::myconfig{$value} . "/$conf" if ($conf); + $str .= $::form->escape($value, 1); + } + + $str .= '"'; + + if ($other) { + foreach my $key (keys(%{$other})) { + $str .= qq| ${key}="| . $::form->quote($other->{$key}) . qq|"|; + } + } + + $str .= ">"; + + $main::lxdebug->leave_sub(); + + return $str; +} + +1; diff --git a/SL/Layout/Dispatcher.pm b/SL/Layout/Dispatcher.pm new file mode 100644 index 000000000..89c950b18 --- /dev/null +++ b/SL/Layout/Dispatcher.pm @@ -0,0 +1,24 @@ +package SL::Layout::Dispatcher; + +use strict; + +use SL::Layout::Admin; +use SL::Layout::Login; +use SL::Layout::Classic; +use SL::Layout::V3; +use SL::Layout::V4; +use SL::Layout::Javascript; + +sub new { + my ($class, %params) = @_; + + return SL::Layout::Classic->new if $params{style} eq 'old'; + return SL::Layout::V3->new if $params{style} eq 'v3'; + return SL::Layout::V4->new if $params{style} eq 'v4'; + return SL::Layout::Javascript->new if $params{style} eq 'neu'; + return SL::Layout::Admin->new if $params{style} eq 'admin'; + return SL::Layout::Login->new if $params{style} eq 'login'; + return SL::Layout::None->new; +} + +1; diff --git a/SL/Layout/Javascript.pm b/SL/Layout/Javascript.pm new file mode 100644 index 000000000..d8f079fcf --- /dev/null +++ b/SL/Layout/Javascript.pm @@ -0,0 +1,140 @@ +package SL::Layout::Javascript; + +use strict; +use parent qw(SL::Layout::Base); + +use List::Util qw(max); +use URI; + +sub init_sub_layouts { + [ SL::Layout::None->new ] +} + +sub pre_content { + &display +} + +sub start_content { + "
    \n"; +} + +sub end_content { + "
    \n"; +} + +sub stylesheets { + $_[0]->add_stylesheets(qw( + dhtmlsuite/menu-item.css + dhtmlsuite/menu-bar.css + )); + $_[0]->SUPER::stylesheets; +} + +sub display { + my ($self) = @_; + my $form = $main::form; + + my $callback = $form->unescape($form->{callback}); + $callback = URI->new($callback)->rel($callback) if $callback; + $callback = "login.pl?action=company_logo" if $callback =~ /^(\.\/)?$/; + + $self->render("menu/menunew", { partial => 1, no_output => 1 }, + force_ul_width => 1, + date => $self->clock_line, + menu_items => $self->acc_menu, + callback => $callback, + ); +} + +sub clock_line { + my $form = $main::form; + + my ($Sekunden, $Minuten, $Stunden, $Monatstag, $Monat, + $Jahr, $Wochentag, $Jahrestag, $Sommerzeit) + = localtime(time); + $Monat += 1; + $Jahrestag += 1; + $Monat = $Monat < 10 ? $Monat = "0" . $Monat : $Monat; + $Monatstag = $Monatstag < 10 ? $Monatstag = "0" . $Monatstag : $Monatstag; + $Jahr += 1900; + my @Wochentage = ("Sonntag", "Montag", "Dienstag", "Mittwoch", + "Donnerstag", "Freitag", "Samstag"); + my @Monatsnamen = ("", "Januar", "Februar", "März", + "April", "Mai", "Juni", "Juli", + "August", "September", "Oktober", "November", + "Dezember"); + return + $Wochentage[$Wochentag] . ", der " + . $Monatstag . "." + . $Monat . "." + . $Jahr . " - "; +} + +sub acc_menu { + my ($self) = @_; + + my $menu = $self->menu; + + my $all_items = []; + $self->create_menu($menu, $all_items); + + my $item = { 'subitems' => $all_items }; + calculate_width($item); + + return $all_items; +} + +sub calculate_width { + my $item = shift; + + $item->{max_width} = max map { length $_->{title} } @{ $item->{subitems} }; + + foreach my $subitem (@{ $item->{subitems} }) { + calculate_width($subitem) if ($subitem->{subitems}); + } +} + +sub create_menu { + my ($self, $menu, $all_items, $parent, $depth) = @_; + my $html; + + my $form = $main::form; + my %myconfig = %main::myconfig; + + die if ($depth * 1 > 5); + + my @menuorder = $menu->access_control(\%myconfig, $parent); + $parent .= "--" if ($parent); + + foreach my $name (@menuorder) { + substr($name, 0, length($parent), ""); + next if (($name eq "") || ($name =~ /--/)); + + my $menu_item = $menu->{"${parent}${name}"}; + my $item = { 'title' => $::locale->text($name) }; + push @{ $all_items }, $item; + + if ($menu_item->{submenu} || !defined($menu_item->{module}) || ($menu_item->{module} eq "menu.pl")) { + $item->{subitems} = []; + $item->{image} = _icon_path("$name.png"); + $self->create_menu($menu, $item->{subitems}, "${parent}${name}", $depth * 1 + 1); + + } else { + $item->{image} = _icon_path("${parent}${name}.png"); + $menu->menuitem_new("${parent}${name}", $item); + } + } +} + +sub _icon_path { + my ($label, $size) = @_; + + $size ||= 16; + + my $img = "image/icons/${size}x${size}/$label"; + + return unless -f $img; + return $img; +} + +1; diff --git a/SL/Layout/Login.pm b/SL/Layout/Login.pm new file mode 100644 index 000000000..ed649d052 --- /dev/null +++ b/SL/Layout/Login.pm @@ -0,0 +1,26 @@ +package SL::Layout::Login; + +use strict; +use parent qw(SL::Layout::Base); + +sub new { + my ($class, @slurp) = @_; + + my $self = $class->SUPER::new(@slurp); + + $self->add_sub_layouts([ + SL::Layout::None->new, + ]); + + $self; +} + +sub start_content { + "\n"; +} + +1; diff --git a/SL/Layout/MenuLeft.pm b/SL/Layout/MenuLeft.pm new file mode 100644 index 000000000..2cee4ea29 --- /dev/null +++ b/SL/Layout/MenuLeft.pm @@ -0,0 +1,185 @@ +package SL::Layout::MenuLeft; + +use strict; +use parent qw(SL::Layout::Base); + +use URI; + +use List::MoreUtils qw(apply); + +sub stylesheets { + qw(icons16.css icons24.css menu.css) +} + +sub javascripts_inline { + my $self = shift; + my $sections = [ section_menu($self->menu) ]; + $self->render('menu/menu', { partial => 1, no_output => 1 }, + sections => $sections, + ) +} + +sub javascripts { + 'js/jquery.cookie.js'; +} + +sub pre_content { + "
    \n"; +} + +sub start_content { + "
    \n"; +} + +sub end_content { + "
    \n"; +} + +sub section_menu { + $::lxdebug->enter_sub(2); + my ($menu, $level, $id_prefix) = @_; + my @menuorder = $menu->access_control(\%::myconfig, $level); + my @items; + + my $id = 0; + + for my $item (@menuorder) { + my $menuitem = $menu->{$item}; + my $olabel = apply { s/.*--// } $item; + my $ml = apply { s/--.*// } $item; + my $icon_class = apply { y/ /-/ } $item; + my $spacer = "s" . (0 + $item =~ s/--/--/g); + + next if $level && $item ne "$level--$olabel"; + + my $label = $::locale->text($olabel); + + $menuitem->{module} ||= $::form->{script}; + $menuitem->{action} ||= "section_menu"; + $menuitem->{href} ||= "$menuitem->{module}?action=$menuitem->{action}"; + + # add other params + foreach my $key (keys %$menuitem) { + next if $key =~ /target|module|action|href/; + $menuitem->{href} .= "&" . $::form->escape($key, 1) . "="; + my ($value, $conf) = split(/=/, $menuitem->{$key}, 2); + $value = $::myconfig{$value} . "/$conf" if ($conf); + $menuitem->{href} .= $::form->escape($value, 1); + } + + my $anchor = $menuitem->{href}; + + my @common_args = ($label, $spacer, "$id_prefix\_$id"); + + if (!$level) { # toplevel + push @items, [ @common_args, "icon24 $icon_class", 'm' ]; + # make_image(size => 24, label => $item), + push @items, section_menu($menu, $item, "$id_prefix\_$id"); + } elsif ($menuitem->{submenu}) { + push @items, [ @common_args, "icon16 submenu", 'sm' ]; + #make_image(label => 'submenu'), + push @items, section_menu($menu, $item, "$id_prefix\_$id"); + } elsif ($menuitem->{module}) { + push @items, [ @common_args, "icon16 $icon_class", 'i', $anchor ]; + #make_image(size => 16, label => $item), + } + } continue { + $id++; + } + + $::lxdebug->leave_sub(2); + return @items; +} + +sub _calc_framesize { + my $is_lynx_browser = $ENV{HTTP_USER_AGENT} =~ /links/i; + my $is_mobile_browser = $ENV{HTTP_USER_AGENT} =~ /mobile/i; + my $is_mobile_style = $::form->{stylesheet} =~ /mobile/i; + + return $is_mobile_browser && $is_mobile_style ? 130 + : $is_lynx_browser ? 240 + : 200; +} + +sub _show_images { + # don't show images in links + _calc_framesize() != 240; +} + +1; + +__END__ + +=encoding utf-8 + +=head1 NAME + +SL::Layout::MenuLeft - ex html meanu, now only left menu + +=head1 DOM MODEL + +Data will be embedded into the page as a json array of entries. +Each entry is another array with the following fields: + + 0: title + 1: indentation classes + 2: unique id + 3: icon classes + 4: role classes + +From each entry the following dom will be generated, with [0] being entry 0 of +the data array: + +
    + +The classes are minified to keep the json somewhat in check, their meaning is as follows: + +=over 4 + +=item Indentation Classes + + s0: No indentation + s1: One level of indentation + s2: Two levels of indentation + +=item Icon Classes + +Each icon consists of two classes, one for the icon, and one for the size. +The icon classes are taken from the file names, for example C is +the icon for master data, and refers to Master-Icon.png. + + icon16: 16x16 icon + icon24: 24x24 icon + icon32: 32x32 icon + +=item Role Classes + +Role classes may be used to style types of links differently. Currently used: + + ml: menu link, any tag will have this + mi: menu item, the enclosing div for each entry has this + mii: menu item icon, the enclosing div for the icons has this + ms: menu spacer, the first in the link will have this + m: menu, only top level entries have this + i: item, only leaf entries have this + sm: sub menu, eveything that is not top nor leaf has this + mic: menu item content, the span with the human readable description has this + +=back + +=head1 BUGS + +none yet + +=head1 AUTHOR + +Sven Schoeling Es.schoeling@linet-services.deE + +=cut diff --git a/SL/Layout/None.pm b/SL/Layout/None.pm new file mode 100644 index 000000000..0e65e8acd --- /dev/null +++ b/SL/Layout/None.pm @@ -0,0 +1,34 @@ +package SL::Layout::None; + +use strict; +use parent qw(SL::Layout::Base); + +sub javascripts_inline { + _setup_formats(), + _setup_focus(), +} + +sub use_javascript { + 'js/common.js' +} + +sub use_stylesheet { + 'main.css' +} + +sub _setup_formats { + $::form->parse_html_template('layout/javascript_setup') +} + +sub _setup_focus { + if ($::request->{layout}->focus || $::form->{fokus}) { + return $::form->parse_html_template('layout/focus_setup', { + focus => $::request->{layout}->focus, + fokus => $::form->{fokus}, + }) + } else { + return (); + } +} + +1; diff --git a/SL/Layout/Top.pm b/SL/Layout/Top.pm new file mode 100644 index 000000000..f007e09cb --- /dev/null +++ b/SL/Layout/Top.pm @@ -0,0 +1,46 @@ +package SL::Layout::Top; + +use strict; +use parent qw(SL::Layout::Base); + +sub pre_content { + my ($self) = @_; + + $self->SUPER::render('menu/header', { partial => 1, no_output => 1 }, + now => DateTime->now_local, + is_fastcgi => scalar($::dispatcher->interface_type =~ /fastcgi/i), + is_links => scalar($ENV{HTTP_USER_AGENT} =~ /links/i)); +} + +sub stylesheets { + 'frame_header/header.css'; +} + +1; + +__END__ + +=encoding utf-8 + +=head1 NAME + +SL::Layout::Top - Top line in classic and v4 menu. + +=head1 DOM MODEL + +The entire top line is rendered into a div with id C. The following classes are used: + + frame-header-element: any continuous block of entries + frame-header-left: the left floating part + frame-header-right: the right floating part + frame-header-center: the centered part + +=head1 BUGS + +none yet. :) + +=head1 AUTHOR + +Sven Schoeling Es.schoeling@linet-services.deE + +=cut diff --git a/SL/Layout/V3.pm b/SL/Layout/V3.pm new file mode 100644 index 000000000..4769c4062 --- /dev/null +++ b/SL/Layout/V3.pm @@ -0,0 +1,40 @@ +package SL::Layout::V3; + +use strict; +use parent qw(SL::Layout::Base); +use SL::Layout::Css; + +use URI; + +sub init_sub_layouts { + [ SL::Layout::None->new ] +} + +sub pre_content { + &render; +} + +sub start_content { + "
    \n"; +} + +sub end_content { + "
    \n"; +} + +sub render { + my ($self) = @_; + + my $callback = $::form->unescape($::form->{callback}); + $callback = URI->new($callback)->rel($callback) if $callback; + $callback = "login.pl?action=company_logo" if $callback =~ /^(\.\/)?$/; + + $self->SUPER::render('menu/menuv3', { no_menu => 1, no_output => 1 }, + force_ul_width => 1, + date => $self->clock_line, + menu => $self->print_menu, + callback => $callback, + ); +} + +1; diff --git a/SL/Layout/V4.pm b/SL/Layout/V4.pm new file mode 100644 index 000000000..81789d466 --- /dev/null +++ b/SL/Layout/V4.pm @@ -0,0 +1,44 @@ +package SL::Layout::V4; + +use strict; +use parent qw(SL::Layout::Base); +use SL::Layout::Css; +use SL::Layout::Top; + +use URI; + +sub init_sub_layouts { + [ + SL::Layout::Top->new, + SL::Layout::None->new, + ] +} + +sub start_content { + "
    \n"; +} + +sub end_content { + "
    \n"; +} + +sub pre_content { + my ($self) = @_; + + $self->{sub_class} = 1; + + my $callback = $::form->unescape($::form->{callback}); + $callback = URI->new($callback)->rel($callback) if $callback; + $callback = "login.pl?action=company_logo" if $callback =~ /^(\.\/)?$/; + + $self->SUPER::pre_content . + + $self->SUPER::render('menu/menuv4', { no_menu => 1, no_output => 1 }, + force_ul_width => 1, + date => $self->clock_line, + menu => $self->print_menu, + callback => $callback, + ); +} + +1; diff --git a/SL/Menu.pm b/SL/Menu.pm index ab35fed1a..48ac6229d 100644 --- a/SL/Menu.pm +++ b/SL/Menu.pm @@ -58,83 +58,6 @@ sub new { return $self; } -sub menuitem { - $main::lxdebug->enter_sub(); - - my ($self, $myconfig, $form, $item) = @_; - - my $module = $self->{$item}{module} || $form->{script}; - my $action = $self->{$item}{action} || "section_menu"; - my $target = $self->{$item}{target} || ""; - - my $level = $form->escape($item); - - my $style = 'style="vertical-align:top"'; - my $target_token = ($target) - ? "target='$target'" : ''; - - my $href = ($self->{$item}{href}) - ? $form->escape($self->{$item}{href}) - : "$module?action=$action&level=$level"; - - my @vars = ($self->{$item}{href}) - ? qw(module target href) - : qw(module action target href); - -# map { delete $self->{$item}{$_} } @vars; - - # add other params - foreach my $key (keys %{ $self->{$item} }) { - $href .= "&" . $form->escape($key, 1) . "="; - my ($value, $conf) = split(/=/, $self->{$item}{$key}, 2); - $value = $myconfig->{$value} . "/$conf" if ($conf); - $href .= $form->escape($value, 1); - } - - my $str = "
    "; - - $main::lxdebug->leave_sub(); - - return $str; -} - -sub menuitem_js { - 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?action=$action&level=$level|; - 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) . "="; - my ($value, $conf) = split(/=/, $self->{$item}{$key}, 2); - $value = $myconfig->{$value} . "/$conf" if ($conf); - $str .= $form->escape($value, 1); - } - - $str .= " "; - -} - sub menuitem_new { $main::lxdebug->enter_sub(); @@ -164,122 +87,6 @@ sub menuitem_new { $main::lxdebug->leave_sub(); } -sub menuitem_v3 { - $main::lxdebug->enter_sub(); - - my ($self, $myconfig, $form, $item, $other) = @_; - - my $module = $form->{script}; - my $action = "section_menu"; - my $target = ""; - - if ($self->{$item}{module}) { - $module = $self->{$item}{module}; - } - if ($self->{$item}{action}) { - $action = $self->{$item}{action}; - } - if ($self->{$item}{target}) { - $target = $self->{$item}{target}; - } - - my $level = $form->escape($item); - - my $str = qq|escape($key, 1) . "="; - my ($value, $conf) = split(/=/, $self->{$item}{$key}, 2); - $value = $myconfig->{$value} . "/$conf" if ($conf); - $str .= $form->escape($value, 1); - } - - $str .= '"'; - - if ($target) { - $str .= qq| target="| . $form->quote($target) . qq|"|; - } - - if ($other) { - foreach my $key (keys(%{$other})) { - $str .= qq| ${key}="| . $form->quote($other->{$key}) . qq|"|; - } - } - - $str .= ">"; - - $main::lxdebug->leave_sub(); - - return $str; -} - -sub menuitem_XML { - $main::lxdebug->enter_sub(); - - my ($self, $myconfig, $form, $item, $other) = @_; - - my $module = $form->{script}; - my $action = "section_menu"; - my $target = ""; - - if ($self->{$item}{module}) { - $module = $self->{$item}{module}; - } - if ($self->{$item}{action}) { - $action = $self->{$item}{action}; - } - if ($self->{$item}{target}) { - $target = $self->{$item}{target}; - } - - my $level = $form->escape($item); - - my $str = qq| link="$module?action=| . $form->escape($action) . - qq|&level=| . $form->escape($level); - - my @vars = qw(module action target href); - - if ($self->{$item}{href}) { - $str = qq| link=$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) . "="; - my ($value, $conf) = split(/=/, $self->{$item}{$key}, 2); - $value = $myconfig->{$value} . "/$conf" if ($conf); - $str .= $form->escape($value, 1); - } - - $str .= '"'; - - - - if ($other) { - foreach my $key (keys(%{$other})) { - $str .= qq| ${key}="| . $form->quote($other->{$key}) . qq|"|; - } - } - - - $main::lxdebug->leave_sub(); - - return $str; -} - sub access_control { $main::lxdebug->enter_sub(2); diff --git a/SL/ReportGenerator.pm b/SL/ReportGenerator.pm index 688f165bc..deb4e19fe 100644 --- a/SL/ReportGenerator.pm +++ b/SL/ReportGenerator.pm @@ -72,7 +72,7 @@ sub set_columns { foreach my $column (values %{ $self->{columns} }) { $column->{visible} = $self->{options}->{std_column_visibility} unless defined $column->{visible}; } - + if( $::form->{report_generator_csv_options_for_import} ) { foreach my $key (keys %{ $self->{columns} }) { $self->{columns}{$key}{text} = $key; @@ -220,7 +220,7 @@ sub get_attachment_basename { } sub generate_with_headers { - my $self = shift; + my ($self, %params) = @_; my $format = lc $self->{options}->{output_format}; my $form = $self->{form}; @@ -231,7 +231,7 @@ sub generate_with_headers { if ($format eq 'html') { my $title = $form->{title}; $form->{title} = $self->{title} if ($self->{title}); - $form->header(); + $form->header(no_layout => $params{no_layout}); $form->{title} = $title; print $self->generate_html_content(); @@ -410,7 +410,8 @@ sub generate_html_content { my $self = shift; my $variables = $self->prepare_html_content(); - return $self->{form}->parse_html_template($self->{options}->{html_template}, $variables); + my $stuff = $self->{form}->parse_html_template($self->{options}->{html_template}, $variables); + return $stuff; } sub _cm2bp { diff --git a/SL/User.pm b/SL/User.pm index 2de54ee5e..5255c8eee 100644 --- a/SL/User.pm +++ b/SL/User.pm @@ -136,7 +136,6 @@ sub login { $dbh->disconnect; if ($update_available) { - $form->{"stylesheet"} = "lx-office-erp.css"; $form->{"title"} = $main::locale->text("Dataset upgrade"); $form->header(); print $form->parse_html_template("dbupgrade/header"); diff --git a/bin/mozilla/admin.pl b/bin/mozilla/admin.pl index c704174c8..0a7145a60 100755 --- a/bin/mozilla/admin.pl +++ b/bin/mozilla/admin.pl @@ -91,7 +91,8 @@ sub run { $locale = $::locale; $auth = $::auth; - $form->{stylesheet} = "lx-office-erp.css"; + $::request->{layout} = SL::Layout::Dispatcher->new(style => 'admin'); + $::request->{layout}->use_stylesheet("lx-office-erp.css"); $form->{favicon} = "favicon.ico"; if ($form->{action}) { @@ -703,7 +704,7 @@ sub dbupdate { my $form = $main::form; my $locale = $main::locale; - $form->{stylesheet} = "lx-office-erp.css"; + $::request->{layout}->use_stylesheet("lx-office-erp.css"); $form->{title} = $locale->text("Dataset upgrade"); $form->header(); diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl index c84772813..f967c7975 100644 --- a/bin/mozilla/am.pl +++ b/bin/mozilla/am.pl @@ -466,7 +466,7 @@ sub list_account { $ca->{link_edit_account} = $link_edit_account . '&id=' . E($ca->{id}); } - $form->use_stylesheet("list_accounts.css"); + $::request->{layout}->use_stylesheet("list_accounts.css"); $form->{title} = $locale->text('Chart of Accounts'); $form->header; diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index 9860530ad..e31f322b6 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -409,11 +409,7 @@ sub form_header { '-default' => $form->{"globalproject_id"} )); $form->header; - my $onload = qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|; - $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|; print qq| - -
    {script}> {id}> @@ -1164,8 +1160,6 @@ sub delete { delete $form->{header}; print qq| - - {script}> |; @@ -1185,9 +1179,6 @@ sub delete {
    - - - |; $main::lxdebug->leave_sub(); diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index 45193ed87..2e82596cf 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -219,7 +219,6 @@ sub form_header { my ($title, $readonly, $exchangerate, $rows); my ($notes, $department, $customer, $employee, $amount, $project); - my ($onload); my ($ARselected); @@ -326,9 +325,6 @@ sub form_header { qq|| . qq||; - $onload = qq|focus()|; - $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|; - # $amount = $locale->text('Amount'); # $project = $locale->text('Project'); @@ -443,7 +439,6 @@ sub form_header { project_labels => \%project_labels, rows => $rows, ARselected => $ARselected, - onload => $onload, title_str => $title, follow_up_trans_info => $follow_up_trans_info, }); @@ -547,9 +542,6 @@ $follow_ups_block print " - - - "; $main::lxdebug->leave_sub(); @@ -850,8 +842,6 @@ sub delete { delete $form->{header}; print qq| - -
    {script}> |; @@ -871,9 +861,6 @@ sub delete {
    - - - |; $main::lxdebug->leave_sub(); @@ -914,7 +901,7 @@ sub search { my $cgi = $::request->{cgi}; my ($customer, $department); - my ($jsscript, $button1, $button2, $onload); + my ($jsscript, $button1, $button2); # setup customer selection $form->all_vc(\%myconfig, "customer", "AR"); diff --git a/bin/mozilla/arap.pl b/bin/mozilla/arap.pl index 3b1a44311..27b0e3bfa 100644 --- a/bin/mozilla/arap.pl +++ b/bin/mozilla/arap.pl @@ -169,8 +169,6 @@ sub select_name { my $title = $locale->text('Select from one of the names below'); print qq| - -
    {script}> @@ -249,9 +247,6 @@ sub select_name { - - - |; $main::lxdebug->leave_sub(); diff --git a/bin/mozilla/ca.pl b/bin/mozilla/ca.pl index af6c6c824..4cababbe6 100644 --- a/bin/mozilla/ca.pl +++ b/bin/mozilla/ca.pl @@ -154,13 +154,8 @@ sub list { $::form->{title} = $::locale->text('List Transactions') . " - " . $::locale->text('Account') . " $::form->{accno}"; - my $onload = qq|focus()|; - $onload .= qq|;setupDateFormat('$::myconfig{dateformat}', '|. $::locale->text("Falsches Datumsformat!") .qq|')|; - $onload .= qq|;setupPoints('$::myconfig{numberformat}', '|. $::locale->text("wrongformat") .qq|')|; - $::form->header; print $::form->parse_html_template('ca/list', { - onload => $onload, year => DateTime->today->year, cash => $::instance_conf->get_accounting_method eq 'cash', }); diff --git a/bin/mozilla/common.pl b/bin/mozilla/common.pl index 1b054cf22..59c2f9481 100644 --- a/bin/mozilla/common.pl +++ b/bin/mozilla/common.pl @@ -169,12 +169,11 @@ sub part_selection_internal { map { $form->{$_} = $options{$_} if ($options{$_}) } qw(no_services no_assemblies assemblies click_button); my $parts = Common->retrieve_parts(\%myconfig, $form, $order_by, $order_dir); - my $onload; if (0 == scalar(@{$parts})) { $form->show_generic_information($locale->text("No part was found matching the search parameters.")); } elsif (1 == scalar(@{$parts})) { - $onload = "part_selected('1')"; + $::request->{layout}->add_javascripts_inline("part_selected('1')"); } map { $parts->[$_]->{selected} = $_ ? 0 : 1; } (0..$#{$parts}); @@ -197,10 +196,9 @@ sub part_selection_internal { $form->{formname} ||= 'Form'; $form->{title} = $locale->text("Select a part"); - $form->header(); + $form->header(no_layout => 1); print $form->parse_html_template("generic/part_selection", { "HEADER" => \@header, - "PARTS" => $parts, - "onload" => $onload }); + "PARTS" => $parts, }); $main::lxdebug->leave_sub(); } @@ -222,11 +220,10 @@ sub delivery_customer_selection { my $delivery = Common->retrieve_delivery_customer(\%myconfig, $form, $order_by, $order_dir); map({ $delivery->[$_]->{"selected"} = $_ ? 0 : 1; } (0..$#{$delivery})); - my $onload; if (0 == scalar(@{$delivery})) { $form->show_generic_information($locale->text("No Customer was found matching the search parameters.")); } elsif (1 == scalar(@{$delivery})) { - $onload = "customer_selected('1')"; + $::request->{layout}->add_javascripts_inline("customer_selected('1')"); } my $callback = "$form->{script}?action=delivery_customer_selection&"; @@ -247,10 +244,9 @@ sub delivery_customer_selection { @header_sort); $form->{"title"} = $locale->text("Select a Customer"); - $form->header(); + $form->header(no_layout => 1); print $form->parse_html_template("generic/select_delivery_customer", { "HEADER" => \@header, - "DELIVERY" => $delivery, - "onload" => $onload }); + "DELIVERY" => $delivery, }); $main::lxdebug->leave_sub(); } @@ -272,11 +268,10 @@ sub vendor_selection { my $vendor = Common->retrieve_vendor(\%myconfig, $form, $order_by, $order_dir); map({ $vendor->[$_]->{"selected"} = $_ ? 0 : 1; } (0..$#{$vendor})); - my $onload; if (0 == scalar(@{$vendor})) { $form->show_generic_information($locale->text("No Vendor was found matching the search parameters.")); } elsif (1 == scalar(@{$vendor})) { - $onload = "vendor_selected('1')"; + $::request->{layout}->add_javascripts_inline("vendor_selected('1')"); } my $callback = "$form->{script}?action=vendor_selection&"; @@ -297,10 +292,9 @@ sub vendor_selection { @header_sort); $form->{"title"} = $locale->text("Select a Customer"); - $form->header(); + $form->header(no_layout => 1); print $form->parse_html_template("generic/select_vendor", { "HEADER" => \@header, - "VENDOR" => $vendor, - "onload" => $onload }); + "VENDOR" => $vendor, }); $main::lxdebug->leave_sub(); } @@ -317,7 +311,6 @@ sub calculate_qty { my ($variable_string, $formel) = split /###/,$form->{formel}; my @variable; - my $onload; # note! this sub is mostly called over a javascript invocation, and it's unlikey that onload is set. foreach my $item (split m/;/, $variable_string) { next unless $item =~ m/^ \s* (\w+) \s* = \s* (\w+) \s* (\w+) \s* $/x; @@ -341,10 +334,9 @@ sub calculate_qty { $form->{formel} = $formel; $form->{title} = $locale->text("Please enter values"); - $form->header(); + $form->header(no_layout => 1); print $form->parse_html_template("generic/calculate_qty", { "HEADER" => \@header, - "VARIABLES" => \@variable, - "onload" => $onload }); + "VARIABLES" => \@variable, }); $main::lxdebug->leave_sub(); } @@ -358,7 +350,7 @@ sub set_longdescription { my $locale = $main::locale; $form->{title} = $locale->text("Enter longdescription"); - $form->header(); + $form->header(no_layout => 1); print $form->parse_html_template("generic/set_longdescription"); $main::lxdebug->leave_sub(); @@ -407,12 +399,12 @@ sub show_history { $sort =~ s/.*\.(.*)/$1/; $form->{title} = $locale->text("History"); - $form->header(); + $form->header(no_layout => 1); print $form->parse_html_template( "common/show_history", { "DATEN" => $form->get_history($dbh,$form->{input_name},"",$form->{order}), "SUCCESS" => ($form->get_history($dbh,$form->{input_name}) ne "0"), uc($sort) => 1, - uc($sort)."BY" => $sortby + uc($sort)."BY" => $sortby, } ); $dbh->disconnect(); @@ -466,7 +458,7 @@ sub show_vc_details { $form->{title} = $form->{vc} eq "customer" ? $locale->text("Customer details") : $locale->text("Vendor details"); - $form->header(); + $form->header(no_layout => 1); print $form->parse_html_template("common/show_vc_details", { "is_customer" => $form->{vc} eq "customer" }); $main::lxdebug->leave_sub(); @@ -524,11 +516,9 @@ sub mark_as_paid_common { } $referer = $script . "?action=mark_as_paid&mark_as_paid=1&id=$form->{id}" . $callback; $form->header(); - print qq||; print qq|

    |.$locale->text('Mark as paid?').qq|

    |; print qq| |; print qq||; - print qq||; } $main::lxdebug->leave_sub(); @@ -551,11 +541,10 @@ sub cov_selection_internal { my $covs = Common->retrieve_customers_or_vendors(\%myconfig, $form, $order_by, $order_dir, $form->{"is_vendor"}, $form->{"allow_both"}); map({ $covs->[$_]->{"selected"} = $_ ? 0 : 1; } (0..$#{$covs})); - my $onload; if (0 == scalar(@{$covs})) { $form->show_generic_information(sprintf($locale->text("No %s was found matching the search parameters."), $type)); } elsif (1 == scalar(@{$covs})) { - $onload = "cov_selected('1')"; + $::request->{layout}->add_javascripts_inline("cov_selected('1')"); } my $callback = "$form->{script}?action=cov_selection_internal&"; @@ -587,8 +576,7 @@ sub cov_selection_internal { $form->{"title"} = $form->{is_vendor} ? $locale->text("Select a vendor") : $locale->text("Select a customer"); $form->header(); print($form->parse_html_template("generic/cov_selection", { "HEADER" => \@header, - "COVS" => $covs, - "onload" => $onload })); + "COVS" => $covs, })); $main::lxdebug->leave_sub(); } diff --git a/bin/mozilla/cp.pl b/bin/mozilla/cp.pl index a8caa526b..5fbf7c0a2 100644 --- a/bin/mozilla/cp.pl +++ b/bin/mozilla/cp.pl @@ -84,7 +84,7 @@ sub payment { # Standard Konto für Umlaufvermögen my $accno_arap = IS->get_standard_accno_current_assets(\%myconfig, \%$form); - # Entsprechend präventiv die Auswahlliste für Kontonummer + # Entsprechend präventiv die Auswahlliste für Kontonummer # auch mit value= zusammenbauen (s.a. oben bugfix 1771) # Wichtig: Auch das Template anpassen, damit hidden input korrekt die " # escaped. @@ -114,7 +114,7 @@ sub payment { $form->{defaultcurrency} = $form->{currency} = $form->{oldcurrency} = $curr[0]; - # Entsprechend präventiv die Auswahlliste für Währungen + # Entsprechend präventiv die Auswahlliste für Währungen # auch mit value= zusammenbauen (s.a. oben bugfix 1771) $form->{selectcurrency} = ""; map { $form->{selectcurrency} .= "\n" } @curr; @@ -132,7 +132,6 @@ sub form_header { $auth->assert('cash'); my ($vc, $arap, $exchangerate); - my ($onload); if ($form->{ $form->{vc} } eq "") { map { $form->{"addr$_"} = "" } (1 .. 4); @@ -167,14 +166,10 @@ sub form_header { $form->header; $arap = lc $form->{ARAP}; - $onload = qq|focus()|; - $onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|; - $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|; print $::form->parse_html_template('cp/form_header', { is_customer => $form->{vc} eq 'customer', is_receipt => $form->{type} eq 'receipt', - onload => $onload, arap => $arap, vccontent => $vc, }); @@ -278,8 +273,8 @@ sub update { $form->{customer_id} = $form->{AR}[0]{customer_id}; } - # search by invoicenumber, - if ($form->{invnumber}) { + # search by invoicenumber, + if ($form->{invnumber}) { $form->{open} ='Y'; # only open invoices if ($form->{ARAP} eq 'AR'){ # ar_transactions automatically searches by $form->{customer_id} or else diff --git a/bin/mozilla/dn.pl b/bin/mozilla/dn.pl index 627f69633..378e5a17c 100644 --- a/bin/mozilla/dn.pl +++ b/bin/mozilla/dn.pl @@ -154,8 +154,6 @@ sub show_invoices { 'no_opendocument' => 1,); $form->header(); - $form->{onload} = "document.getElementsByName('language_id')[0].disabled = - !document.getElementsByName('force_lang')[0].checked;"; print $form->parse_html_template("dunning/show_invoices"); $main::lxdebug->leave_sub(); @@ -285,7 +283,7 @@ sub set_email { $main::auth->assert('dunning_edit'); $form->{"title"} = $locale->text("Set eMail text"); - $form->header(); + $form->header(no_layout => 1); print($form->parse_html_template("dunning/set_email")); $main::lxdebug->leave_sub(); @@ -312,14 +310,10 @@ sub search { $form->{jsscript} = 1; $form->{title} = $locale->text('Dunnings'); - $form->{fokus} = "search.customer"; + $::request->{layout}->focus('#customer'); $form->header(); - $form->{onload} = qq|focus()| - . qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')| - . qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|; - print $form->parse_html_template("dunning/search"); $main::lxdebug->leave_sub(); @@ -460,8 +454,6 @@ sub show_dunning { $report->set_options_from_form(); - $form->{onload} = "document.getElementsByName('language_id')[0].disabled = - !document.getElementsByName('force_lang')[0].checked;"; $report->generate_with_headers(); $main::lxdebug->leave_sub(); diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index 1dc880ef9..b58cd7190 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -297,14 +297,15 @@ sub form_header { $form->{oldvcname} = $form->{"old$form->{vc}"}; $form->{oldvcname} =~ s/--.*//; - $form->{onload} = ""; if ($form->{resubmit}) { + my $dispatch_to_popup = ''; if ($form->{format} eq "html") { - $form->{onload} = "window.open('about:blank','Beleg'); document.do.target = 'Beleg';"; + $dispatch_to_popup .= "window.open('about:blank','Beleg'); document.do.target = 'Beleg';"; } # emulate click for resubmitting actions - $form->{onload} .= "document.do.${_}.click(); " for grep { /^action_/ } keys %$form; - $form->{onload} .= "document.do.submit();" + $dispatch_to_popup .= "document.do.${_}.click(); " for grep { /^action_/ } keys %$form; + $dispatch_to_popup .= "document.do.submit();"; + $::request->{layout}->add_javascripts_inline("\$(function(){$dispatch_to_popup)"); } my $follow_up_vc = $form->{ $form->{vc} eq 'customer' ? 'customer' : 'vendor' }; @@ -1149,7 +1150,7 @@ sub display_stock_in_form { get_basic_bin_wh_info($stock_info); - $form->header(); + $form->header(no_layout => 1); print $form->parse_html_template('do/stock_in_form', { 'UNITS' => $units_data, 'STOCK_INFO' => $stock_info, 'PART_INFO' => $part_info, }); @@ -1243,7 +1244,7 @@ sub stock_out_form { } } - $form->header(); + $form->header(no_layout => 1); print $form->parse_html_template('do/stock_out_form', { 'UNITS' => $units_data, 'WHCONTENTS' => $form->{delivered} ? $stock_info : \@contents, 'PART_INFO' => $part_info, }); diff --git a/bin/mozilla/drafts.pl b/bin/mozilla/drafts.pl index c471d009b..cac7bea36 100644 --- a/bin/mozilla/drafts.pl +++ b/bin/mozilla/drafts.pl @@ -26,7 +26,7 @@ sub save_draft { restore_form($form->{SAVED_FORM}, 1) if ($form->{SAVED_FORM}); delete $form->{SAVED_FORM}; - $form->{SAVED_FORM} = save_form(qw(stylesheet login password)); + $form->{SAVED_FORM} = save_form(qw(login password)); $form->{remove_draft} = 1; $form->header(); @@ -79,7 +79,7 @@ sub load_draft_maybe { $draft_nextsub = "add" unless ($draft_nextsub); delete $form->{action}; - my $saved_form = save_form(qw(stylesheet login password)); + my $saved_form = save_form(qw(login password)); $form->header(); print($form->parse_html_template("drafts/load", @@ -129,7 +129,7 @@ sub load_draft { $form->{draft_description} = $description; $form->{remove_draft} = 'checked'; } - # Ich vergesse bei Rechnungsentwürfe das Rechnungsdatum zu ändern. Dadurch entstehen + # Ich vergesse bei Rechnungsentwürfe das Rechnungsdatum zu ändern. Dadurch entstehen # ungültige Belege. Vielleicht geht es anderen ähnlich jan 19.2.2011 $form->{invdate} = $form->current_date(\%myconfig); # Aktuelles Rechnungsdatum ... $form->{duedate} = $form->current_date(\%myconfig); # Aktuelles Fälligkeitsdatum ... diff --git a/bin/mozilla/fu.pl b/bin/mozilla/fu.pl index b2e603780..3b5adb230 100644 --- a/bin/mozilla/fu.pl +++ b/bin/mozilla/fu.pl @@ -93,7 +93,7 @@ sub display_form { $form->{jsscript} = 1; - $form->header(); + $form->header(no_layout => $::form->{POPUP_MODE}); print $form->parse_html_template('fu/add_edit'); $main::lxdebug->leave_sub(); diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index fb6166f18..fd67b5f4c 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -220,13 +220,8 @@ sub search { ); $::form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]); - my $onload = "focus()" - . qq|;setupDateFormat('|. $::myconfig{dateformat} . qq|', '| . $::locale->text("Falsches Datumsformat!") . qq|')| - . qq|;setupPoints('|. $::myconfig{numberformat} . qq|', '| . $::locale->text("wrongformat") . qq|')|; - $::form->header; print $::form->parse_html_template('gl/search', { - onload => $onload, department_label => sub { ("$_[0]{description}--$_[0]{id}")x2 }, employee_label => sub { "$_[0]{id}--$_[0]{name}" }, }); @@ -494,7 +489,7 @@ sub generate_report { $data .= $sh; $row->{balance}->{data} = $data; - + if ( !$form->{report_generator_csv_options_for_import} ) { $report->add_separator(); $report->add_data($row); @@ -928,8 +923,6 @@ sub delete { $form->header; print qq| - - |; diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl index 2dc3366d6..2cbad4f62 100644 --- a/bin/mozilla/ic.pl +++ b/bin/mozilla/ic.pl @@ -288,7 +288,6 @@ sub update_prices { # $form->header; # # print qq| -# # #
    # @@ -388,8 +387,6 @@ sub update_prices { # . $locale->text('TOP100') . qq|"> # # -# -# #|; # $lxdebug->leave_sub(); #} #end list() @@ -725,8 +722,6 @@ sub addtop100 { my $colspan = $#column_index + 1; print qq| - -
    @@ -981,9 +976,6 @@ sub addtop100 { . $locale->text('choice') . qq|"> - - - |; $lxdebug->leave_sub(); diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 1aa0248d0..74b4e6591 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -488,7 +488,7 @@ sub select_item { } @{ $::form->{item_list} }; # delete action variable - delete @{$::form}{qw(action item_list header)}; + delete @{$::form}{qw(action item_list)}; print $::form->parse_html_template('io/select_item', { PREVIOUS_FORM => $previous_form, MODE => $mode, diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index 844f694d9..8a8df0ba2 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -780,8 +780,6 @@ sub delete { $form->header; print qq| - - {script}> |; diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index b08e5dbe0..58d4c4f91 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -835,7 +835,7 @@ sub storno { $form->error($locale->text("Invoice has already been storno'd!")); } - map({ my $key = $_; delete($form->{$key}) unless (grep({ $key eq $_ } qw(id login password stylesheet type))); } keys(%{ $form })); + map({ my $key = $_; delete($form->{$key}) unless (grep({ $key eq $_ } qw(id login password type))); } keys(%{ $form })); invoice_links(); prepare_invoice(); @@ -885,8 +885,6 @@ sub delete { $form->header; print qq| - - |; diff --git a/bin/mozilla/menu.pl b/bin/mozilla/menu.pl deleted file mode 100644 index d464c85d7..000000000 --- a/bin/mozilla/menu.pl +++ /dev/null @@ -1,237 +0,0 @@ -#===================================================================== -# LX-Office ERP -# Copyright (C) 2004 -# Based on SQL-Ledger Version 2.1.9 -# Web http://www.lx-office.org -# -###################################################################### -# 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. -####################################################################### -# -# the frame layout with refractured menu -# -# CHANGE LOG: -# DS. 2002-03-25 Created -# 2004-12-14 - New Optik - Marco Welter -# 2010-08-19 - Icons for sub entries and single click behavior, unlike XUL-Menu -# JS switchable HTML-menu - Sven Donath -####################################################################### - -use strict; - -use SL::Menu; -use Data::Dumper; -use URI; - -use List::MoreUtils qw(apply); - -my $menufile = "menu.ini"; -my $nbsp = ' '; -my $mainlevel; - -# end of main - -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 =~ /^(\.\/)?$/; - my $framesize = _calc_framesize(); - - $::form->header(doctype => 'frameset'); - - print qq| - - - - - - - - You need a browser that can read frames to see this page. - - - -|; - - $::lxdebug->leave_sub; -} - -sub acc_menu { - $::lxdebug->enter_sub; - - my $framesize = _calc_framesize() - 2; - my $menu = Menu->new("menu.ini"); - $mainlevel = $::form->{level}; - $::form->{title} = $::locale->text('kivitendo'); - $::form->header; - - print qq| - - -
    \n
    $form->{title}
    \n|; - - section_menu($menu); - - print qq|
    - - -|; - - $::lxdebug->leave_sub; -} - -sub section_menu { - $::lxdebug->enter_sub; - my ($menu, $level) = @_; - my @menuorder = $menu->access_control(\%::myconfig, $level); - - for my $item (@menuorder) { - my $menuitem = $menu->{$item}; - my $label = apply { s/.*--// } $item; - my $ml = apply { s/--.*// } $item; - my $show = $ml eq $mainlevel; - my $spacer = $nbsp x (($item =~ s/--/--/g) * 2); - my $label_icon = $level . "--" . $label . ".png"; - - next if $level && $item ne "$level--$label"; - - $label = $::locale->text($label); - - $menuitem->{target} ||= "main_window"; - - my $anchor = $menu->menuitem(\%::myconfig, $::form, $item, $level); - - if (!$level) { # toplevel - my $ml_ = $::form->escape($ml); - my $image = make_image(icon => $item . '.png', size => 24, label => $label, valign => 'middle'); - my $anchor = "
    "; - - print make_item(a => $anchor, img => $image, label => $label, height => 24); - section_menu($menu, $item); - - } elsif ($menuitem->{submenu}) { - my $image = make_image(submenu => 1); - if ($mainlevel && $item =~ /^\Q$mainlevel\E/) { - print make_item(spacer => $spacer, bold => 1, img => $image, label => $label) if $show; - section_menu($menu, $item); - } else { - print make_item(spacer => $spacer, a => $anchor, img => $image, label => $label . ' ...') if $show; - } - } elsif ($menuitem->{module}) { - my $image = make_image(label => $label, icon => $label_icon); - print make_item(img => $image, a => $anchor, spacer => $spacer, label => $label) if $show; - section_menu($menu, $item) if $show && $::form->{$item} && $::form->{level} eq $item; - } - } - $::lxdebug->leave_sub; -} - -sub make_item { - my %params = @_; - my $anchor = $params{a} || ''; - my @chunks = multiline($params{label}); - my $spacer = $params{spacer} || ''; - my $image = $params{img}; - my $height = $params{height} || 16; - my $a_end = $anchor ? '' : ''; - my $bold = $params{bold} ? '' : ''; - my $b_end = $bold ? '' : ''; - my $hidden_image = make_image(hidden => 1); - return join "\n", - "$bold$spacer$anchor$image$chunks[0]$a_end$b_end\n", - map "$bold$spacer$hidden_image$anchor$chunks[$_]$a_end$b_end\n", - 1..$#chunks; -} - -# multi line hack, sschoeling jul06 -# 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 -sub multiline { - my ($label) = @_; - my @chunks; - my $l = 20; - for (split / /, $label) { - $l += length $_; - if ($l < 20) { - $chunks[-1] .= " $_"; - } else { - $l = length $_; - push @chunks, $_; - } - } - return @chunks; -} - -sub make_image { - my (%params) = @_; - - my $label = $params{label}; - my $icon = $params{icon}; - my $hidden = $params{hidden}; - my $size = $params{size} || 16; - my $valign = $params{valign} || 'text-top'; - - return unless _show_images(); - - my $icon_found = $icon && -f _icon_path($icon, $size); - - my $image_url = $icon_found ? _icon_path($icon, $size) : "image/unterpunkt.png"; - my $style = $hidden ? "visibility:hidden" : "vertical-align:$valign"; - my $width = $hidden ? "width='$size'" : ''; - - my $padding = $size == 16 && $icon_found || $hidden ? $nbsp x 2 - : $size == 24 ? $nbsp - : ''; - - return "$padding"; -} - -sub _calc_framesize { - my $is_lynx_browser = $ENV{HTTP_USER_AGENT} =~ /links/i; - my $is_mobile_browser = $ENV{HTTP_USER_AGENT} =~ /mobile/i; - my $is_mobile_style = $::form->{stylesheet} =~ /mobile/i; - - return $is_mobile_browser && $is_mobile_style ? 130 - : $is_lynx_browser ? 240 - : 200; -} - -sub _show_images { - # don't show images in links - _calc_framesize() != 240; -} - -sub _icon_path { - my ($label, $size) = @_; - - $size ||= 16; - - return "image/icons/${size}x${size}/$label"; -} - -1; - -__END__ diff --git a/bin/mozilla/menujs.pl b/bin/mozilla/menujs.pl deleted file mode 100644 index 202f75c26..000000000 --- a/bin/mozilla/menujs.pl +++ /dev/null @@ -1,446 +0,0 @@ -#===================================================================== -# LX-Office ERP -# Copyright (C) 2004 -# Based on SQL-Ledger Version 2.1.9 -# Web http://www.lx-office.org -# -###################################################################### -# 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. -####################################################################### -# -# thre frame layout with refractured menu -# -# CHANGE LOG: -# DS. 2002-03-25 Created -# 2004-12-14 - Holger Lindemann -####################################################################### - -use utf8; -use strict; - -use SL::Menu; -use CGI::Carp qw(fatalsToBrowser); - -1; - -# end of main - -sub display { - - my $form = $main::form; - - $form->{callback} = $form->unescape($form->{callback}); - $form->{callback} ||= "login.pl?action=company_logo"; - - $form->header; - - &clock_line; - - &acc_menu; - - print qq| - - - - -|; - -} - -sub clock_line { - - my $form = $main::form; - - my $fensterlink="menujs.pl?action=display"; - my $fenster = "["."neues Fenster]"; - - my $login = "[Nutzer " - . $form->{login} - . " - " - . $::locale->text('Logout') - . "] "; - my ($Sekunden, $Minuten, $Stunden, $Monatstag, $Monat, - $Jahr, $Wochentag, $Jahrestag, $Sommerzeit) - = localtime(time); - my $CTIME_String = localtime(time); - $Monat += 1; - $Jahrestag += 1; - $Monat = $Monat < 10 ? $Monat = "0" . $Monat : $Monat; - $Monatstag = $Monatstag < 10 ? $Monatstag = "0" . $Monatstag : $Monatstag; - $Jahr += 1900; - my @Wochentage = ("Sonntag", "Montag", "Dienstag", "Mittwoch", - "Donnerstag", "Freitag", "Samstag"); - my @Monatsnamen = ("", "Januar", "Februar", "März", - "April", "Mai", "Juni", "Juli", - "August", "September", "Oktober", "November", - "Dezember"); - my $datum = - $Wochentage[$Wochentag] . ", der " - . $Monatstag . "." - . $Monat . "." - . $Jahr . " - "; - - #$zeit="
    ".$Stunden.":".$Minuten.":".$Sekunden."
    "; - my $zeit = "
    " . $Stunden . ":" . $Minuten . "
    "; - print qq| - - - - - - -
      $fenster   [drucken] - $login $datum   -
    -|; -} - -sub acc_menu { - - my $form = $main::form; - my %myconfig = %main::myconfig; - - my $mainlevel = $form->{level}; - $mainlevel =~ s/$mainlevel--//g; - my $menu = Menu->new("menu.ini"); - - $| = 1; - - print qq| - - - - - - - - - - - -|; - - print qq| - -|; - -} - -sub section_menu { - my ($menu, $level) = @_; - - my $form = $main::form; - my %myconfig = %main::myconfig; - - # build tiered menus - my @menuorder = $menu->access_control(\%myconfig, $level); - my $main = 0; - - #$pm=0; - my $shlp=0; - my (%mlz, $sm, $z, $pm, $mm); - while (@menuorder) { - my $item = shift @menuorder; - my $label = $item; - my $ml = $item; - $label =~ s/$level--//g; - $ml =~ s/--.*//; - $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}; - - # Untermen - if ($mlz{"s$ml"} > 1) { - $z++; - $sm = 1; - } else { - $z = $sm; - $mlz{"s$ml"}++; - } - print - qq|menu[$mlz{$ml}][$z] = new Item('$label', '#', '', defLength, 0, | - . ++$pm - . qq|);\n|; - $sm = 1; - print qq|menu[$pm] = new Array();\n|; - print - qq|menu[$pm][0] = new Menu(true, '', 85, 0, 180, defOver, defBack, 'itemBorder', 'itemText');\n|; - map { shift @menuorder } grep /^$item/, @menuorder; - §ion_menu($menu, $item); - map { shift @menuorder } grep /^$item/, @menuorder; - } else { - if ($menu->{$item}{module}) { - - #Untermenüpunkte - my $target = $menu->{$item}{target}; - my $uri = $menu->menuitem_js(\%myconfig, \%$form, $item, $level); - - 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); - $shlp = $sm; - $sm = 1; - my $breit = 15 + length($label) * 6; - 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, 20, 180, defOver, defBack, 'itemBorder', 'itemText');\n|; - - §ion_menu($menu, $item); - - #print qq|
    \n|; - } - } - } -} diff --git a/bin/mozilla/menunew.pl b/bin/mozilla/menunew.pl deleted file mode 100644 index a1f9a8f2d..000000000 --- a/bin/mozilla/menunew.pl +++ /dev/null @@ -1,160 +0,0 @@ -#===================================================================== -# LX-Office ERP -# Copyright (C) 2004 -# Based on SQL-Ledger Version 2.1.9 -# Web http://www.lx-office.org -# -###################################################################### -# 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. -####################################################################### -# -# thre frame layout with refractured menu -# -####################################################################### - -use English qw(-no_match_vars); -use List::Util qw(max); -use URI; - -use SL::Menu; - -use strict; - -1; - -# end of main - -sub display { - my $form = $main::form; - - $form->header(); - -# $form->{force_ul_width} = $ENV{HTTP_USER_AGENT} =~ m/MSIE\s+6\./; -# $form->{force_ul_width} = $ENV{HTTP_USER_AGENT} !~ m/Opera/; - $form->{force_ul_width} = 1; - $form->{date} = clock_line(); - $form->{menu_items} = acc_menu(); - my $callback = $form->unescape($form->{callback}); - $callback = URI->new($callback)->rel($callback) if $callback; - $callback = "login.pl?action=company_logo" if $callback =~ /^(\.\/)?$/; - $form->{callback} = $callback; - - print $form->parse_html_template("menu/menunew"); -} - -sub clock_line { - my $form = $main::form; - - my ($Sekunden, $Minuten, $Stunden, $Monatstag, $Monat, - $Jahr, $Wochentag, $Jahrestag, $Sommerzeit) - = localtime(time); - $Monat += 1; - $Jahrestag += 1; - $Monat = $Monat < 10 ? $Monat = "0" . $Monat : $Monat; - $Monatstag = $Monatstag < 10 ? $Monatstag = "0" . $Monatstag : $Monatstag; - $Jahr += 1900; - my @Wochentage = ("Sonntag", "Montag", "Dienstag", "Mittwoch", - "Donnerstag", "Freitag", "Samstag"); - my @Monatsnamen = ("", "Januar", "Februar", "März", - "April", "Mai", "Juni", "Juli", - "August", "September", "Oktober", "November", - "Dezember"); - return - $Wochentage[$Wochentag] . ", der " - . $Monatstag . "." - . $Monat . "." - . $Jahr . " - "; -} - -sub acc_menu { - my $form = $main::form; - my %myconfig = %main::myconfig; - - my $mainlevel = $form->{level}; - $mainlevel =~ s/\Q$mainlevel\E--//g; - my $menu = Menu->new('menu.ini'); - - $English::AUTOFLUSH = 1; - - my $all_items = []; - create_menu($menu, $all_items); - - my $item = { 'subitems' => $all_items }; - calculate_width($item); - - return $all_items; -} - -sub calculate_width { - my $item = shift; - - $item->{max_width} = max map { length $_->{title} } @{ $item->{subitems} }; - - foreach my $subitem (@{ $item->{subitems} }) { - calculate_width($subitem) if ($subitem->{subitems}); - } -} - -sub create_menu { - my ($menu, $all_items, $parent, $depth) = @_; - my $html; - - my $form = $main::form; - my %myconfig = %main::myconfig; - - die if ($depth * 1 > 5); - - my @menuorder = $menu->access_control(\%myconfig, $parent); - $parent .= "--" if ($parent); - - foreach my $name (@menuorder) { - substr($name, 0, length($parent), ""); - next if (($name eq "") || ($name =~ /--/)); - - my $menu_item = $menu->{"${parent}${name}"}; - my $item = { 'title' => $::locale->text($name) }; - push @{ $all_items }, $item; - - if ($menu_item->{submenu} || !defined($menu_item->{module}) || ($menu_item->{module} eq "menu.pl")) { - $item->{subitems} = []; - $item->{image} = _icon_path("$name.png"); - create_menu($menu, $item->{subitems}, "${parent}${name}", $depth * 1 + 1); - - } else { - $item->{image} = _icon_path("${parent}${name}.png"); - $menu->menuitem_new("${parent}${name}", $item); - } - } -} - -sub _icon_path { - my ($label, $size) = @_; - - $size ||= 16; - - my $img = "image/icons/${size}x${size}/$label"; - - return unless -f $img; - return $img; -} - diff --git a/bin/mozilla/menuv3.pl b/bin/mozilla/menuv3.pl deleted file mode 100644 index 121d76df0..000000000 --- a/bin/mozilla/menuv3.pl +++ /dev/null @@ -1,141 +0,0 @@ -#===================================================================== -# LX-Office ERP -# Copyright (C) 2004 -# Based on SQL-Ledger Version 2.1.9 -# Web http://www.lx-office.org -# -###################################################################### -# 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. -####################################################################### -# -# thre frame layout with refractured menu -# -####################################################################### - -use SL::Menu; -use URI; - -use strict; - -1; - -# end of main - -sub display { - my $form = $main::form; - - $form->header(extra_code => qq||); - - $form->{date} = clock_line(); - $form->{menu} = acc_menu(); - my $callback = $form->unescape($form->{callback}); - $callback = URI->new($callback)->rel($callback) if $callback; - $callback = "login.pl?action=company_logo" if $callback =~ /^(\.\/)?$/; - $form->{callback} = $callback; - - print $form->parse_html_template("menu/menuv3"); - -} - -sub clock_line { - my ($Sekunden, $Minuten, $Stunden, $Monatstag, $Monat, - $Jahr, $Wochentag, $Jahrestag, $Sommerzeit) - = localtime(time); - $Monat += 1; - $Jahrestag += 1; - $Monat = $Monat < 10 ? $Monat = "0" . $Monat : $Monat; - $Monatstag = $Monatstag < 10 ? $Monatstag = "0" . $Monatstag : $Monatstag; - $Jahr += 1900; - my @Wochentage = ("Sonntag", "Montag", "Dienstag", "Mittwoch", - "Donnerstag", "Freitag", "Samstag"); - my @Monatsnamen = ("", "Januar", "Februar", "März", - "April", "Mai", "Juni", "Juli", - "August", "September", "Oktober", "November", - "Dezember"); - return - $Wochentage[$Wochentag] . ", der " - . $Monatstag . "." - . $Monat . "." - . $Jahr . " - "; -} - -sub acc_menu { - my $form = $main::form; - my %myconfig = %main::myconfig; - - my $mainlevel = $form->{level}; - $mainlevel =~ s/\Q$mainlevel\E--//g; - my $menu = Menu->new("menu.ini"); - - $| = 1; - - return print_menu($menu); -} - -sub print_menu { - my ($menu, $parent, $depth) = @_; - - my $form = $main::form; - my %myconfig = %main::myconfig; - - my $html; - - die if ($depth * 1 > 5); - - my @menuorder; - - @menuorder = $menu->access_control(\%myconfig, $parent); - - $parent .= "--" if ($parent); - - foreach my $item (@menuorder) { - substr($item, 0, length($parent)) = ""; - next if (($item eq "") || ($item =~ /--/)); - - my $menu_item = $menu->{"${parent}${item}"}; - my $menu_title = $::locale->text($item); - my $menu_text = $menu_title; - - my $target = "main_window"; - $target = $menu_item->{"target"} if ($menu_item->{"target"}); - - if ($menu_item->{"submenu"} || !defined($menu_item->{"module"}) || - ($menu_item->{"module"} eq "menu.pl")) { - - my $h = print_menu($menu, "${parent}${item}", $depth * 1 + 1)."\n"; - if (!$parent) { - $html .= qq|
    • ${menu_text}

        ${h}
    \n|; - } else { - $html .= qq|
  • ${menu_text}
      ${h}
  • \n|; - } - } else { - $html .= qq|
  • |; - $html .= $menu->menuitem_v3(\%myconfig, $form, "${parent}$item", - { "title" => $menu_title, - "target" => $target }); - $html .= qq|${menu_text}
  • \n|; - } - } - - return $html; -} diff --git a/bin/mozilla/menuv4.pl b/bin/mozilla/menuv4.pl deleted file mode 100644 index 25d7d792c..000000000 --- a/bin/mozilla/menuv4.pl +++ /dev/null @@ -1,147 +0,0 @@ -#===================================================================== -# LX-Office ERP -# Copyright (C) 2004 -# Based on SQL-Ledger Version 2.1.9 -# Web http://www.lx-office.org -# -###################################################################### -# 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. -####################################################################### -# -# thre frame layout with refractured menu -# -####################################################################### - -use SL::Menu; -use URI; - -use strict; - -1; - -# end of main - -sub display { - my $form = $main::form; - - $form->header(extra_code => qq||); - - $form->{date} = clock_line(); - $form->{menu} = acc_menu(); - my $callback = $form->unescape($form->{callback}); - $callback = URI->new($callback)->rel($callback) if $callback; - $callback = "login.pl?action=company_logo" if $callback =~ /^(\.\/)?$/; - $form->{callback} = $callback; - - print $form->parse_html_template("menu/menuv4"); - -} - -sub clock_line { - my $form = $main::form; - - my ($Sekunden, $Minuten, $Stunden, $Monatstag, $Monat, - $Jahr, $Wochentag, $Jahrestag, $Sommerzeit) - = localtime(time); - $Monat += 1; - $Jahrestag += 1; - $Monat = $Monat < 10 ? $Monat = "0" . $Monat : $Monat; - $Monatstag = $Monatstag < 10 ? $Monatstag = "0" . $Monatstag : $Monatstag; - $Jahr += 1900; - my @Wochentage = ("Sonntag", "Montag", "Dienstag", "Mittwoch", - "Donnerstag", "Freitag", "Samstag"); - my @Monatsnamen = ("", "Januar", "Februar", "März", - "April", "Mai", "Juni", "Juli", - "August", "September", "Oktober", "November", - "Dezember"); - return - $Wochentage[$Wochentag] . ", der " - . $Monatstag . "." - . $Monat . "." - . $Jahr . " - "; -} - -sub acc_menu { - my $form = $main::form; - my %myconfig = %main::myconfig; - - my $mainlevel = $form->{level}; - $mainlevel =~ s/\Q$mainlevel\E--//g; - my $menu = Menu->new("menu.ini"); - - $| = 1; - - return print_menu($menu); -} - -sub print_menu { - my ($menu, $parent, $depth) = @_; - - my $form = $main::form; - my %myconfig = %main::myconfig; - - my $html; - - die if ($depth * 1 > 5); - - my @menuorder; - - @menuorder = $menu->access_control(\%myconfig, $parent); - - $parent .= "--" if ($parent); - - foreach my $item (@menuorder) { - substr($item, 0, length($parent)) = ""; - next if (($item eq "") || ($item =~ /--/)); - - my $menu_item = $menu->{"${parent}${item}"}; - my $menu_title = $::locale->text($item); - my $menu_text = $menu_title; - - my $target = "main_window"; - $target = $menu_item->{"target"} if ($menu_item->{"target"}); - - if ($menu_item->{"submenu"} || !defined($menu_item->{"module"}) || - ($menu_item->{"module"} eq "menu.pl")) { - - my $h = print_menu($menu, "${parent}${item}", $depth * 1 + 1)."\n"; - if (!$parent) { - $html .= qq|
    • ${menu_text}

        ${h}
    \n|; - } else { - $html .= qq|
  • ${menu_text}
      ${h}
  • \n|; - } - } else { - if ($depth>1) { - $html .= qq|
  • |; - } else { - $html .= qq|
  • |; - } - $html .= $menu->menuitem_v3(\%myconfig, $form, "${parent}$item", - { "title" => $menu_title, - "target" => $target }); - $html .= qq|${menu_text}
  • \n|; - } - } - - return $html; -} diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 9508f736f..0bcb897bf 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -402,19 +402,19 @@ sub form_header { } } - my $onload = ""; + my $dispatch_to_popup = ''; if ($form->{resubmit} && ($form->{format} eq "html")) { - $onload = "window.open('about:blank','Beleg'); document.oe.target = 'Beleg';"; - $onload .= "document.do.submit();"; + $dispatch_to_popup = "window.open('about:blank','Beleg'); document.oe.target = 'Beleg';"; + $dispatch_to_popup .= "document.do.submit();"; } elsif ($form->{resubmit}) { # emulate click for resubmitting actions - $onload = "document.oe.${_}.click(); " for grep { /^action_/ } keys %$form; - $onload .= "document.oe.submit();"; + $dispatch_to_popup = "document.oe.${_}.click(); " for grep { /^action_/ } keys %$form; + $dispatch_to_popup .= "document.oe.submit();"; } elsif ($creditwarning) { - $onload = "alert('$credittext')"; + $::request->{layout}->add_javascripts_inline("alert('$credittext')"); } - $TMPL_VAR{onload} = $onload; + $::request->{layout}->add_javascripts_inline("\$(function(){$dispatch_to_popup})"); $TMPL_VAR{dateformat} = $myconfig{dateformat}; $TMPL_VAR{numberformat} = $myconfig{numberformat}; @@ -1225,7 +1225,7 @@ sub save { $form->{simple_save} = 1; if(!$form->{print_and_save}) { - delete @{$form}{ary_diff([keys %{ $form }], [qw(login stylesheet id script type cursor_fokus)])}; + delete @{$form}{ary_diff([keys %{ $form }], [qw(login id script type cursor_fokus)])}; edit(); ::end_of_request(); } @@ -1459,8 +1459,6 @@ sub backorder_exchangerate { $form->header; print qq| - - {script}> |; @@ -1512,9 +1510,6 @@ sub backorder_exchangerate { . $locale->text('Continue') . qq|"> - - - |; $main::lxdebug->leave_sub(); @@ -2004,7 +1999,7 @@ sub edit_periodic_invoices_config { $::form->{AR} = [ grep { $_->{link} =~ m/(?:^|:)AR(?::|$)/ } @{ $::form->{ALL_CHARTS} } ]; $::form->{title} = $::locale->text('Edit the configuration for periodic invoices'); - $::form->header(); + $::form->header(no_layout => 1); print $::form->parse_html_template('oe/edit_periodic_invoices_config', $config); $::lxdebug->leave_sub(); diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl index a339cd41a..1068da749 100644 --- a/bin/mozilla/rp.pl +++ b/bin/mozilla/rp.pl @@ -151,8 +151,6 @@ sub report { $::form->get_lists("projects" => { "key" => "ALL_PROJECTS", "all" => 1 }); - my $onload = qq|focus()|; - my $is_projects = $::form->{report} eq "projects"; my $is_income_statement = $::form->{report} eq "income_statement"; my $is_bwa = $::form->{report} eq "bwa"; @@ -198,7 +196,6 @@ sub report { vc => $vc, label => $label, year => DateTime->today->year, - onload => $onload, nextsub => $nextsub, accrual => $::instance_conf->get_accounting_method ne 'cash', cash => $::instance_conf->get_accounting_method eq 'cash', diff --git a/bin/mozilla/ustva.pl b/bin/mozilla/ustva.pl index e81ecb26a..d5c42a039 100644 --- a/bin/mozilla/ustva.pl +++ b/bin/mozilla/ustva.pl @@ -1177,10 +1177,6 @@ sub config_step2 { $form->header(); -# print qq| -# -# |; - my $elsterland = ''; my $elster_amt = ''; my $elsterFFFF = ''; diff --git a/bin/mozilla/wh.pl b/bin/mozilla/wh.pl index c77d74dde..fee9ff9d1 100644 --- a/bin/mozilla/wh.pl +++ b/bin/mozilla/wh.pl @@ -795,7 +795,6 @@ sub report { $form->{jsscript} = 1; # $form->{fokus} = "partnumber"; -# $form->{onload} .= "focus();"; $form->{title} = $locale->text("Report about warehouse contents"); $form->header(); diff --git a/css/icons16.css b/css/icons16.css new file mode 100644 index 000000000..f8477119e --- /dev/null +++ b/css/icons16.css @@ -0,0 +1,96 @@ +.icon16 { background: url(../image/maps/icons16.png) 16px 0px no-repeat; padding: 0; width: 16px; height: 16px; } +.icon16.AP--Add-Purchase-Order { background-position: -0px 0px; } +.icon16.AP--Add-RFQ { background-position: -16px 0px; } +.icon16.AP { background-position: -32px 0px; } +.icon16.AP--Reports { background-position: -48px 0px; } +.icon16.AP--Reports--Purchase-Orders { background-position: -64px 0px; } +.icon16.AP--Reports--RFQs { background-position: -80px 0px; } +.icon16.AR--Add-Credit-Note { background-position: -96px 0px; } +.icon16.AR--Add-Delivery-Order { background-position: -112px 0px; } +.icon16.AR--Add-Dunning { background-position: -128px 0px; } +.icon16.AR--Add-Quotation { background-position: -144px 0px; } +.icon16.AR--Add-Sales-Invoice { background-position: -160px 0px; } +.icon16.AR--Add-Sales-Order { background-position: -176px 0px; } +.icon16.AR { background-position: -192px 0px; } +.icon16.AR--Reports--Delivery-Orders { background-position: -208px 0px; } +.icon16.AR--Reports--Dunnings { background-position: -224px 0px; } +.icon16.AR--Reports--Invoices { background-position: -240px 0px; } +.icon16.AR--Reports { background-position: -256px 0px; } +.icon16.AR--Reports--Quotations { background-position: -272px 0px; } +.icon16.AR--Reports--Sales-Orders { background-position: -288px 0px; } +.icon16.Batch-Printing--Packing-Lists { background-position: -304px 0px; } +.icon16.Batch-Printing { background-position: -320px 0px; } +.icon16.Batch-Printing--Purchase-Orders { background-position: -336px 0px; } +.icon16.Batch-Printing--Quotations { background-position: -352px 0px; } +.icon16.Batch-Printing--Receipts { background-position: -368px 0px; } +.icon16.Batch-Printing--RFQs { background-position: -384px 0px; } +.icon16.Batch-Printing--Sales-Invoices { background-position: -400px 0px; } +.icon16.Batch-Printing--Sales-Orders { background-position: -416px 0px; } +.icon16.Cash--Payment { background-position: -432px 0px; } +.icon16.Cash { background-position: -448px 0px; } +.icon16.Cash--Receipt { background-position: -464px 0px; } +.icon16.Cash--Reconciliation { background-position: -480px 0px; } +.icon16.Cash--Reports--Payments { background-position: -496px 0px; } +.icon16.Cash--Reports { background-position: -512px 0px; } +.icon16.Cash--Reports--Receipts { background-position: -528px 0px; } +.icon16.CRM--Admin--Benutzer { background-position: -544px 0px; } +.icon16.CRM--Admin--Dokumentvorlage { background-position: -560px 0px; } +.icon16.CRM--Admin--Etiketten { background-position: -576px 0px; } +.icon16.CRM--Admin--Gruppen { background-position: -592px 0px; } +.icon16.CRM--Admin--Mitteilungen { background-position: -608px 0px; } +.icon16.CRM--Admin { background-position: -624px 0px; } +.icon16.CRM--Admin--Status { background-position: -640px 0px; } +.icon16.CRM--Auftragschance { background-position: -656px 0px; } +.icon16.CRM--eMail { background-position: -672px 0px; } +.icon16.CRM--Hilfe { background-position: -688px 0px; } +.icon16.CRM--Kunden { background-position: -704px 0px; } +.icon16.CRM--Lieferant { background-position: -720px 0px; } +.icon16.CRM--Notizen { background-position: -736px 0px; } +.icon16.CRM--Personen { background-position: -752px 0px; } +.icon16.CRM { background-position: -768px 0px; } +.icon16.CRM--Schnellsuche { background-position: -784px 0px; } +.icon16.CRM--Service { background-position: -800px 0px; } +.icon16.CRM--Termine { background-position: -816px 0px; } +.icon16.CRM--Wiedervorlage { background-position: -832px 0px; } +.icon16.CRM--Wissens-DB { background-position: -848px 0px; } +.icon16.General-Ledger--Add-AP-Transaction { background-position: -864px 0px; } +.icon16.General-Ledger--Add-AR-Transaction { background-position: -880px 0px; } +.icon16.General-Ledger--Add-Transaction { background-position: -896px 0px; } +.icon16.General-Ledger--DATEV---Export-Assistent { background-position: -912px 0px; } +.icon16.General-Ledger { background-position: -928px 0px; } +.icon16.General-Ledger--Reports--AP-Aging { background-position: -944px 0px; } +.icon16.General-Ledger--Reports--AR-Aging { background-position: -960px 0px; } +.icon16.General-Ledger--Reports--Journal { background-position: -976px 0px; } +.icon16.General-Ledger--Reports { background-position: -992px 0px; } +.icon16.Master-Data--Add-Assembly { background-position: -1008px 0px; } +.icon16.Master-Data--Add-Customer { background-position: -1024px 0px; } +.icon16.Master-Data--Add-License { background-position: -1040px 0px; } +.icon16.Master-Data--Add-Part { background-position: -1056px 0px; } +.icon16.Master-Data--Add-Project { background-position: -1072px 0px; } +.icon16.Master-Data--Add-Service { background-position: -1088px 0px; } +.icon16.Master-Data--Add-Vendor { background-position: -1104px 0px; } +.icon16.Master-Data { background-position: -1120px 0px; } +.icon16.Master-Data--Reports--Assemblies { background-position: -1136px 0px; } +.icon16.Master-Data--Reports--Customers { background-position: -1152px 0px; } +.icon16.Master-Data--Reports--Licenses { background-position: -1168px 0px; } +.icon16.Master-Data--Reports--Parts { background-position: -1184px 0px; } +.icon16.Master-Data--Reports { background-position: -1200px 0px; } +.icon16.Master-Data--Reports--Projects { background-position: -1216px 0px; } +.icon16.Master-Data--Reports--Projecttransactions { background-position: -1232px 0px; } +.icon16.Master-Data--Reports--Services { background-position: -1248px 0px; } +.icon16.Master-Data--Reports--Vendors { background-position: -1264px 0px; } +.icon16.Master-Data--Update-Prices { background-position: -1280px 0px; } +.icon16.MDI-Text-Editor-16x16 { background-position: -1296px 0px; } +.icon16.Neues-Fenster { background-position: -1312px 0px; } +.icon16.Program--Logout { background-position: -1328px 0px; } +.icon16.Program { background-position: -1344px 0px; } +.icon16.Program--Preferences { background-position: -1360px 0px; } +.icon16.Program--Version { background-position: -1376px 0px; } +.icon16.Reports--Balance-Sheet { background-position: -1392px 0px; } +.icon16.Reports--Chart-of-Accounts { background-position: -1408px 0px; } +.icon16.Reports--Income-Statement { background-position: -1424px 0px; } +.icon16.Reports { background-position: -1440px 0px; } +.icon16.Reports--UStVa { background-position: -1456px 0px; } +.icon16.System { background-position: -1472px 0px; } +.icon16.Warehouse { background-position: -1488px 0px; } +.icon16.Warehouse--Produce-Assembly { background-position: -1504px 0px; } diff --git a/css/icons24.css b/css/icons24.css new file mode 100644 index 000000000..fe6ba0a08 --- /dev/null +++ b/css/icons24.css @@ -0,0 +1,93 @@ +.icon24 { background: url(../image/maps/icons24.png) 24px 0px no-repeat; padding: 0; width: 24px; height: 24px; } +.icon24.AP--Add-Purchase-Order { background-position: -0px 0px; } +.icon24.AP--Add-RFQ { background-position: -24px 0px; } +.icon24.AP { background-position: -48px 0px; } +.icon24.AP--Reports { background-position: -72px 0px; } +.icon24.AP--Reports--Purchase-Orders { background-position: -96px 0px; } +.icon24.AP--Reports--RFQs { background-position: -120px 0px; } +.icon24.AR--Add-Dunning { background-position: -144px 0px; } +.icon24.AR--Add-Quotation { background-position: -168px 0px; } +.icon24.AR--Add-Sales-Invoice { background-position: -192px 0px; } +.icon24.AR--Add-Sales-Order { background-position: -216px 0px; } +.icon24.AR { background-position: -240px 0px; } +.icon24.AR--Reports--Dunnings { background-position: -264px 0px; } +.icon24.AR--Reports--Invoices { background-position: -288px 0px; } +.icon24.AR--Reports { background-position: -312px 0px; } +.icon24.AR--Reports--Quotations { background-position: -336px 0px; } +.icon24.AR--Reports--Sales-Orders { background-position: -360px 0px; } +.icon24.Batch-Printing--Packing-Lists { background-position: -384px 0px; } +.icon24.Batch-Printing { background-position: -408px 0px; } +.icon24.Batch-Printing--Purchase-Orders { background-position: -432px 0px; } +.icon24.Batch-Printing--Quotations { background-position: -456px 0px; } +.icon24.Batch-Printing--Receipts { background-position: -480px 0px; } +.icon24.Batch-Printing--RFQs { background-position: -504px 0px; } +.icon24.Batch-Printing--Sales-Invoices { background-position: -528px 0px; } +.icon24.Batch-Printing--Sales-Orders { background-position: -552px 0px; } +.icon24.Cash--Payment { background-position: -576px 0px; } +.icon24.Cash { background-position: -600px 0px; } +.icon24.Cash--Receipt { background-position: -624px 0px; } +.icon24.Cash--Reconciliation { background-position: -648px 0px; } +.icon24.Cash--Reports--Payments { background-position: -672px 0px; } +.icon24.Cash--Reports { background-position: -696px 0px; } +.icon24.Cash--Reports--Receipts { background-position: -720px 0px; } +.icon24.CRM--Admin--Benutzer { background-position: -744px 0px; } +.icon24.CRM--Admin--Dokumentvorlage { background-position: -768px 0px; } +.icon24.CRM--Admin--Etiketten { background-position: -792px 0px; } +.icon24.CRM--Admin--Gruppen { background-position: -816px 0px; } +.icon24.CRM--Admin--Mitteilungen { background-position: -840px 0px; } +.icon24.CRM--Admin { background-position: -864px 0px; } +.icon24.CRM--Admin--Status { background-position: -888px 0px; } +.icon24.CRM--Auftragschance { background-position: -912px 0px; } +.icon24.CRM--eMail { background-position: -936px 0px; } +.icon24.CRM--Hilfe { background-position: -960px 0px; } +.icon24.CRM--Kunden { background-position: -984px 0px; } +.icon24.CRM--Lieferant { background-position: -1008px 0px; } +.icon24.CRM--Notizen { background-position: -1032px 0px; } +.icon24.CRM--Personen { background-position: -1056px 0px; } +.icon24.CRM { background-position: -1080px 0px; } +.icon24.CRM--Schnellsuche { background-position: -1104px 0px; } +.icon24.CRM--Service { background-position: -1128px 0px; } +.icon24.CRM--Termine { background-position: -1152px 0px; } +.icon24.CRM--Wiedervorlage { background-position: -1176px 0px; } +.icon24.CRM--Wissens-DB { background-position: -1200px 0px; } +.icon24.General-Ledger--Add-AP-Transaction { background-position: -1224px 0px; } +.icon24.General-Ledger--Add-AR-Transaction { background-position: -1248px 0px; } +.icon24.General-Ledger--Add-Transaction { background-position: -1272px 0px; } +.icon24.General-Ledger--DATEV---Export-Assistent { background-position: -1296px 0px; } +.icon24.General-Ledger { background-position: -1320px 0px; } +.icon24.General-Ledger--Reports--AP-Aging { background-position: -1344px 0px; } +.icon24.General-Ledger--Reports--AR-Aging { background-position: -1368px 0px; } +.icon24.General-Ledger--Reports--Journal { background-position: -1392px 0px; } +.icon24.General-Ledger--Reports { background-position: -1416px 0px; } +.icon24.leftarrow_24 { background-position: -1440px 0px; } +.icon24.Master-Data--Add-Assembly { background-position: -1464px 0px; } +.icon24.Master-Data--Add-Customer { background-position: -1488px 0px; } +.icon24.Master-Data--Add-License { background-position: -1512px 0px; } +.icon24.Master-Data--Add-Part { background-position: -1536px 0px; } +.icon24.Master-Data--Add-Project { background-position: -1560px 0px; } +.icon24.Master-Data--Add-Service { background-position: -1584px 0px; } +.icon24.Master-Data--Add-Vendor { background-position: -1608px 0px; } +.icon24.Master-Data { background-position: -1632px 0px; } +.icon24.Master-Data--Reports--Assemblies { background-position: -1656px 0px; } +.icon24.Master-Data--Reports--Customers { background-position: -1680px 0px; } +.icon24.Master-Data--Reports--Licenses { background-position: -1704px 0px; } +.icon24.Master-Data--Reports--Parts { background-position: -1728px 0px; } +.icon24.Master-Data--Reports { background-position: -1752px 0px; } +.icon24.Master-Data--Reports--Projects { background-position: -1776px 0px; } +.icon24.Master-Data--Reports--Projecttransactions { background-position: -1800px 0px; } +.icon24.Master-Data--Reports--Services { background-position: -1824px 0px; } +.icon24.Master-Data--Reports--Vendors { background-position: -1848px 0px; } +.icon24.Neues-Fenster { background-position: -1872px 0px; } +.icon24.Productivity { background-position: -1896px 0px; } +.icon24.Program--Logout { background-position: -1920px 0px; } +.icon24.Program { background-position: -1944px 0px; } +.icon24.Program--Preferences { background-position: -1968px 0px; } +.icon24.Program--Version { background-position: -1992px 0px; } +.icon24.Reports--Balance-Sheet { background-position: -2016px 0px; } +.icon24.Reports--Chart-of-Accounts { background-position: -2040px 0px; } +.icon24.Reports--Income-Statement { background-position: -2064px 0px; } +.icon24.Reports { background-position: -2088px 0px; } +.icon24.Reports--UStVa { background-position: -2112px 0px; } +.icon24.rightarrow_24 { background-position: -2136px 0px; } +.icon24.System { background-position: -2160px 0px; } +.icon24.Warehouse { background-position: -2184px 0px; } diff --git a/css/icons32.css b/css/icons32.css new file mode 100644 index 000000000..a8d9d0d1c --- /dev/null +++ b/css/icons32.css @@ -0,0 +1,90 @@ +.icon32 { background: url(../image/maps/icons32.png) 32px 0px no-repeat; padding: 0; width: 32px; height: 32px; } +.icon32.AP--Add-Purchase-Order { background-position: -0px 0px; } +.icon32.AP--Add-RFQ { background-position: -32px 0px; } +.icon32.AP { background-position: -64px 0px; } +.icon32.AP--Reports { background-position: -96px 0px; } +.icon32.AP--Reports--Purchase-Orders { background-position: -128px 0px; } +.icon32.AP--Reports--RFQs { background-position: -160px 0px; } +.icon32.AR--Add-Dunning { background-position: -192px 0px; } +.icon32.AR--Add-Quotation { background-position: -224px 0px; } +.icon32.AR--Add-Sales-Invoice { background-position: -256px 0px; } +.icon32.AR--Add-Sales-Order { background-position: -288px 0px; } +.icon32.AR { background-position: -320px 0px; } +.icon32.AR--Reports--Dunnings { background-position: -352px 0px; } +.icon32.AR--Reports--Invoices { background-position: -384px 0px; } +.icon32.AR--Reports { background-position: -416px 0px; } +.icon32.AR--Reports--Quotations { background-position: -448px 0px; } +.icon32.AR--Reports--Sales-Orders { background-position: -480px 0px; } +.icon32.Batch-Printing--Packing-Lists { background-position: -512px 0px; } +.icon32.Batch-Printing { background-position: -544px 0px; } +.icon32.Batch-Printing--Purchase-Orders { background-position: -576px 0px; } +.icon32.Batch-Printing--Quotations { background-position: -608px 0px; } +.icon32.Batch-Printing--Receipts { background-position: -640px 0px; } +.icon32.Batch-Printing--RFQs { background-position: -672px 0px; } +.icon32.Batch-Printing--Sales-Invoices { background-position: -704px 0px; } +.icon32.Batch-Printing--Sales-Orders { background-position: -736px 0px; } +.icon32.Cash--Payment { background-position: -768px 0px; } +.icon32.Cash { background-position: -800px 0px; } +.icon32.Cash--Receipt { background-position: -832px 0px; } +.icon32.Cash--Reconciliation { background-position: -864px 0px; } +.icon32.Cash--Reports--Payments { background-position: -896px 0px; } +.icon32.Cash--Reports { background-position: -928px 0px; } +.icon32.Cash--Reports--Receipts { background-position: -960px 0px; } +.icon32.CRM--Admin--Benutzer { background-position: -992px 0px; } +.icon32.CRM--Admin--Dokumentvorlage { background-position: -1024px 0px; } +.icon32.CRM--Admin--Etiketten { background-position: -1056px 0px; } +.icon32.CRM--Admin--Gruppen { background-position: -1088px 0px; } +.icon32.CRM--Admin--Mitteilungen { background-position: -1120px 0px; } +.icon32.CRM--Admin { background-position: -1152px 0px; } +.icon32.CRM--Admin--Status { background-position: -1184px 0px; } +.icon32.CRM--Auftragschance { background-position: -1216px 0px; } +.icon32.CRM--eMail { background-position: -1248px 0px; } +.icon32.CRM--Hilfe { background-position: -1280px 0px; } +.icon32.CRM--Kunden { background-position: -1312px 0px; } +.icon32.CRM--Lieferant { background-position: -1344px 0px; } +.icon32.CRM--Notizen { background-position: -1376px 0px; } +.icon32.CRM--Personen { background-position: -1408px 0px; } +.icon32.CRM { background-position: -1440px 0px; } +.icon32.CRM--Schnellsuche { background-position: -1472px 0px; } +.icon32.CRM--Service { background-position: -1504px 0px; } +.icon32.CRM--Termine { background-position: -1536px 0px; } +.icon32.CRM--Wiedervorlage { background-position: -1568px 0px; } +.icon32.CRM--Wissens-DB { background-position: -1600px 0px; } +.icon32.General-Ledger--Add-AP-Transaction { background-position: -1632px 0px; } +.icon32.General-Ledger--Add-AR-Transaction { background-position: -1664px 0px; } +.icon32.General-Ledger--Add-Transaction { background-position: -1696px 0px; } +.icon32.General-Ledger--DATEV---Export-Assistent { background-position: -1728px 0px; } +.icon32.General-Ledger { background-position: -1760px 0px; } +.icon32.General-Ledger--Reports--AP-Aging { background-position: -1792px 0px; } +.icon32.General-Ledger--Reports--AR-Aging { background-position: -1824px 0px; } +.icon32.General-Ledger--Reports--Journal { background-position: -1856px 0px; } +.icon32.General-Ledger--Reports { background-position: -1888px 0px; } +.icon32.Master-Data--Add-Assembly { background-position: -1920px 0px; } +.icon32.Master-Data--Add-Customer { background-position: -1952px 0px; } +.icon32.Master-Data--Add-License { background-position: -1984px 0px; } +.icon32.Master-Data--Add-Part { background-position: -2016px 0px; } +.icon32.Master-Data--Add-Project { background-position: -2048px 0px; } +.icon32.Master-Data--Add-Service { background-position: -2080px 0px; } +.icon32.Master-Data--Add-Vendor { background-position: -2112px 0px; } +.icon32.Master-Data { background-position: -2144px 0px; } +.icon32.Master-Data--Reports--Assemblies { background-position: -2176px 0px; } +.icon32.Master-Data--Reports--Customers { background-position: -2208px 0px; } +.icon32.Master-Data--Reports--Licenses { background-position: -2240px 0px; } +.icon32.Master-Data--Reports--Parts { background-position: -2272px 0px; } +.icon32.Master-Data--Reports { background-position: -2304px 0px; } +.icon32.Master-Data--Reports--Projects { background-position: -2336px 0px; } +.icon32.Master-Data--Reports--Projecttransactions { background-position: -2368px 0px; } +.icon32.Master-Data--Reports--Services { background-position: -2400px 0px; } +.icon32.Master-Data--Reports--Vendors { background-position: -2432px 0px; } +.icon32.Neues-Fenster { background-position: -2464px 0px; } +.icon32.Program--Logout { background-position: -2496px 0px; } +.icon32.Program { background-position: -2528px 0px; } +.icon32.Program--Preferences { background-position: -2560px 0px; } +.icon32.Program--Version { background-position: -2592px 0px; } +.icon32.Reports--Balance-Sheet { background-position: -2624px 0px; } +.icon32.Reports--Chart-of-Accounts { background-position: -2656px 0px; } +.icon32.Reports--Income-Statement { background-position: -2688px 0px; } +.icon32.Reports { background-position: -2720px 0px; } +.icon32.Reports--UStVa { background-position: -2752px 0px; } +.icon32.System { background-position: -2784px 0px; } +.icon32.Warehouse--Produce-Assembly { background-position: -2816px 0px; } diff --git a/css/kivitendo/main.css b/css/kivitendo/main.css index 9714d4ac3..77fe0978d 100644 --- a/css/kivitendo/main.css +++ b/css/kivitendo/main.css @@ -115,8 +115,9 @@ td.login { th.login { text-align: right; } -body.admin { +div.admin { background-color: #FFFFE0; + padding: 8px; color: #000000; } body.menu { diff --git a/css/kivitendo/menu.css b/css/kivitendo/menu.css index 38b2669a6..2abe56f4d 100644 --- a/css/kivitendo/menu.css +++ b/css/kivitendo/menu.css @@ -283,3 +283,39 @@ div#menuv3 li:hover ul, div#menuv3 li li:hover ul, div#menuv3 li li li:hover ul, position: relativ: left: 10px; } /* End of non-anchor hover selectors */ + +/* html menu */ +/* types of lines: m sm i (menu submenu item) + each line is a mi (menuitem) and has one mii (menu-item-icon) whcih is ms (menu-spacer) + and one mic (menu-item-chunk) + indenting is done with the levels s0, s1, s2 */ +#content.html-menu, #html-menu { + transition: margin-left 0.2s, width 0.2s; + -moz-transition: margin-left 0.2s, width 0.2s; + -webkit-transition: margin-left 0.2s, width 0.2s; + -o-transition: margin-left 0.2s, width 0.2s; +} +#content.html-menu { margin-left: 190px; } +#content.html-menu.folded { margin-left: 40px } +#html-menu.folded:hover + #content.html-menu.folded { margin-left: 190px } +#html-menu { float:left; width: 183px; font-size: 8pt; margin-top: 10px; overflow:hidden; } +#html-menu.folded { width: 32px; } +#html-menu.folded:hover { width: 183px; } +#html-menu div.mi { margin-top: 4px; margin-bottom: 3px; white-space: nowrap; clear:both; position:relative; } +#html-menu div.sm { font-weight: bold } +#html-menu img { vertical-align: top; border: 0; } +#html-menu a { vertical-align: top } +#html-menu .i span.ms { float: left; width: 24px; margin-bottom: 4px; } +#html-menu .m span.ms { float: left; width: 32px } +#html-menu .sm span.ms { float: left; width: 24px; background: url(../../image/unterpunkt.png); } +#html-menu div.m { height: 24px } +#html-menu div.m span.mic { color:black; position: relative; top: 4px } +#html-menu div.m:hover, +#html-menu div.i:hover { color:blue; background-color: #d1d1d1; cursor: pointer; } +#html-menu span.mic { white-space: normal; display: inline-block; vertical-align: top; line-height: 1.2; } +#html-menu a.ml span.mic { width: 145px } /* fix deep indents */ +#html-menu div.s0 { padding-left: 2px } +#html-menu div.s1 { padding-left: 8px } +#html-menu div.s2 { padding-left: 16px } + +body { margin: 0 } diff --git a/css/lx-office-erp/frame_header/header.css b/css/lx-office-erp/frame_header/header.css index 2713bb413..852a76c98 100644 --- a/css/lx-office-erp/frame_header/header.css +++ b/css/lx-office-erp/frame_header/header.css @@ -1,22 +1,15 @@ -.frame-header-element a:link, -.frame-header-element a:visited, -.frame-header-element a:hover, -.frame-header-element a:active { +#frame-header .frame-header-element a:link, +#frame-header .frame-header-element a:visited, +#frame-header .frame-header-element a:hover, +#frame-header .frame-header-element a:active { color: white; background: none; text-decoration: underline; } -body.frame-header { - background: url('../../../image/fade.png') repeat-x; -} - -div.frame-header { +#frame-header { background: url('../../../image/bg_titel.gif') repeat-x; text-align: center; -} - -.frame-header { margin: 0; padding: 0; color: white; @@ -24,18 +17,19 @@ div.frame-header { overflow: hidden; width: 100%; border-spacing: 0; + font-size: 12px; } -.frame-header-left { +#frame-header .frame-header-left { float: left; } -.frame-header-right { +#frame-header .frame-header-right { float: right; } -.frame-header-left, -.frame-header-center, -.frame-header-right { +#frame-header .frame-header-left, +#frame-header .frame-header-center, +#frame-header .frame-header-right { border-spacing: 0; color: white; padding: 0; diff --git a/css/lx-office-erp/main.css b/css/lx-office-erp/main.css index 87f17b840..c190cb7e5 100644 --- a/css/lx-office-erp/main.css +++ b/css/lx-office-erp/main.css @@ -9,9 +9,65 @@ A:hover { color: black; background-color: lemonchiffon; text-decoration: none; } +a, div { + transition: background-color 0.2s; + -moz-transition: background-color 0.2s; + -webkit-transition: background-color 0.2s; +} + +input, textarea, select { + border: 1px; + border-color: darkgray lightgray lightgray; + border-style: solid; + padding: 1px; + background-color: white; +} + +select { + padding: 0px; +} input:focus, textarea:focus, select:focus { - background-color: yellow; + background-color: whitesmoke; + border: 1px; + border-color: gray lightgray lightgray; + border-style: solid; +} + +input:hover, textarea:hover, select:hover { + border-color: dimgray darkgray darkgray; +} + +input[type="button"], +input[type="submit"], +button, +input[type="button"]:focus, +input[type="submit"]:focus, +button:focus { + border: 1px; + border-color: darkgray; + border-style: solid; + padding: 0px 4px; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; + background-color: whitesmoke; +} + +button:hover, +input[type="button"]:hover, +input[type="submit"]:hover { + border: 1px; + background-color: lightgray; + border-color: gray; + border-style: solid; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; +} + +html { + height: 100%; } body { @@ -20,6 +76,7 @@ body { background-color: white; background-image: url("../../image/fade.png"); background-repeat:repeat-x; color: black; + height: 100%; } td { @@ -51,7 +108,10 @@ th { .login { font-family: Verdana, Arial, Helvetica, sans-serif; } -body.login { +div.login { + min-height: 100%; + height: auto !important; + height: 100%; background: #b8d1f3; color: #A0A0A0; } @@ -69,9 +129,9 @@ th.login { text-align: right; } -body.admin { - background-color:#ffffff; +div.admin { color: black; + margin: 8px; } .message_error_login { @@ -383,3 +443,5 @@ label { border-style:none; border-width:thin; } + + diff --git a/css/lx-office-erp/menu.css b/css/lx-office-erp/menu.css index be9424392..19f98b20c 100644 --- a/css/lx-office-erp/menu.css +++ b/css/lx-office-erp/menu.css @@ -290,4 +290,38 @@ div#menuv4 li li li li:hover ul /* End of non-anchor hover selectors */ - +/* html menu */ +/* types of lines: m sm i (menu submenu item) + each line is a mi (menuitem) and has one mii (menu-item-icon) whcih is ms (menu-spacer) + and one mic (menu-item-chunk) + indenting is done with the levels s0, s1, s2 */ +#content.html-menu, #html-menu { + transition: margin-left 0.2s, width 0.2s; + -moz-transition: margin-left 0.2s, width 0.2s; + -webkit-transition: margin-left 0.2s, width 0.2s; + -o-transition: margin-left 0.2s, width 0.2s; +} +#content.html-menu { margin-left: 190px; } +#content.html-menu.folded { margin-left: 40px } +#html-menu.folded:hover + #content.html-menu.folded { margin-left: 190px } +#html-menu { float:left; width: 183px; font-size: 8pt; margin-top: 10px; overflow:hidden; } +#html-menu.folded { width: 32px; } +#html-menu.folded:hover { width: 183px; } +#html-menu div.mi { margin-top: 4px; margin-bottom: 3px; white-space: nowrap; clear:both; position:relative; } +#html-menu div.sm { font-weight: bold } +#html-menu img { vertical-align: top; border: 0; } +#html-menu a { vertical-align: top } +#html-menu .i span.ms { float: left; width: 24px; margin-bottom: 4px; } +#html-menu .m span.ms { float: left; width: 32px } +#html-menu .sm span.ms { float: left; width: 24px; background: url(../../image/unterpunkt.png); } +#html-menu div.m { height: 24px } +#html-menu div.m span.mic { color:blue; position: relative; top: 4px } +#html-menu div.m:hover, +#html-menu div.i:hover { color:blue; background-color: lemonchiffon; cursor: pointer; } +#html-menu span.mic { white-space: normal; display: inline-block; vertical-align: top; line-height: 1.2; } +#html-menu a.ml span.mic { width: 145px } /* fix deep indents */ +#html-menu div.s0 { padding-left: 2px } +#html-menu div.s1 { padding-left: 8px } +#html-menu div.s2 { padding-left: 16px } + +body { margin: 0 } diff --git a/image/maps/icons16.png b/image/maps/icons16.png new file mode 100644 index 000000000..ebd9b18f7 Binary files /dev/null and b/image/maps/icons16.png differ diff --git a/image/maps/icons24.png b/image/maps/icons24.png new file mode 100644 index 000000000..ec72b7802 Binary files /dev/null and b/image/maps/icons24.png differ diff --git a/image/maps/icons32.png b/image/maps/icons32.png new file mode 100644 index 000000000..94b95d1a3 Binary files /dev/null and b/image/maps/icons32.png differ diff --git a/index.html b/index.html index d785dd2b2..5170e1d4a 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,7 @@ + + diff --git a/js/ajax_layout.js b/js/ajax_layout.js new file mode 100644 index 000000000..694e1c5fe --- /dev/null +++ b/js/ajax_layout.js @@ -0,0 +1,44 @@ +function load_layout(baseURL){ + $.ajax({ + url: baseURL + 'controller.pl?action=Layout/empty&format=json', + method: 'GET', + dataType: 'json', + success: function (data) { + if (data["stylesheets"]) { + $.each(data["stylesheets"], function(i, e){ + $('head').append(''); + }); + } + if (data["stylesheets_inline"] && data["stylesheets_inline"].size) { + var style = "'; + $('head').append(style); + } + if (data["start_content"]) { + $('body').wrapInner(data["start_content"]); + } + if (data["pre_content"]) { + $('body').prepend(data["pre_content"]); + } + if (data["post_content"]) { + $('body').append(data["post_content"]); + } + if (data["javascripts"]) { + $.each(data["javascripts"], function(i, e){ + $('head').append(''; + $('head').append(script); + } + } + }); +} diff --git a/js/dhtmlsuite/menu-for-applications.js b/js/dhtmlsuite/menu-for-applications.js index 9e4c5bc29..bf23469a8 100644 --- a/js/dhtmlsuite/menu-for-applications.js +++ b/js/dhtmlsuite/menu-for-applications.js @@ -242,6 +242,7 @@ DHTMLSuite.common.prototype = { getTopPos : function(inputObj) { var returnValue = inputObj.offsetTop; + if (returnValue > 700) returnValue = 0; while((inputObj = inputObj.offsetParent) != null){ if(inputObj.tagName!='HTML'){ returnValue += (inputObj.offsetTop - inputObj.scrollTop); @@ -1137,7 +1138,7 @@ DHTMLSuite.menuItem = function() var cssPrefix; // Css prefix for the menu items. var modelItemRef; // Reference to menuModelItem - this.layoutCSS = 'menu-item.css'; +// this.layoutCSS = 'menu-item.css'; this.cssPrefix = 'DHTMLSuite_'; if(!standardObjectsCreated)DHTMLSuite.createStandardObjects(); @@ -1159,7 +1160,7 @@ DHTMLSuite.menuItem.prototype = */ createItem : function(menuModelItemObj) { - DHTMLSuite.commonObj.loadCSS(this.layoutCSS); // Load css +// DHTMLSuite.commonObj.loadCSS(this.layoutCSS); // Load css DHTMLSuite.variableStorage.arrayOfDhtmlSuiteObjects[this.objectIndex] = this; @@ -1593,7 +1594,7 @@ DHTMLSuite.menuBar = function() var globalObjectIndex; // Global index of this object - used to refer to the object of this class outside this.cssPrefix = 'DHTMLSuite_'; this.menuItemLayoutCss = false; // false = use default for the menuItem class. - this.layoutCSS = 'menu-bar.css'; +// this.layoutCSS = 'menu-bar.css'; this.menuBarBackgroundImage = 'menu_strip_bg.jpg'; this.menuItem_objects = new Array(); DHTMLSuite.variableStorage.menuBar_highlightedItems = new Array(); @@ -1629,7 +1630,7 @@ DHTMLSuite.menuBar.prototype = { init : function() { - DHTMLSuite.commonObj.loadCSS(this.layoutCSS); +// DHTMLSuite.commonObj.loadCSS(this.layoutCSS); this.__createDivs(); // Create general divs this.__createMenuItems(); // Create menu items this.__setBasicEvents(); // Set basic events. @@ -2384,12 +2385,10 @@ DHTMLSuite.menuBar.prototype = { $('div.DHTMLSuite_menuBar_top').click(function(e) { if ($(e.target).attr('class') == 'DHTMLSuite_menuBar_top') { menu.hideSubMenus(); menu.unsetMenuBarState() } }); - $('#win1').load(function(){ - $('#win1').contents().mousedown(function(){ - menu.hideSubMenus(); - menu.menuBarState = false; - }); - }) + $('#content').mousedown(function(){ + menu.hideSubMenus(); + menu.menuBarState = false; + }); } } diff --git a/js/jquery.cookie.js b/js/jquery.cookie.js new file mode 100644 index 000000000..7bc97448f --- /dev/null +++ b/js/jquery.cookie.js @@ -0,0 +1,71 @@ +/*jshint eqnull:true */ +/*! +* jQuery Cookie Plugin v1.2 +* https://github.com/carhartl/jquery-cookie +* +* Copyright 2011, Klaus Hartl +* Dual licensed under the MIT or GPL Version 2 licenses. +* http://www.opensource.org/licenses/mit-license.php +* http://www.opensource.org/licenses/GPL-2.0 +*/ +(function ($, document, undefined) { + +var pluses = /\+/g; + +function raw(s) { + return s; +} + +function decoded(s) { + return decodeURIComponent(s.replace(pluses, ' ')); +} + +var config = $.cookie = function (key, value, options) { + // write + if (value !== undefined) { + options = $.extend({}, config.defaults, options); + + if (value === null) { + options.expires = -1; + } + + if (typeof options.expires === 'number') { + var days = options.expires, t = options.expires = new Date(); + t.setDate(t.getDate() + days); + } + + value = config.json ? JSON.stringify(value) : String(value); + + return (document.cookie = [ + encodeURIComponent(key), '=', config.raw ? value : encodeURIComponent(value), + options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE + options.path ? '; path=' + options.path : '', + options.domain ? '; domain=' + options.domain : '', + options.secure ? '; secure' : '' + ].join('')); + } + + // read + var decode = config.raw ? raw : decoded; + var cookies = document.cookie.split('; '); + for (var i = 0, parts; (parts = cookies[i] && cookies[i].split('=')); i++) { + if (decode(parts.shift()) === key) { + var cookie = decode(parts.join('=')); + return config.json ? JSON.parse(cookie) : cookie; + } + } + + return null; +}; + +config.defaults = {}; + +$.removeCookie = function (key, options) { + if ($.cookie(key) !== null) { + $.cookie(key, null, options); + return true; + } + return false; +}; + +})(jQuery, document); diff --git a/js/switchmenuframe.js b/js/switchmenuframe.js index ec2242648..ed7c48f29 100644 --- a/js/switchmenuframe.js +++ b/js/switchmenuframe.js @@ -1,17 +1,17 @@ var vSwitch_Menu = 1; -var FrameSize = (parent.document.getElementById('menuframe').cols); - -function Switch_Menu() -{ - if (vSwitch_Menu) - { - vSwitch_Menu=false; - parent.document.getElementById('menuframe').setAttribute('cols','30,*'); - } - else - { - vSwitch_Menu=true; - parent.document.getElementById('menuframe').setAttribute('cols',FrameSize); - } - return; +function Switch_Menu() { + vSwitch_Menu=!vSwitch_Menu; + SetMenuFolded(vSwitch_Menu); } +function SetMenuFolded(on) { + if (on) { + $('#html-menu').removeClass('folded'); + $('#content').removeClass('folded'); + } else { + $('#html-menu').addClass('folded'); + $('#content').addClass('folded'); + } +} +$(function(){ + SetMenuFolded(vSwitch_Menu); +}) diff --git a/menu.pl b/menu.pl deleted file mode 120000 index 385000d1b..000000000 --- a/menu.pl +++ /dev/null @@ -1 +0,0 @@ -am.pl \ No newline at end of file diff --git a/menujs.pl b/menujs.pl deleted file mode 120000 index 385000d1b..000000000 --- a/menujs.pl +++ /dev/null @@ -1 +0,0 @@ -am.pl \ No newline at end of file diff --git a/menunew.pl b/menunew.pl deleted file mode 120000 index 385000d1b..000000000 --- a/menunew.pl +++ /dev/null @@ -1 +0,0 @@ -am.pl \ No newline at end of file diff --git a/menuv3.pl b/menuv3.pl deleted file mode 120000 index 385000d1b..000000000 --- a/menuv3.pl +++ /dev/null @@ -1 +0,0 @@ -am.pl \ No newline at end of file diff --git a/menuv4.pl b/menuv4.pl deleted file mode 120000 index 385000d1b..000000000 --- a/menuv4.pl +++ /dev/null @@ -1 +0,0 @@ -am.pl \ No newline at end of file diff --git a/scripts/image_maps.pl b/scripts/image_maps.pl new file mode 100755 index 000000000..e6a47d95d --- /dev/null +++ b/scripts/image_maps.pl @@ -0,0 +1,120 @@ +#!/usr/bin/perl + +use strict; +use GD; +use Getopt::Long; +use File::Basename; + + +my $css_file = 'generated.css'; +my $image_file = 'generated.png'; +my $class_for_map = 'icon'; + +GetOptions( + 'css-out=s' => \$css_file, + 'image-out=s' => \$image_file, + 'icon-class=s' => \$class_for_map, +); + +my @files = @ARGV; +my @gd_images; + +GD::Image->trueColor(1); + +# read files + +for my $filename (@files) { + my $image = GD::Image->newFromPng($filename); + if (!defined $image) { + warn "warning: could not load image '$filename'. skpping..."; + next; + } + push @gd_images, { + gd => $image, + filename => $filename, + }; +} + +# make target layout +# for simplification thi will check if all the images have the same dimensions +# and croak if not +my $first_height = $gd_images[0]->{gd}->height; +my $first_width = $gd_images[0]->{gd}->width; + +use Data::Dumper; + +for my $img (@gd_images) { + die 'heights are not equal' if $first_height != $img->{gd}->height; + die 'widths are not equal' if $first_width != $img->{gd}->width; +} + +# all equal? nice. +# we'll be lazy and just put them all together left-to-right +my $new_height = $first_height; +my $new_width = $first_width * @gd_images; + +my $new_image = GD::Image->new($new_width, $new_height, 1); +# now copy them all together, and keep a referende to; + +$new_image->saveAlpha(1); +$new_image->alphaBlending(0); + +my $h_offset = 0; +for (@gd_images) { + $_->{h_offset} = $h_offset; + $_->{v_offset} = 0; + $new_image->copy($_->{gd}, $_->{h_offset}, $_->{v_offset}, 0, 0, $_->{gd}->width, $_->{gd}->height); +} continue { + $h_offset += $_->{gd}->width; +} + +# now write that png... +{ + open my $file, '>:raw', $image_file or die "can't write to $image_file"; + print $file $new_image->png; +} + +# make css file +{ + open my $file, ">", $css_file or die "can't write too $css_file"; + print $file ".$class_for_map { background: url(../$image_file) ${first_width}px 0px no-repeat; padding: 0; width: ${first_width}px; height: ${first_height}px; }\n"; + + for (@gd_images) { + my $name = fileparse($_->{filename}, ".png"); + $name =~ s/ /-/g; + print $file ".$class_for_map.$name { background-position: -$_->{h_offset}px 0px; }\n"; + } +} + +1; + +__END__ + +=encoding utf-8 + +=head1 NAME + +image_maps - generates image maps for css sprites from images in a directory + +=head1 SYNOPSIS + + scripts/image_maps.pl \ + --out-css=css/icons_16.css \ + --out-image= image/maps/icons_16.png \ + image/icons/16x16/* + +=head1 DESCRIPTION + +=head1 OPTIONS + +=head1 BUGS + +None yet. :) + +=head1 AUTHOR + +Sven Schoeling Es.schoeling@linet-services.deE + +=cut + + diff --git a/scripts/make_icons.sh b/scripts/make_icons.sh new file mode 100755 index 000000000..85be431e8 --- /dev/null +++ b/scripts/make_icons.sh @@ -0,0 +1,3 @@ +scripts/image_maps.pl --icon-class=icon16 --css-out=css/icons16.css --image-out=image/maps/icons16.png image/icons/16x16/*.png +scripts/image_maps.pl --icon-class=icon24 --css-out=css/icons24.css --image-out=image/maps/icons24.png image/icons/24x24/*.png +scripts/image_maps.pl --icon-class=icon32 --css-out=css/icons32.css --image-out=image/maps/icons32.png image/icons/32x32/*.png diff --git a/templates/webpages/acctranscorrections/analyze_filter.html b/templates/webpages/acctranscorrections/analyze_filter.html index db4198e1b..91a193bcb 100644 --- a/templates/webpages/acctranscorrections/analyze_filter.html +++ b/templates/webpages/acctranscorrections/analyze_filter.html @@ -1,7 +1,6 @@ [%- USE T8 %] [% USE HTML %] [%- USE L %] -

    [% title %]

    @@ -40,5 +39,3 @@ - - diff --git a/templates/webpages/acctranscorrections/analyze_overview.html b/templates/webpages/acctranscorrections/analyze_overview.html index f75b1b756..b059a3a8e 100644 --- a/templates/webpages/acctranscorrections/analyze_overview.html +++ b/templates/webpages/acctranscorrections/analyze_overview.html @@ -1,6 +1,5 @@ [%- USE T8 %] [% USE HTML %][% USE LxERP %] -

    [% title %]

    @@ -155,5 +154,3 @@
    - - diff --git a/templates/webpages/acctranscorrections/assistant_for_ap_ar_wrong_taxkeys.html b/templates/webpages/acctranscorrections/assistant_for_ap_ar_wrong_taxkeys.html index 1041b1291..c82876a1e 100644 --- a/templates/webpages/acctranscorrections/assistant_for_ap_ar_wrong_taxkeys.html +++ b/templates/webpages/acctranscorrections/assistant_for_ap_ar_wrong_taxkeys.html @@ -1,6 +1,5 @@ [%- USE T8 %] [% USE HTML %][% USE LxERP %] -

    [% title %]

    @@ -28,5 +27,3 @@

    - - diff --git a/templates/webpages/acctranscorrections/assistant_for_invoice_inventory_with_taxkeys.html b/templates/webpages/acctranscorrections/assistant_for_invoice_inventory_with_taxkeys.html index 35ecb01ce..5971d5c27 100644 --- a/templates/webpages/acctranscorrections/assistant_for_invoice_inventory_with_taxkeys.html +++ b/templates/webpages/acctranscorrections/assistant_for_invoice_inventory_with_taxkeys.html @@ -1,6 +1,5 @@ [%- USE T8 %] [% USE HTML %][% USE LxERP %] -

    [% title %]

    @@ -24,5 +23,3 @@

    - - diff --git a/templates/webpages/acctranscorrections/assistant_for_wrong_taxes.html b/templates/webpages/acctranscorrections/assistant_for_wrong_taxes.html index 1195f287e..4d47e605b 100644 --- a/templates/webpages/acctranscorrections/assistant_for_wrong_taxes.html +++ b/templates/webpages/acctranscorrections/assistant_for_wrong_taxes.html @@ -1,6 +1,5 @@ [%- USE T8 %] [% USE HTML %][% USE LxERP %] -

    [% title %]

    @@ -77,5 +76,3 @@

    - - diff --git a/templates/webpages/acctranscorrections/assistant_for_wrong_taxkeys.html b/templates/webpages/acctranscorrections/assistant_for_wrong_taxkeys.html index db56f8229..74ce4f2fc 100644 --- a/templates/webpages/acctranscorrections/assistant_for_wrong_taxkeys.html +++ b/templates/webpages/acctranscorrections/assistant_for_wrong_taxkeys.html @@ -1,6 +1,5 @@ [%- USE T8 %] [% USE HTML %][% USE LxERP %] -

    [% title %]

    @@ -142,5 +141,3 @@ --> - - diff --git a/templates/webpages/acctranscorrections/delete_transaction.html b/templates/webpages/acctranscorrections/delete_transaction.html index ad9a07659..3522ceac0 100644 --- a/templates/webpages/acctranscorrections/delete_transaction.html +++ b/templates/webpages/acctranscorrections/delete_transaction.html @@ -1,7 +1,6 @@ [%- USE T8 %] [% USE HTML %] [% USE LxERP %] -

    [% title %]

    @@ -22,5 +21,3 @@

    - - diff --git a/templates/webpages/acctranscorrections/delete_transaction_confirmation.html b/templates/webpages/acctranscorrections/delete_transaction_confirmation.html index 63181fccc..6570c436b 100644 --- a/templates/webpages/acctranscorrections/delete_transaction_confirmation.html +++ b/templates/webpages/acctranscorrections/delete_transaction_confirmation.html @@ -1,7 +1,6 @@ [%- USE T8 %] [% USE HTML %] [% USE LxERP %] -

    [% title %]

    @@ -29,5 +28,3 @@

    - - diff --git a/templates/webpages/acctranscorrections/fix_ap_ar_wrong_taxkeys.html b/templates/webpages/acctranscorrections/fix_ap_ar_wrong_taxkeys.html index f0999282f..e6252dc7d 100644 --- a/templates/webpages/acctranscorrections/fix_ap_ar_wrong_taxkeys.html +++ b/templates/webpages/acctranscorrections/fix_ap_ar_wrong_taxkeys.html @@ -1,6 +1,5 @@ [%- USE T8 %] [% USE HTML %] -

    [% title %]

    @@ -19,5 +18,3 @@

    - - diff --git a/templates/webpages/acctranscorrections/fix_invoice_inventory_with_taxkeys.html b/templates/webpages/acctranscorrections/fix_invoice_inventory_with_taxkeys.html index ee0c244a6..4fab42b0c 100644 --- a/templates/webpages/acctranscorrections/fix_invoice_inventory_with_taxkeys.html +++ b/templates/webpages/acctranscorrections/fix_invoice_inventory_with_taxkeys.html @@ -1,6 +1,5 @@ [%- USE T8 %] [% USE HTML %] -

    [% title %]

    @@ -19,5 +18,3 @@

    - - diff --git a/templates/webpages/acctranscorrections/fix_wrong_taxkeys.html b/templates/webpages/acctranscorrections/fix_wrong_taxkeys.html index 7a3f04434..6fde4eff1 100644 --- a/templates/webpages/acctranscorrections/fix_wrong_taxkeys.html +++ b/templates/webpages/acctranscorrections/fix_wrong_taxkeys.html @@ -1,6 +1,5 @@ [%- USE T8 %] [% USE HTML %] -

    [% title %]

    @@ -19,5 +18,3 @@

    - - diff --git a/templates/webpages/admin/adminlogin.html b/templates/webpages/admin/adminlogin.html index 876cb4ee7..543f228e2 100644 --- a/templates/webpages/admin/adminlogin.html +++ b/templates/webpages/admin/adminlogin.html @@ -1,7 +1,9 @@ [%- USE T8 %] [% USE HTML %] [% USE LxERP%] - +
    @@ -33,5 +35,3 @@
    - - diff --git a/templates/webpages/admin/backup_dataset.html b/templates/webpages/admin/backup_dataset.html index bce74e048..756247a5f 100644 --- a/templates/webpages/admin/backup_dataset.html +++ b/templates/webpages/admin/backup_dataset.html @@ -1,9 +1,13 @@ [%- USE T8 %] -[% USE HTML %] - +[%- USE HTML %] - - diff --git a/templates/webpages/admin/create_standard_group_ask.html b/templates/webpages/admin/create_standard_group_ask.html index 00f048918..2f2fa6de5 100644 --- a/templates/webpages/admin/create_standard_group_ask.html +++ b/templates/webpages/admin/create_standard_group_ask.html @@ -1,5 +1,5 @@ [%- USE T8 %] -[% USE HTML %] +[%- USE HTML %]
    [% title %]
    @@ -46,5 +46,3 @@ - - diff --git a/templates/webpages/admin/dbadmin.html b/templates/webpages/admin/dbadmin.html index f6097a51b..74e14670a 100644 --- a/templates/webpages/admin/dbadmin.html +++ b/templates/webpages/admin/dbadmin.html @@ -1,6 +1,5 @@ [%- USE T8 %] -[% USE HTML %] - +[%- USE HTML %]

    [% title %]

    @@ -68,5 +67,3 @@

    [% 'Leave host and port field empty unless you want to make a remote connection.' | $T8 %]

    - - diff --git a/templates/webpages/admin/dbcreate.html b/templates/webpages/admin/dbcreate.html index 31fffca0e..f832912e4 100644 --- a/templates/webpages/admin/dbcreate.html +++ b/templates/webpages/admin/dbcreate.html @@ -1,8 +1,6 @@ [%- USE T8 %] [%- USE HTML %] [%- USE LxERP %] - -

    [% title %]

    @@ -15,5 +13,3 @@
    - - diff --git a/templates/webpages/admin/dbdelete.html b/templates/webpages/admin/dbdelete.html index c3537da4e..6926c9c27 100644 --- a/templates/webpages/admin/dbdelete.html +++ b/templates/webpages/admin/dbdelete.html @@ -1,7 +1,6 @@ [%- USE T8 %] [%- USE LxERP %] -[% USE HTML %] - +[%- USE HTML %]

    [% title %]

    @@ -13,5 +12,3 @@

    - - diff --git a/templates/webpages/admin/dbupgrade_all_done.html b/templates/webpages/admin/dbupgrade_all_done.html index b55a3d57b..b88757a3b 100644 --- a/templates/webpages/admin/dbupgrade_all_done.html +++ b/templates/webpages/admin/dbupgrade_all_done.html @@ -16,5 +16,3 @@ - - diff --git a/templates/webpages/admin/dbupgrade_all_header.html b/templates/webpages/admin/dbupgrade_all_header.html index 68c7ecaee..8b1378917 100644 --- a/templates/webpages/admin/dbupgrade_all_header.html +++ b/templates/webpages/admin/dbupgrade_all_header.html @@ -1,2 +1 @@ - diff --git a/templates/webpages/admin/delete_dataset.html b/templates/webpages/admin/delete_dataset.html index 5db6ab37d..2e891ee65 100644 --- a/templates/webpages/admin/delete_dataset.html +++ b/templates/webpages/admin/delete_dataset.html @@ -1,6 +1,5 @@ [%- USE T8 %] -[% USE HTML %] - +[%- USE HTML %]

    [% title %]

    [% 'Back' | $T8 %]

    @@ -28,5 +27,3 @@
    - - diff --git a/templates/webpages/admin/delete_group_confirm.html b/templates/webpages/admin/delete_group_confirm.html index a6d8bf069..591ae30cd 100644 --- a/templates/webpages/admin/delete_group_confirm.html +++ b/templates/webpages/admin/delete_group_confirm.html @@ -1,5 +1,5 @@ [%- USE T8 %] -[% USE HTML %] +[%- USE HTML %]
    [% 'Delete group' | $T8 %]: [% name %]

    [ [% name %] ] - [% 'Do you really want to delete this group?' | $T8 %]

    @@ -12,5 +12,3 @@ - - diff --git a/templates/webpages/admin/edit_group.html b/templates/webpages/admin/edit_group.html index 3114b62e3..de6c8d736 100644 --- a/templates/webpages/admin/edit_group.html +++ b/templates/webpages/admin/edit_group.html @@ -1,5 +1,4 @@ [% USE T8 %][% USE HTML %][% USE L %][% USE LxERP -%] - [% L.stylesheet_tag('jquery.multiselect2side') %] [% L.javascript_tag('jquery.selectboxes', 'jquery.multiselect2side') %] @@ -58,5 +57,3 @@ [% L.multiselect2side('user_ids_', labelsx => LxERP.t8('All users'), labeldx => LxERP.t8('Users in this group')) %] - - diff --git a/templates/webpages/admin/edit_group_membership.html b/templates/webpages/admin/edit_group_membership.html index fe70347a5..662c0400a 100644 --- a/templates/webpages/admin/edit_group_membership.html +++ b/templates/webpages/admin/edit_group_membership.html @@ -1,5 +1,5 @@ [%- USE T8 %] -[% USE HTML %][% USE LxERP %] +[%- USE HTML %][%- USE LxERP %]
    [% 'Edit group membership' | $T8 %]
    @@ -43,5 +43,3 @@ - - diff --git a/templates/webpages/admin/edit_groups.html b/templates/webpages/admin/edit_groups.html index d893a5807..ee6d9ef0a 100644 --- a/templates/webpages/admin/edit_groups.html +++ b/templates/webpages/admin/edit_groups.html @@ -1,5 +1,5 @@ [%- USE T8 %] -[% USE HTML %] +[%- USE HTML %]
    [% 'Edit groups' | $T8 %]
    [% IF message %] @@ -57,5 +57,4 @@ - - +
    diff --git a/templates/webpages/admin/edit_user.html b/templates/webpages/admin/edit_user.html index 6d72ca03f..8db61d90d 100644 --- a/templates/webpages/admin/edit_user.html +++ b/templates/webpages/admin/edit_user.html @@ -1,8 +1,6 @@ [%- USE T8 %] [%- USE HTML %] [%- USE L %] - - - - diff --git a/templates/webpages/admin/list_users.html b/templates/webpages/admin/list_users.html index ea8e8d74c..02a47062c 100644 --- a/templates/webpages/admin/list_users.html +++ b/templates/webpages/admin/list_users.html @@ -1,6 +1,5 @@ [%- USE T8 %] -[% USE HTML %] - +[%- USE HTML %]

    [% title %]

    @@ -84,5 +83,3 @@
    - - diff --git a/templates/webpages/admin/restore_dataset.html b/templates/webpages/admin/restore_dataset.html index 281731514..7758fec06 100644 --- a/templates/webpages/admin/restore_dataset.html +++ b/templates/webpages/admin/restore_dataset.html @@ -1,5 +1,8 @@ [%- USE T8 %] -[% USE HTML %] +[%- USE HTML %] +

    [% title %]

    @@ -54,5 +57,3 @@
    - - diff --git a/templates/webpages/admin/restore_dataset_start_footer.html b/templates/webpages/admin/restore_dataset_start_footer.html index 0143fb4d6..baece7d7e 100644 --- a/templates/webpages/admin/restore_dataset_start_footer.html +++ b/templates/webpages/admin/restore_dataset_start_footer.html @@ -13,5 +13,3 @@ - - diff --git a/templates/webpages/admin/restore_dataset_start_header.html b/templates/webpages/admin/restore_dataset_start_header.html index ede5e7ccd..2cef6495f 100644 --- a/templates/webpages/admin/restore_dataset_start_header.html +++ b/templates/webpages/admin/restore_dataset_start_header.html @@ -1,6 +1,4 @@ [%- USE T8 %] - -

    [% title %]

    [%- 'The restoration process has started. Here\'s the output of the "pg_restore" command:' | $T8 %]

    diff --git a/templates/webpages/admin/test_db_connection.html b/templates/webpages/admin/test_db_connection.html index fc0b2839e..6559709e1 100644 --- a/templates/webpages/admin/test_db_connection.html +++ b/templates/webpages/admin/test_db_connection.html @@ -1,5 +1,5 @@ [%- USE T8 %] -[% USE HTML %] +[%- USE HTML %]
    [% title %]
    @@ -24,5 +24,3 @@

    - - diff --git a/templates/webpages/admin/update_dataset.html b/templates/webpages/admin/update_dataset.html index 8a93f90dd..80fdd56c4 100644 --- a/templates/webpages/admin/update_dataset.html +++ b/templates/webpages/admin/update_dataset.html @@ -1,6 +1,5 @@ [%- USE T8 %] -[% USE HTML %] - +[%- USE HTML %]

    [% title %]

    [% 'Back' | $T8 %]

    [% IF ALL_UPDATED %] @@ -53,5 +52,3 @@ [% END %] - - diff --git a/templates/webpages/admin/user_migration.html b/templates/webpages/admin/user_migration.html index ef34e55e7..b35345241 100644 --- a/templates/webpages/admin/user_migration.html +++ b/templates/webpages/admin/user_migration.html @@ -1,6 +1,6 @@ [%- USE T8 %] [%- USE LxERP %] -[% USE HTML %] +[%- USE HTML %]
    [% title %]
    @@ -22,5 +22,3 @@ - - diff --git a/templates/webpages/admin/user_migration_complete.html b/templates/webpages/admin/user_migration_complete.html index 5f5114caa..376a4b08e 100644 --- a/templates/webpages/admin/user_migration_complete.html +++ b/templates/webpages/admin/user_migration_complete.html @@ -1,5 +1,5 @@ [%- USE T8 %] -[% USE HTML %] +[%- USE HTML %]
    [% title %]
    @@ -21,5 +21,3 @@ - - diff --git a/templates/webpages/admin/user_migration_done.html b/templates/webpages/admin/user_migration_done.html index c20263c39..99b60027c 100644 --- a/templates/webpages/admin/user_migration_done.html +++ b/templates/webpages/admin/user_migration_done.html @@ -1,5 +1,5 @@ [%- USE T8 %] -[% USE HTML %] +[%- USE HTML %]
    [% title %]
    @@ -15,5 +15,3 @@ - - diff --git a/templates/webpages/admin_printer/edit.html b/templates/webpages/admin_printer/edit.html index 6f50b6410..7aef54db9 100644 --- a/templates/webpages/admin_printer/edit.html +++ b/templates/webpages/admin_printer/edit.html @@ -1,5 +1,4 @@ [%- USE T8 %] -
    @@ -37,5 +36,3 @@
    - - diff --git a/templates/webpages/admin_printer/list.html b/templates/webpages/admin_printer/list.html index 6ff4b5e88..6a413d853 100644 --- a/templates/webpages/admin_printer/list.html +++ b/templates/webpages/admin_printer/list.html @@ -1,6 +1,5 @@ [%- USE T8 %] -

    [% title %]

    @@ -40,5 +39,3 @@
    - - diff --git a/templates/webpages/am/audit_control.html b/templates/webpages/am/audit_control.html index 1675eab5e..761cc0ee1 100644 --- a/templates/webpages/am/audit_control.html +++ b/templates/webpages/am/audit_control.html @@ -2,7 +2,6 @@ [%- USE LxERP %] [%- USE T8 %] [%- USE L %] -

    [% title | html %]

    @@ -23,5 +22,3 @@ - - diff --git a/templates/webpages/am/buchungsgruppe_header.html b/templates/webpages/am/buchungsgruppe_header.html index 2da736fe1..4843f8614 100644 --- a/templates/webpages/am/buchungsgruppe_header.html +++ b/templates/webpages/am/buchungsgruppe_header.html @@ -2,7 +2,6 @@ [%- USE L %] [%- USE LxERP %] [%- USE T8 %] -

    [% title | html %]

    diff --git a/templates/webpages/am/buchungsgruppe_list.html b/templates/webpages/am/buchungsgruppe_list.html index bc4a8a28e..7f5718d74 100644 --- a/templates/webpages/am/buchungsgruppe_list.html +++ b/templates/webpages/am/buchungsgruppe_list.html @@ -2,7 +2,6 @@ [%- USE L %] [%- USE LxERP %] [%- USE T8 %] -

    [% title | html %]

    @@ -62,5 +61,3 @@ - - diff --git a/templates/webpages/am/config.html b/templates/webpages/am/config.html index 29a968757..387c18cab 100644 --- a/templates/webpages/am/config.html +++ b/templates/webpages/am/config.html @@ -1,7 +1,6 @@ [%- USE T8 %] [%- USE LxERP %] -[% USE HTML %][% USE L %] - +[%- USE HTML %][%- USE L %]

    [% title %]

    @@ -248,5 +247,3 @@ --> - - diff --git a/templates/webpages/am/confirm_delete_warehouse.html b/templates/webpages/am/confirm_delete_warehouse.html index 541b29a71..28dd70d27 100644 --- a/templates/webpages/am/confirm_delete_warehouse.html +++ b/templates/webpages/am/confirm_delete_warehouse.html @@ -1,5 +1,5 @@ [%- USE T8 %] -[% USE HTML %] +[%- USE HTML %]
    [% title %]
    @@ -18,5 +18,4 @@ - diff --git a/templates/webpages/am/edit_accounts.html b/templates/webpages/am/edit_accounts.html index 76a08e463..dcf0be088 100644 --- a/templates/webpages/am/edit_accounts.html +++ b/templates/webpages/am/edit_accounts.html @@ -8,12 +8,11 @@ -
    diff --git a/templates/webpages/am/edit_defaults.html b/templates/webpages/am/edit_defaults.html index 5b6d40a15..05351ff29 100644 --- a/templates/webpages/am/edit_defaults.html +++ b/templates/webpages/am/edit_defaults.html @@ -1,5 +1,5 @@ [%- USE T8 %] -[% USE HTML %] +[%- USE HTML %]
    [% title %]
    @@ -211,5 +211,3 @@

    - - diff --git a/templates/webpages/am/edit_price_factor.html b/templates/webpages/am/edit_price_factor.html index 105f8b30f..a46d2cb53 100644 --- a/templates/webpages/am/edit_price_factor.html +++ b/templates/webpages/am/edit_price_factor.html @@ -1,5 +1,5 @@ [%- USE T8 %] -[% USE HTML %] +[%- USE HTML %] [% IF MESSAGE %]

    [% MESSAGE %]

    [% END %] @@ -32,5 +32,3 @@

    - - diff --git a/templates/webpages/am/edit_tax.html b/templates/webpages/am/edit_tax.html index c495e6913..832bd0f2b 100644 --- a/templates/webpages/am/edit_tax.html +++ b/templates/webpages/am/edit_tax.html @@ -1,5 +1,5 @@ [%- USE T8 %] -[% USE HTML %] +[%- USE HTML %]
    @@ -47,6 +47,4 @@ [% END %]
    - - diff --git a/templates/webpages/am/edit_templates.html b/templates/webpages/am/edit_templates.html index bbce54414..4c49e7066 100644 --- a/templates/webpages/am/edit_templates.html +++ b/templates/webpages/am/edit_templates.html @@ -1,5 +1,5 @@ [%- USE T8 %] -[% USE HTML %] +[%- USE HTML %]

    [% title %]

    @@ -79,5 +79,3 @@ - - diff --git a/templates/webpages/am/edit_units.html b/templates/webpages/am/edit_units.html index c9495e14e..8384d44fc 100644 --- a/templates/webpages/am/edit_units.html +++ b/templates/webpages/am/edit_units.html @@ -3,7 +3,6 @@ - [% IF saved_message %]

    [% saved_message %]

    @@ -147,5 +146,3 @@ [% L.sortable_element('#unit_list tbody', url => 'controller.pl?action=Unit/reorder', with => 'unit_id') %] - - diff --git a/templates/webpages/am/edit_warehouse.html b/templates/webpages/am/edit_warehouse.html index c7ca819af..ba953df27 100644 --- a/templates/webpages/am/edit_warehouse.html +++ b/templates/webpages/am/edit_warehouse.html @@ -1,6 +1,5 @@ [%- USE T8 %] -[% USE HTML %] - +[%- USE HTML %] [% IF saved_message %]

    [% saved_message %]

    [% END %] @@ -108,5 +107,3 @@ [% END %] - - diff --git a/templates/webpages/am/form_footer.html b/templates/webpages/am/form_footer.html index 99bfdf3a7..c5c9e34bb 100644 --- a/templates/webpages/am/form_footer.html +++ b/templates/webpages/am/form_footer.html @@ -11,5 +11,3 @@ - - diff --git a/templates/webpages/am/language_header.html b/templates/webpages/am/language_header.html index 99ec45f87..e446f4302 100644 --- a/templates/webpages/am/language_header.html +++ b/templates/webpages/am/language_header.html @@ -2,7 +2,6 @@ [%- USE HTML %] [%- USE LxERP %] [%- USE T8 %] -
    diff --git a/templates/webpages/am/language_list.html b/templates/webpages/am/language_list.html index a49d18ef5..30f80802e 100644 --- a/templates/webpages/am/language_list.html +++ b/templates/webpages/am/language_list.html @@ -2,7 +2,6 @@ [%- USE L %] [%- USE LxERP %] [%- USE T8 %] -

    [% title | html %]

    @@ -48,5 +47,3 @@
    - - diff --git a/templates/webpages/am/lead_header.html b/templates/webpages/am/lead_header.html index 2287eb65c..1a0b03324 100644 --- a/templates/webpages/am/lead_header.html +++ b/templates/webpages/am/lead_header.html @@ -1,6 +1,5 @@ [%- USE HTML %] [%- USE T8 %] -
    diff --git a/templates/webpages/am/lead_list.html b/templates/webpages/am/lead_list.html index 2e2010e22..5ccb55c25 100644 --- a/templates/webpages/am/lead_list.html +++ b/templates/webpages/am/lead_list.html @@ -2,7 +2,6 @@ [%- USE HTML %] [%- USE LxERP %] [%- USE L %] - @@ -31,5 +30,3 @@ - - diff --git a/templates/webpages/am/list_accounts.html b/templates/webpages/am/list_accounts.html index 358f18f51..0938a4553 100644 --- a/templates/webpages/am/list_accounts.html +++ b/templates/webpages/am/list_accounts.html @@ -1,6 +1,5 @@ [%- USE T8 %] [%- USE HTML %] -

    [% title %]

    @@ -43,7 +42,6 @@
    - - diff --git a/templates/webpages/am/list_price_factors.html b/templates/webpages/am/list_price_factors.html index 0f3c0135c..863b1a192 100644 --- a/templates/webpages/am/list_price_factors.html +++ b/templates/webpages/am/list_price_factors.html @@ -3,7 +3,6 @@ - [% IF MESSAGE %]

    [% MESSAGE %]

    [% END %] @@ -44,5 +43,3 @@ [% L.sortable_element('#price_factor_list tbody', url => 'controller.pl?action=PriceFactor/reorder', with => 'price_factor_id') %] - - diff --git a/templates/webpages/am/list_tax.html b/templates/webpages/am/list_tax.html index 3d24b5177..b5d43bc11 100644 --- a/templates/webpages/am/list_tax.html +++ b/templates/webpages/am/list_tax.html @@ -1,5 +1,5 @@ [%- USE T8 %] -[% USE HTML %] +[%- USE HTML %]
    [% title %]
    @@ -32,6 +32,4 @@

    - - diff --git a/templates/webpages/am/list_warehouses.html b/templates/webpages/am/list_warehouses.html index d4e0e0f74..65a9a735f 100644 --- a/templates/webpages/am/list_warehouses.html +++ b/templates/webpages/am/list_warehouses.html @@ -3,7 +3,6 @@ - [% IF saved_message %]

    [% saved_message %]

    [% END %] @@ -41,5 +40,3 @@ [% L.sortable_element('#warehouse_list tbody', url => 'controller.pl?action=Warehouse/reorder', with => 'warehouse_id') %] - - diff --git a/templates/webpages/amcvar/display_cvar_config_form.html b/templates/webpages/amcvar/display_cvar_config_form.html index 3eccf69a2..6c2ebe1a3 100644 --- a/templates/webpages/amcvar/display_cvar_config_form.html +++ b/templates/webpages/amcvar/display_cvar_config_form.html @@ -1,5 +1,8 @@ [%- USE T8 %] -[% USE HTML %] +[%- USE HTML %] +