Merge branch 'master' of vc.linet-services.de:public/lx-office-erp
authorJan Büren <jan@kivitendo-premium.de>
Tue, 30 Oct 2012 09:53:20 +0000 (10:53 +0100)
committerJan Büren <jan@kivitendo-premium.de>
Tue, 30 Oct 2012 09:53:20 +0000 (10:53 +0100)
304 files changed:
SL/AM.pm
SL/Controller/BackgroundJobHistory.pm
SL/Controller/Base.pm
SL/Controller/FrameHeader.pm
SL/Controller/Layout.pm [new file with mode: 0644]
SL/Controller/LoginScreen.pm
SL/Controller/SellPriceInformation.pm
SL/Controller/TaskServer.pm
SL/Dispatcher.pm
SL/Dispatcher/AuthHandler.pm
SL/Dispatcher/AuthHandler/Admin.pm
SL/Dispatcher/AuthHandler/User.pm
SL/Drafts.pm
SL/Form.pm
SL/IC.pm
SL/InstallationCheck.pm
SL/Layout/Admin.pm [new file with mode: 0644]
SL/Layout/Base.pm [new file with mode: 0644]
SL/Layout/Classic.pm [new file with mode: 0644]
SL/Layout/Css.pm [new file with mode: 0644]
SL/Layout/Dispatcher.pm [new file with mode: 0644]
SL/Layout/Javascript.pm [new file with mode: 0644]
SL/Layout/Login.pm [new file with mode: 0644]
SL/Layout/MenuLeft.pm [new file with mode: 0644]
SL/Layout/None.pm [new file with mode: 0644]
SL/Layout/Top.pm [new file with mode: 0644]
SL/Layout/V3.pm [new file with mode: 0644]
SL/Layout/V4.pm [new file with mode: 0644]
SL/Menu.pm
SL/ReportGenerator.pm
SL/User.pm
bin/mozilla/admin.pl
bin/mozilla/am.pl
bin/mozilla/amtemplates.pl
bin/mozilla/ap.pl
bin/mozilla/ar.pl
bin/mozilla/arap.pl
bin/mozilla/ca.pl
bin/mozilla/common.pl
bin/mozilla/cp.pl
bin/mozilla/ct.pl
bin/mozilla/dn.pl
bin/mozilla/do.pl
bin/mozilla/drafts.pl
bin/mozilla/fu.pl
bin/mozilla/gl.pl
bin/mozilla/ic.pl
bin/mozilla/io.pl
bin/mozilla/ir.pl
bin/mozilla/is.pl
bin/mozilla/menu.pl [deleted file]
bin/mozilla/menujs.pl [deleted file]
bin/mozilla/menunew.pl [deleted file]
bin/mozilla/menuv3.pl [deleted file]
bin/mozilla/menuv4.pl [deleted file]
bin/mozilla/oe.pl
bin/mozilla/projects.pl
bin/mozilla/rp.pl
bin/mozilla/ustva.pl
bin/mozilla/wh.pl
css/icons16.css [new file with mode: 0644]
css/icons24.css [new file with mode: 0644]
css/icons32.css [new file with mode: 0644]
css/kivitendo/main.css
css/kivitendo/menu.css
css/lx-office-erp/frame_header/header.css
css/lx-office-erp/main.css
css/lx-office-erp/menu.css
doc/dokumentation.xml
doc/html/ch02s04.html
doc/html/ch02s05.html
doc/html/ch02s06.html
doc/html/ch03s02.html
doc/html/ch04.html
doc/html/index.html
doc/kivitendo-Dokumentation.pdf
image/maps/icons16.png [new file with mode: 0644]
image/maps/icons24.png [new file with mode: 0644]
image/maps/icons32.png [new file with mode: 0644]
index.html
js/ajax_layout.js [new file with mode: 0644]
js/common.js
js/dhtmlsuite/menu-for-applications.js
js/jquery.cookie.js [new file with mode: 0644]
js/switchmenuframe.js
locale/de/all
menu.pl [deleted symlink]
menujs.pl [deleted symlink]
menunew.pl [deleted symlink]
menuv3.pl [deleted symlink]
menuv4.pl [deleted symlink]
scripts/image_maps.pl [new file with mode: 0755]
scripts/locales.pl
scripts/make_icons.sh [new file with mode: 0755]
templates/print/f-tex/default.tex
templates/webpages/acctranscorrections/analyze_filter.html
templates/webpages/acctranscorrections/analyze_overview.html
templates/webpages/acctranscorrections/assistant_for_ap_ar_wrong_taxkeys.html
templates/webpages/acctranscorrections/assistant_for_invoice_inventory_with_taxkeys.html
templates/webpages/acctranscorrections/assistant_for_wrong_taxes.html
templates/webpages/acctranscorrections/assistant_for_wrong_taxkeys.html
templates/webpages/acctranscorrections/delete_transaction.html
templates/webpages/acctranscorrections/delete_transaction_confirmation.html
templates/webpages/acctranscorrections/fix_ap_ar_wrong_taxkeys.html
templates/webpages/acctranscorrections/fix_invoice_inventory_with_taxkeys.html
templates/webpages/acctranscorrections/fix_wrong_taxkeys.html
templates/webpages/admin/adminlogin.html
templates/webpages/admin/backup_dataset.html
templates/webpages/admin/backup_dataset_email_done.html
templates/webpages/admin/check_auth_database.html
templates/webpages/admin/check_auth_tables.html
templates/webpages/admin/create_dataset.html
templates/webpages/admin/create_standard_group_ask.html
templates/webpages/admin/dbadmin.html
templates/webpages/admin/dbcreate.html
templates/webpages/admin/dbdelete.html
templates/webpages/admin/dbupgrade_all_done.html
templates/webpages/admin/dbupgrade_all_header.html
templates/webpages/admin/delete_dataset.html
templates/webpages/admin/delete_group_confirm.html
templates/webpages/admin/edit_group.html
templates/webpages/admin/edit_group_membership.html
templates/webpages/admin/edit_groups.html
templates/webpages/admin/edit_user.html
templates/webpages/admin/list_users.html
templates/webpages/admin/restore_dataset.html
templates/webpages/admin/restore_dataset_start_footer.html
templates/webpages/admin/restore_dataset_start_header.html
templates/webpages/admin/test_db_connection.html
templates/webpages/admin/update_dataset.html
templates/webpages/admin/user_migration.html
templates/webpages/admin/user_migration_complete.html
templates/webpages/admin/user_migration_done.html
templates/webpages/admin_printer/edit.html
templates/webpages/admin_printer/list.html
templates/webpages/am/audit_control.html
templates/webpages/am/buchungsgruppe_header.html
templates/webpages/am/buchungsgruppe_list.html
templates/webpages/am/config.html
templates/webpages/am/confirm_delete_warehouse.html
templates/webpages/am/edit_accounts.html
templates/webpages/am/edit_defaults.html
templates/webpages/am/edit_price_factor.html
templates/webpages/am/edit_tax.html
templates/webpages/am/edit_templates.html
templates/webpages/am/edit_units.html
templates/webpages/am/edit_warehouse.html
templates/webpages/am/form_footer.html
templates/webpages/am/language_header.html
templates/webpages/am/language_list.html
templates/webpages/am/lead_header.html
templates/webpages/am/lead_list.html
templates/webpages/am/list_accounts.html
templates/webpages/am/list_price_factors.html
templates/webpages/am/list_tax.html
templates/webpages/am/list_warehouses.html
templates/webpages/amcvar/display_cvar_config_form.html
templates/webpages/amcvar/list_cvar_configs.html
templates/webpages/ap/ap_transactions_bottom.html
templates/webpages/ap/form_footer.html
templates/webpages/ap/search.html
templates/webpages/ar/ar_transactions_bottom.html
templates/webpages/ar/form_header.html
templates/webpages/ar/search.html
templates/webpages/arap/select_project.html
templates/webpages/background_job/form.html
templates/webpages/background_job/list.html
templates/webpages/background_job_history/list.html
templates/webpages/background_job_history/show.html
templates/webpages/bankaccounts/bank_account_display_form.html
templates/webpages/bp/list_spool.html
templates/webpages/bp/search.html
templates/webpages/business/form.html
templates/webpages/business/list.html
templates/webpages/ca/list.html
templates/webpages/common/search_history.html
templates/webpages/common/show_vc_details.html
templates/webpages/cp/form_footer.html
templates/webpages/cp/form_header.html
templates/webpages/csv_import/_form_parts.html
templates/webpages/csv_import/form.html
templates/webpages/ct/_contact.html
templates/webpages/ct/form_footer.html
templates/webpages/ct/form_header.html
templates/webpages/ct/search.html
templates/webpages/ct/search_contact.html
templates/webpages/datev/export.html
templates/webpages/datev/export3.html
templates/webpages/datev/export_bewegungsdaten.html
templates/webpages/datev/export_stammdaten.html
templates/webpages/dbupgrade/footer.html
templates/webpages/dbupgrade/header.html
templates/webpages/department/form.html
templates/webpages/department/list.html
templates/webpages/do/delete.html
templates/webpages/do/form_footer.html
templates/webpages/do/form_header.html
templates/webpages/do/search.html
templates/webpages/do/set_stock_in_out.html
templates/webpages/do/stock_in_form.html
templates/webpages/do/stock_out_form.html
templates/webpages/drafts/load.html
templates/webpages/drafts/save_new.html
templates/webpages/dunning/add.html
templates/webpages/dunning/edit_config.html
templates/webpages/dunning/search.html
templates/webpages/dunning/set_email.html
templates/webpages/dunning/show_dunning_bottom.html
templates/webpages/dunning/show_invoices.html
templates/webpages/fu/add_edit.html
templates/webpages/fu/close_window.html
templates/webpages/fu/edit_access_rights.html
templates/webpages/fu/report_for_todo_list.html
templates/webpages/fu/search.html
templates/webpages/generic/calculate_qty.html
templates/webpages/generic/cov_selection.html
templates/webpages/generic/edit_email.html
templates/webpages/generic/error.html
templates/webpages/generic/exception.html
templates/webpages/generic/information.html
templates/webpages/generic/new_item.html
templates/webpages/generic/part_selection.html
templates/webpages/generic/select_delivery_customer.html
templates/webpages/generic/select_part.html
templates/webpages/generic/select_vendor.html
templates/webpages/generic/set_longdescription.html
templates/webpages/generictranslations/edit_greetings.html
templates/webpages/generictranslations/edit_sepa_strings.html
templates/webpages/gl/form_footer.html
templates/webpages/gl/form_header.html
templates/webpages/gl/search.html
templates/webpages/ic/choice.html
templates/webpages/ic/confirm_price_update.html
templates/webpages/ic/form_footer.html
templates/webpages/ic/form_header.html
templates/webpages/ic/parts_language_selection.html
templates/webpages/ic/search.html
templates/webpages/ic/search_update_prices.html
templates/webpages/io/select_item.html
templates/webpages/io/ship_to.html
templates/webpages/ir/form_footer.html
templates/webpages/ir/form_header.html
templates/webpages/is/form_footer.html
templates/webpages/is/form_header.html
templates/webpages/layout/focus_setup.html [new file with mode: 0644]
templates/webpages/layout/javascript_setup.html [new file with mode: 0644]
templates/webpages/login/company_logo.html
templates/webpages/login_screen/auth_db_needs_update.html
templates/webpages/login_screen/auth_db_unreachable.html
templates/webpages/login_screen/old_configuration_files.html
templates/webpages/login_screen/user_login.html
templates/webpages/menu/header.html
templates/webpages/menu/menu.html [new file with mode: 0644]
templates/webpages/menu/menunew.html
templates/webpages/menu/menuv3.html
templates/webpages/menu/menuv4.html
templates/webpages/oe/check_for_direct_delivery.html
templates/webpages/oe/delete.html
templates/webpages/oe/edit_periodic_invoices_config.html
templates/webpages/oe/form_footer.html
templates/webpages/oe/form_header.html
templates/webpages/oe/report_for_todo_list.html
templates/webpages/oe/sales_price_information.html
templates/webpages/oe/save_periodic_invoices_config.html
templates/webpages/oe/search.html
templates/webpages/payment_term/form.html
templates/webpages/payment_term/list.html
templates/webpages/pe/partsgroup_form.html
templates/webpages/pe/partsgroup_report.html
templates/webpages/pe/pricegroup_form.html
templates/webpages/pe/pricegroup_report.html
templates/webpages/pe/search.html
templates/webpages/projects/project_form.html
templates/webpages/projects/search.html
templates/webpages/rc/step1.html
templates/webpages/rc/step2.html
templates/webpages/report_generator/csv_export_options.html
templates/webpages/report_generator/html_report.html
templates/webpages/report_generator/pdf_export_options.html
templates/webpages/rp/balance_sheet.html
templates/webpages/rp/e_mail.html
templates/webpages/rp/html_report_susa.html
templates/webpages/rp/report.html
templates/webpages/rp/tax_report.html
templates/webpages/sepa/bank_transfer_add.html
templates/webpages/sepa/bank_transfer_create.html
templates/webpages/sepa/bank_transfer_created.html
templates/webpages/sepa/bank_transfer_edit.html
templates/webpages/sepa/bank_transfer_mark_as_closed_step1.html
templates/webpages/sepa/bank_transfer_search.html
templates/webpages/task_server/show.html
templates/webpages/todo/show_todo_list.html
templates/webpages/ustva/config_step1.html
templates/webpages/ustva/config_step2.html
templates/webpages/ustva/generic_taxreport.html
templates/webpages/ustva/report.html
templates/webpages/vk/search_invoice.html
templates/webpages/wh/journal_filter.html
templates/webpages/wh/removal_parts_selection.html
templates/webpages/wh/report_filter.html
templates/webpages/wh/transfer_parts_selection.html
templates/webpages/wh/warehouse_selection.html
templates/webpages/wh/warehouse_selection_assembly.html
templates/webpages/wh/warehouse_selection_stock.html

index 59e9c78..1a085b8 100644 (file)
--- a/SL/AM.pm
+++ b/SL/AM.pm
@@ -269,6 +269,17 @@ sub save_account {
       $form->{valid_from} = '';
     };
 
+    $query = '
+      SELECT
+        accno
+      FROM chart
+      WHERE accno = ?';
+    my ($accno) = selectrow_query($form, $dbh, $query, $form->{accno});
+
+    if ($accno) {
+      $form->error($::locale->text('Account number not unique!'));
+    }
+
     $query = qq|UPDATE chart SET
                   accno = ?,
                   description = ?,
index fbee5c0..29f2bc7 100644 (file)
@@ -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;
index 6d879e8..7fe1d36 100644 (file)
@@ -84,7 +84,7 @@ sub render {
 
     } else {
       $::form->{title} = $locals{title} if $locals{title};
-      $::form->header;
+      $::form->header(no_menu => $options->{no_menu});
     }
   }
 
index 855350c..69c48eb 100644 (file)
@@ -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 (file)
index 0000000..98c012c
--- /dev/null
@@ -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;
index 47dfa90..89f21cc 100644 (file)
@@ -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;
index 522f101..bf85c86 100644 (file)
@@ -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 {
index 2649f5f..97c41c6 100644 (file)
@@ -21,7 +21,7 @@ __PACKAGE__->run_before('check_auth');
 sub action_show {
   my ($self) = @_;
 
-  $::form->use_stylesheet('lx-office-erp/background_jobs.css');
+  $::request->{layout}->use_stylesheet('background_jobs.css');
 
   flash('warning', $::locale->text('The task server does not appear to be running.')) if !$self->task_server->is_running;
 
index 43bf668..35a3518 100644 (file)
@@ -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;
index 22b2be4..c244431 100644 (file)
@@ -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;
index 77202e8..2e41ee9 100644 (file)
@@ -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');
index 150245c..1273d67 100644 (file)
@@ -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;
index 7298f5c..16111af 100644 (file)
@@ -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();
index 539cd9c..c14024f 100644 (file)
@@ -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, "<meta http-equiv='refresh' content='$refresh_time;$refresh_url'>";
   }
 
-  push @header, map { qq|<link rel="stylesheet" href="$_" type="text/css" title="Stylesheet">| } $self->use_stylesheet;
-
-  push @header, "<style type='text/css'>\@page { size:landscape; }</style>" if $self->{landscape};
-  push @header, "<link rel='shortcut icon' href='$self->{favicon}' type='image/x-icon'>" if -f $self->{favicon};
-  push @header, map { qq|<script type="text/javascript" src="js/$_.js"></script>| }
-       qw(jquery common jscalendar/calendar jscalendar/lang/calendar-de jscalendar/calendar-setup part_selection jquery-ui jqModal switchmenuframe);
+  push @header, map { qq|<link rel="stylesheet" href="$_" type="text/css" title="Stylesheet">| } $layout->stylesheets;
+  push @header, "<style type='text/css'>\@page { size:landscape; }</style> "                     if $self->{landscape};
+  push @header, "<link rel='shortcut icon' href='$self->{favicon}' type='image/x-icon'>"         if -f $self->{favicon};
+  push @header, map { qq|<script type="text/javascript" src="$_"></script>| }                    $layout->javascripts;
   push @header, $self->{javascript} if $self->{javascript};
-  push @header, map { qq|<link rel="stylesheet" type="text/css" href="$css_path/$_.css">| }
-       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|<link rel="stylesheet" type="text/css" href="js/jscalendar/calendar-win2k-1.css">| }
   push @header, map { $_->show_javascript } @{ $self->{AJAX} || [] };
-  push @header, "<script type='text/javascript'>function fokus(){ document.$self->{fokus}.focus(); }</script>" if $self->{fokus};
-  push @header, sprintf "<script type='text/javascript'>top.document.title='%s';</script>",
-    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|
-    <script type="text/javascript">
-    <!--
-      // Write a meaningful title-tag for our frameset.
-      top.document.title="| . $self->{"title"} . qq| - | . $self->{"login"} . qq| - | . $::myconfig{dbname} . qq| - V| . $self->{"version"} . qq|";
-    //-->
-    </script>|;
-  }
 
   my  %doctypes = (
     strict       => qq|<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">|,
     transitional => qq|<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">|,
     frameset     => qq|<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">|,
+    html5        => qq|<!DOCTYPE html>|,
   );
 
   # output
@@ -556,15 +523,34 @@ EOT
    ***********************************************/
 
   </script>
-  $params{extra_code}
-  $title_hack
  </head>
+ <body>
 
 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 "<script type='text/javascript'>@inline_scripts</script>\n";
+  }
+
+  print <<EOL
+ </body>
+</html>
+EOL
+}
+
 sub ajax_response_header {
   $main::lxdebug->enter_sub();
 
@@ -1111,6 +1097,7 @@ sub parse_template {
     UNLINK => ($::lx_office_conf{debug} && $::lx_office_conf{debug}->{keep_temp_files})? 0 : 1,
   );
   close $temp_fh;
+  (undef, undef, $self->{template_meta}{tmpfile}) = File::Spec->splitpath( $self->{tmpfile} );
 
   if ($template->uses_temp_file() || $self->{media} eq 'email') {
     $out              = $self->{OUT};
@@ -1755,10 +1742,9 @@ sub set_payment_options {
     $amounts{invtotal} = $self->{invtotal};
     $amounts{total}    = $self->{total};
   }
-  $amounts{skonto_in_percent} = 100.0 * $self->{percent_skonto};
-
   map { $amounts{$_} = $self->parse_amount($myconfig, $amounts{$_}) } keys %amounts;
 
+  $amounts{skonto_in_percent}  = 100.0 * $self->{percent_skonto};
   $amounts{skonto_amount}      = $amounts{invtotal} * $self->{percent_skonto};
   $amounts{invtotal_wo_skonto} = $amounts{invtotal} * (1 - $self->{percent_skonto});
   $amounts{total_wo_skonto}    = $amounts{total}    * (1 - $self->{percent_skonto});
@@ -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__
index 8895bf8..0f41870 100644 (file)
--- a/SL/IC.pm
+++ b/SL/IC.pm
@@ -793,7 +793,7 @@ sub all_parts {
   my @apoe_filters         = qw(transdate);
   my @like_filters         = (@simple_filters, @invoice_oi_filters);
   my @all_columns          = (@simple_filters, @makemodel_filters, @apoe_filters, @project_filters, qw(serialnumber));
-  my @simple_l_switches    = (@all_columns, qw(listprice sellprice lastcost priceupdate weight unit bin rop image));
+  my @simple_l_switches    = (@all_columns, qw(notes listprice sellprice lastcost priceupdate weight unit bin rop image));
   my @oe_flags             = qw(bought sold onorder ordered rfq quoted);
   my @qsooqr_flags         = qw(invnumber ordnumber quonumber trans_id name module qty);
   my @deliverydate_flags   = qw(deliverydate);
@@ -1094,7 +1094,7 @@ sub all_parts {
   if ($form->{searchitems} eq 'assembly' && $form->{bom}) {
     $query =
       qq|SELECT p.id, p.partnumber, p.description, a.qty AS onhand,
-           p.unit, p.bin,
+           p.unit, p.bin, p.notes,
            p.sellprice, p.listprice, p.lastcost,
            p.rop, p.weight, p.priceupdate,
            p.image, p.drawing, p.microfiche,
index d29578b..451c418 100644 (file)
@@ -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 (file)
index 0000000..00e3125
--- /dev/null
@@ -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 {
+  "<div id='admin' class='admin'>\n";
+}
+
+sub end_content {
+  "</div>\n";
+}
+
+1;
diff --git a/SL/Layout/Base.pm b/SL/Layout/Base.pm
new file mode 100644 (file)
index 0000000..0c209e2
--- /dev/null
@@ -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 (file)
index 0000000..9503d05
--- /dev/null
@@ -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 (file)
index 0000000..883353a
--- /dev/null
@@ -0,0 +1,128 @@
+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&auml;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"})) {
+
+      my $h = $self->print_menu("${parent}${item}", $depth * 1 + 1)."\n";
+      if (!$parent) {
+        $html .= qq|<ul><li><h2>${menu_text}</h2><ul>${h}</ul></li></ul>\n|;
+      } else {
+        $html .= qq|<li><div class="x">${menu_text}</div><ul>${h}</ul></li>\n|;
+      }
+    } else {
+      if ($self->{sub_class} && $depth > 1) {
+        $html .= qq|<li class='sub'>|;
+      } else {
+        $html .= qq|<li>|;
+      }
+      $html .= $self->menuitem_v3("${parent}$item", { "title" => $menu_title });
+      $html .= qq|${menu_text}</a></li>\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|<a href="$module?action=| . $::form->escape($action) . qq|&level=| . $::form->escape($level);
+
+  my @vars = qw(module action target href);
+
+  if ($menuitem->{href}) {
+    $str  = qq|<a href=$menuitem->{href}|;
+    @vars = qw(module target href);
+  }
+
+  map { delete $menuitem->{$_} } @vars;
+
+  # add other params
+  foreach my $key (keys %{ $menuitem }) {
+    $str .= "&" . $::form->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 (file)
index 0000000..89c950b
--- /dev/null
@@ -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 (file)
index 0000000..a9a1748
--- /dev/null
@@ -0,0 +1,141 @@
+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 {
+  "<div id='content'>\n";
+}
+
+sub end_content {
+  "</div>\n";
+}
+
+sub stylesheets {
+  $_[0]->add_stylesheets(qw(
+    dhtmlsuite/menu-item.css
+    dhtmlsuite/menu-bar.css
+    menu.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&auml;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})) {
+      $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 (file)
index 0000000..ed649d0
--- /dev/null
@@ -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 {
+  "<div id='login' class='login'>\n";
+}
+
+sub end_content {
+  "</div>\n";
+}
+
+1;
diff --git a/SL/Layout/MenuLeft.pm b/SL/Layout/MenuLeft.pm
new file mode 100644 (file)
index 0000000..2cee4ea
--- /dev/null
@@ -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 {
+  "<div id='html-menu'></div>\n";
+}
+
+sub start_content {
+  "<div id='content' class='html-menu'>\n";
+}
+
+sub end_content {
+  "</div>\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:
+
+  <div id="mi[2]" class="mi [4] [1]">
+    <a class="ml">
+      <span class="mii ms">
+        <div class="[3]"></div>
+      </span>
+      <span class="mic">[0]</span>
+    </a>
+  </div>
+
+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<Master-Data> 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 <a> 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 <span> 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 E<lt>s.schoeling@linet-services.deE<gt>
+
+=cut
diff --git a/SL/Layout/None.pm b/SL/Layout/None.pm
new file mode 100644 (file)
index 0000000..ff82d8e
--- /dev/null
@@ -0,0 +1,42 @@
+package SL::Layout::None;
+
+use strict;
+use parent qw(SL::Layout::Base);
+
+sub javascripts_inline {
+  _setup_formats(),
+  _setup_focus(),
+}
+
+sub use_javascript {
+  my $self = shift;
+  qw(
+    js/jquery.js
+    js/common.js
+  ),
+  $self->SUPER::use_javascript(@_);
+}
+
+sub use_stylesheet {
+  my $self = shift;
+  qw(
+    main.css
+  ),
+  $self->SUPER::use_stylesheet(@_);
+}
+
+sub _setup_formats {
+  $::form->parse_html_template('layout/javascript_setup')
+}
+
+sub _setup_focus {
+  if ($::request->{layout}->focus) {
+    return $::form->parse_html_template('layout/focus_setup', {
+      focus => $::request->{layout}->focus,
+    })
+  } else {
+    return ();
+  }
+}
+
+1;
diff --git a/SL/Layout/Top.pm b/SL/Layout/Top.pm
new file mode 100644 (file)
index 0000000..f007e09
--- /dev/null
@@ -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<frame-header>. 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 E<lt>s.schoeling@linet-services.deE<gt>
+
+=cut
diff --git a/SL/Layout/V3.pm b/SL/Layout/V3.pm
new file mode 100644 (file)
index 0000000..4769c40
--- /dev/null
@@ -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 {
+  "<div id='content'>\n";
+}
+
+sub end_content {
+  "</div>\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 (file)
index 0000000..81789d4
--- /dev/null
@@ -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 {
+  "<div id='content'>\n";
+}
+
+sub end_content {
+  "</div>\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;
index ab35fed..48ac622 100644 (file)
@@ -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&amp;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 .= "&amp;" . $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 = "<a href='$href' $target_token $style>";
-
-  $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|<a href="$module?action=| . $form->escape($action) . qq|&level=| . $form->escape($level);
-
-  my @vars = qw(module action target href);
-
-  if ($self->{$item}{href}) {
-    $str  = qq|<a href=$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 ($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|&amp;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 .= "&amp;" . $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);
 
index 688f165..deb4e19 100644 (file)
@@ -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 {
index 2de54ee..37a61c5 100644 (file)
@@ -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");
@@ -173,13 +172,7 @@ sub login {
       # remove lock file
       unlink($::lx_office_conf{paths}->{userspath} . "/nologin");
 
-      my $menufile =
-        $self->{"menustyle"} eq "v3" ? "menuv3.pl" :
-        $self->{"menustyle"} eq "neu" ? "menunew.pl" :
-        $self->{"menustyle"} eq "js" ? "menujs.pl" :
-        "menu.pl";
-
-      print $form->parse_html_template("dbupgrade/footer", { "menufile" => $menufile });
+      print $form->parse_html_template("dbupgrade/footer");
 
       $rc = -2;
     }
index c704174..0a7145a 100755 (executable)
@@ -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();
 
index c847728..4e4f053 100644 (file)
@@ -336,7 +336,7 @@ sub account_header {
 
   # account where AR_tax or AP_tax is set are not orphaned if they are used as
   # tax-o-matic account
-  if ( $form->{id} && !$form->{orphaned} && ($form->{link} =~ m/(AP_tax|AR_tax)/) ) {
+  if ( $form->{id} && $form->{orphaned} && ($form->{link} =~ m/(AP_tax|AR_tax)/) ) {
     if (SL::DB::Manager::Tax->find_by(chart_id => $form->{id})) {
       $form->{orphaned} = 0;
     }
@@ -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;
@@ -1590,7 +1590,7 @@ sub add_price_factor {
 
   $form->{title}      = $locale->text('Add Price Factor');
   $form->{callback} ||= build_std_url('action=add_price_factor');
-  $form->{fokus}      = 'description';
+  $::request->{layout}->focus('#description');
 
   $form->header();
   print $form->parse_html_template('am/edit_price_factor');
@@ -1609,7 +1609,7 @@ sub edit_price_factor {
 
   $form->{title}      = $locale->text('Edit Price Factor');
   $form->{callback} ||= build_std_url('action=add_price_factor');
-  $form->{fokus}      = 'description';
+  $::request->{layout}->focus('#description');
 
   AM->get_price_factor(\%myconfig, $form);
 
@@ -1697,7 +1697,7 @@ sub add_warehouse {
 
   $form->{title}      = $locale->text('Add Warehouse');
   $form->{callback} ||= build_std_url('action=add_warehouse');
-  $form->{fokus}      = 'description';
+  $::request->{layout}->focus('#description');
 
   $form->header();
   print $form->parse_html_template('am/edit_warehouse');
@@ -1720,7 +1720,7 @@ sub edit_warehouse {
 
   $form->{title}      = $locale->text('Edit Warehouse');
   $form->{callback} ||= build_std_url('action=list_warehouses');
-  $form->{fokus}      = 'description';
+  $::request->{layout}->focus('#description');
 
   $form->header();
   print $form->parse_html_template('am/edit_warehouse');
index 4bc6f01..9f21e22 100644 (file)
@@ -272,7 +272,7 @@ sub display_template_form {
     $options{"CAN_EDIT"} = $form->{"edit"};
 
     if ($form->{edit}) {
-      $form->{fokus} = "Form.content";
+      $::request->{layout}->focus("#edit_content");
 
     } else {
       $options{"content"}                 = "\n\n" if (!$options{"content"});
index f961ead..8c55a3d 100644 (file)
@@ -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|
-<body onLoad="$onload">
-
 <form method=post action=$form->{script}>
 
 <input type=hidden name=id value=$form->{id}>
@@ -1164,8 +1160,6 @@ sub delete {
   delete $form->{header};
 
   print qq|
-<body>
-
 <form method=post action=$form->{script}>
 |;
 
@@ -1185,9 +1179,6 @@ sub delete {
 <input name=action class=submit type=submit value="|
     . $locale->text('Yes') . qq|">
 </form>
-
-</body>
-</html>
 |;
 
   $main::lxdebug->leave_sub();
@@ -1230,7 +1221,7 @@ sub search {
   $form->all_vc(\%myconfig, "vendor", "AP");
 
   $form->{title}    = $locale->text('AP Transactions');
-  $form->{fokus}    = "search.vendor";
+  $::request->{layout}->focus('#vendor');
   $form->{jsscript} = 1;
 
   $form->get_lists("projects"     => { "key" => "ALL_PROJECTS", "all" => 1 },
@@ -1445,6 +1436,9 @@ sub storno {
     $form->error($locale->text("Transaction has already been cancelled!"));
   }
 
+  $form->error($locale->text('Cannot post storno for a closed period!'))
+    if ( $form->date_closed($form->{transdate}, \%myconfig));
+
   AP->storno($form, \%myconfig, $form->{id});
 
   # saving the history
index 45193ed..f164997 100644 (file)
@@ -219,7 +219,6 @@ sub form_header {
 
   my ($title, $readonly, $exchangerate, $rows);
   my ($notes, $department, $customer, $employee, $amount, $project);
-  my ($onload);
   my ($ARselected);
 
 
@@ -316,7 +315,7 @@ sub form_header {
     $taxcharts{$item->{id}} = $item;
   }
 
-  $form->{fokus} = "arledger.customer";
+  $::request->{layout}->focus("#customer");
 
   my $follow_up_vc         =  $form->{customer};
   $follow_up_vc            =~ s/--.*?//;
@@ -326,9 +325,6 @@ sub form_header {
     qq|<script type="text/javascript" src="js/show_vc_details.js"></script>| .
     qq|<script type="text/javascript" src="js/follow_up.js"></script>|;
 
-  $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,
   });
@@ -529,10 +524,6 @@ $follow_ups_block
     }
   }
 
-  if ($form->{menubar}) {
-    require "bin/mozilla/menu.pl";
-    &menubar;
-  }
   # button for saving history
   if($form->{id} ne "") {
     print qq| <input type=button class=submit onclick=set_history_window($form->{id}); name=history id=history value=| . $locale->text('history') . qq|> |;
@@ -547,9 +538,6 @@ $follow_ups_block
 
   print "
 </form>
-
-</body>
-</html>
 ";
 
   $main::lxdebug->leave_sub();
@@ -850,8 +838,6 @@ sub delete {
   delete $form->{header};
 
   print qq|
-<body>
-
 <form method=post action=$form->{script}>
 |;
 
@@ -871,9 +857,6 @@ sub delete {
 <input name=action class=submit type=submit value="|
     . $locale->text('Yes') . qq|">
 </form>
-
-</body>
-</html>
 |;
 
   $main::lxdebug->leave_sub();
@@ -914,7 +897,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");
index 3b1a443..27b0e3b 100644 (file)
@@ -169,8 +169,6 @@ sub select_name {
   my $title = $locale->text('Select from one of the names below');
 
   print qq|
-<body>
-
 <form method=post action=$form->{script}>
 
 <table width=100%>
@@ -249,9 +247,6 @@ sub select_name {
 <input class=submit type=submit name=action value="|
     . $locale->text('Continue') . qq|">
 </form>
-
-</body>
-</html>
 |;
 
   $main::lxdebug->leave_sub();
index af6c6c8..4cababb 100644 (file)
@@ -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',
   });
index 1b054cf..59c2f94 100644 (file)
@@ -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|<body>|;
     print qq|<p><b>|.$locale->text('Mark as paid?').qq|</b></p>|;
     print qq|<input type="button" value="|.$locale->text('yes').qq|" onclick="document.location.href='|.$referer.qq|'">&nbsp;|;
     print qq|<input type="button" value="|.$locale->text('no').qq|" onclick="javascript:history.back();">|;
-    print qq|</body></html>|;
   }
 
   $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();
 }
index a8caa52..5fbf7c0 100644 (file)
@@ -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} .= "<option value=\"$_\">$_</option>\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
index b1634cb..a81f451 100644 (file)
@@ -103,7 +103,7 @@ sub search {
 
   $form->{jsscript} = 1;
   $form->{title}    = $form->{IS_CUSTOMER} ? $locale->text('Customers') : $locale->text('Vendors');
-  $form->{fokus}    = 'Form.name';
+  $::request->{layout}->focus('#name');
 
   $form->header();
   print $form->parse_html_template('ct/search');
@@ -465,8 +465,8 @@ sub form_header {
   $form->{contacts_label} = \&_contacts_label;
   $form->{taxzone_id}     = 0                                                               if !$form->{id};
   $form->{jsscript}       = 1;
-  $form->{fokus}          = "ct.greeting";
   $form->{SHIPTO_ALL}     = [ +{ shipto_id => '0', shiptoname => $::locale->text('All') }, @{ $form->{SHIPTO} } ];
+  $::request->{layout}->focus("#greeting");
 
   $form->{title} = $form->{title_save}
                 || $locale->text("$form->{title} " . ucfirst $form->{db}) . ($form->{title} eq "Edit" ? " $form->{name}" : '');
index 627f696..e9df309 100644 (file)
@@ -106,7 +106,7 @@ sub add {
 
   $form->{title}    = $locale->text('Start Dunning Process');
   $form->{jsscript} = 1;
-  $form->{fokus}    = "search.customer";
+  $::request->{layout}->focus('#customer');
   $form->header();
 
   print $form->parse_html_template("dunning/add");
@@ -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();
index 1dc880e..b58cd71 100644 (file)
@@ -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, });
index c471d00..cac7bea 100644 (file)
@@ -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  ...
index b2e6037..3b5adb2 100644 (file)
@@ -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();
index fb6166f..a46cad0 100644 (file)
@@ -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);
@@ -879,10 +874,10 @@ sub form_header {
     s/option>\Q$::form->{department}\E/option selected>$::form->{department}/;
 
   if ($init) {
-    $::form->{fokus} = "gl.reference";
+    $::request->{layout}->focus("#reference");
     $::form->{taxincluded} = "1";
   } else {
-    $::form->{fokus} = qq|gl.accno_$::form->{rowcount}|;
+    $::request->{layout}->focus("#accno_$::form->{rowcount}");
   }
 
   $::form->{previous_id}     ||= "--";
@@ -928,8 +923,6 @@ sub delete {
   $form->header;
 
   print qq|
-<body>
-
 <form method=post action=gl.pl>
 |;
 
index 5edc385..20c670c 100644 (file)
@@ -288,7 +288,6 @@ sub update_prices {
 #  $form->header;
 #
 #  print qq|
-#<body>
 #  <form method=post action=ic.pl>
 #    <table width=100%>
 #     <tr>
@@ -388,8 +387,6 @@ sub update_prices {
 #    . $locale->text('TOP100') . qq|">
 #
 #</form>
-#</body>
-#</html>
 #|;
 #  $lxdebug->leave_sub();
 #}    #end list()
@@ -725,8 +722,6 @@ sub addtop100 {
   my $colspan = $#column_index + 1;
 
   print qq|
-<body>
-
 <table width=100%>
   <tr>
     <th class=listtop colspan=$colspan>$form->{title}</th>
@@ -981,9 +976,6 @@ sub addtop100 {
     . $locale->text('choice') . qq|">
 
   </form>
-
-</body>
-</html>
 |;
 
   $lxdebug->leave_sub();
@@ -1032,6 +1024,7 @@ sub generate_report {
     'bin'                => { 'text' => $locale->text('Bin'), },
     'deliverydate'       => { 'text' => $locale->text('deliverydate'), },
     'description'        => { 'text' => $locale->text('Part Description'), },
+    'notes'              => { 'text' => $locale->text('Notes'), },
     'drawing'            => { 'text' => $locale->text('Drawing'), },
     'ean'                => { 'text' => $locale->text('EAN'), },
     'image'              => { 'text' => $locale->text('Image'), },
@@ -1214,7 +1207,7 @@ sub generate_report {
   IC->all_parts(\%myconfig, \%$form);
 
   my @columns = qw(
-    partnumber description partsgroup bin onhand rop soldtotal unit listprice
+    partnumber description notes partsgroup bin onhand rop soldtotal unit listprice
     linetotallistprice sellprice linetotalsellprice lastcost linetotallastcost
     priceupdate weight image drawing microfiche invnumber ordnumber quonumber
     transdate name serialnumber deliverydate ean projectnumber projectdescription
@@ -1600,7 +1593,7 @@ sub form_header {
 
   $form->{defaults} = AM->get_defaults();
 
-  $form->{fokus} = "ic.partnumber";
+  $::request->{layout}->focus("#partnumber");
 
   $form->{CUSTOM_VARIABLES} = CVar->get_custom_variables('module' => 'IC', 'trans_id' => $form->{id});
 
index 1aa0248..b518db0 100644 (file)
@@ -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,
@@ -978,7 +978,7 @@ sub edit_e_mail {
   my $attachment_filename = $form->generate_attachment_filename();
   my $subject             = $form->{subject} || $form->generate_email_subject();
 
-  $form->{"fokus"} = $form->{"email"} ? "Form.subject" : "Form.email";
+  $::request->{layout}->focus($form->{"email"} ? "#subject" : "#email");
   $form->header;
 
   my (@dont_hide_key_list, %dont_hide_key, @hidden_keys);
index f909d86..0a46861 100644 (file)
@@ -328,7 +328,7 @@ sub form_header {
   $TMPL_VAR{creditwarning} = ($form->{creditlimit} != 0) && ($form->{creditremaining} < 0) && !$form->{update};
   $TMPL_VAR{is_credit_remaining_negativ} = $form->{creditremaining} =~ /-/;
 
-  $form->{fokus} = "invoice.vendor";
+  $::request->{layout}->focus('#vendor');
 
   my $follow_up_vc         =  $form->{vendor};
   $follow_up_vc            =~ s/--\d*\s*$//;
@@ -575,6 +575,9 @@ sub storno {
     $form->error($locale->text("Invoice has already been storno'd!"));
   }
 
+  $form->error($locale->text('Cannot post storno for a closed period!'))
+    if ( $form->date_closed($form->{invdate}, \%myconfig));
+
   my $employee_id = $form->{employee_id};
   invoice_links();
   prepare_invoice();
@@ -777,8 +780,6 @@ sub delete {
 
   $form->header;
   print qq|
-<body>
-
 <form method=post action=$form->{script}>
 |;
 
index b08e5db..d5bd229 100644 (file)
@@ -350,7 +350,7 @@ sub form_header {
   $TMPL_VAR{creditwarning} = ($form->{creditlimit} != 0) && ($form->{creditremaining} < 0) && !$form->{update};
   $TMPL_VAR{is_credit_remaining_negativ} = $form->{creditremaining} =~ /-/;
 
-  $form->{fokus} = "invoice.customer";
+  $::request->{layout}->focus('#customer');
 
   my $follow_up_vc         =  $form->{customer};
   $follow_up_vc            =~ s/--\d*\s*$//;
@@ -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|
-<body>
-
 <form method="post" action="$form->{script}">
 |;
 
diff --git a/bin/mozilla/menu.pl b/bin/mozilla/menu.pl
deleted file mode 100644 (file)
index d464c85..0000000
+++ /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 <mawe@linux-studio.de>
-#  2010-08-19 - Icons for sub entries and single click behavior, unlike XUL-Menu
-#               JS switchable HTML-menu - Sven Donath <lxo@dexo.de>
-#######################################################################
-
-use strict;
-
-use SL::Menu;
-use Data::Dumper;
-use URI;
-
-use List::MoreUtils qw(apply);
-
-my $menufile = "menu.ini";
-my $nbsp     = '&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|
-<frameset rows="28px,*" cols="*" framespacing="0" frameborder="0">
-  <frame  src="controller.pl?action=FrameHeader/header" scrolling="NO">
-  <frameset cols="$framesize,*" framespacing="0" frameborder="0" border="0" id="menuframe" name="menuframe">
-    <frame src="$::form->{script}?action=acc_menu" name="acc_menu"  scrolling="auto" noresize marginwidth="0">
-    <frame src="$callback" name="main_window" scrolling="auto">
-  </frameset>
-  <noframes>
-  You need a browser that can read frames to see this page.
-  </noframes>
-</frameset>
-</HTML>
-|;
-
-  $::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|
-<body class="menu">
-
-<div align="left">\n<table width="$framesize" border="0">\n|;
-
-  section_menu($menu);
-
-  print qq|</table></div>
-</body>
-</html>
-|;
-
-  $::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 = "<a href='menu.pl?action=acc_menu&level=$ml_' class='nohover' title='$label'>";
-
-      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 . '&nbsp;...') 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       ? '</a>' : '';
-  my $bold   = $params{bold} ?  '<b>' : '';
-  my $b_end  = $bold         ? '</b>' : '';
-  my $hidden_image = make_image(hidden => 1);
-  return join "\n",
-        "<tr><td class='hover' height='$height'>$bold$spacer$anchor$image$chunks[0]$a_end$b_end</td></tr>\n",
-    map "<tr style='vertical-align:top'><td class='hover'>$bold$spacer$hidden_image$anchor$chunks[$_]$a_end$b_end</td></tr>\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 &nbsp;-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 "<img src='$image_url' border='0' style='$style' title='$label' $width>$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 (file)
index 202f75c..0000000
+++ /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|
-<iframe id="win1" src="$form->{callback}" width="100%" height="93%" name="main_window" style="position: absolute; border:0px;">
-<p>Ihr Browser kann leider keine eingebetteten Frames anzeigen.
-</p>
-</iframe>
-</body>
-</html>
-
-|;
-
-}
-
-sub clock_line {
-
-  my $form     = $main::form;
-
-  my $fensterlink="menujs.pl?action=display";
-  my $fenster = "["."<a href=\"$fensterlink\" target=\"_blank\">neues Fenster</a>]";
-
-  my $login = "[Nutzer "
-    . $form->{login}
-    . " - <a href=\"controller.pl?action=LoginScreen/logout\" target=\"_top\">"
-    . $::locale->text('Logout')
-    . "</a>] ";
-  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&auml;rz",
-                     "April",  "Mai",       "Juni",    "Juli",
-                     "August", "September", "Oktober", "November",
-                     "Dezember");
-  my $datum =
-      $Wochentage[$Wochentag] . ", der "
-    . $Monatstag . "."
-    . $Monat . "."
-    . $Jahr . " - ";
-
-  #$zeit="<div id='Uhr'>".$Stunden.":".$Minuten.":".$Sekunden."</div>";
-  my $zeit = "<div id='Uhr'>" . $Stunden . ":" . $Minuten . "</div>";
-  print qq|
-<script type="text/javascript">
-<!--
-function clockon() {
-  var now = new Date();
-  var h = now.getHours();
-  var m = now.getMinutes();
-  document.getElementById('clock_id').innerHTML = (h<10?'0'+h:h)+":"+(m<10?'0'+m:m);
-  var timer=setTimeout("clockon()", 10000);
-}
-window.onload=clockon
-//-->
-</script>
-<table border="0" width="100%" background="image/bg_titel.gif" cellpadding="0" cellspacing="0">
-  <tr>
-    <td style="color:white; font-family:verdana,arial,sans-serif; font-size: 12px;"> &nbsp; $fenster &nbsp; [<a href="JavaScript:top.main_window.print()">drucken</a>]</td>
-    <td align="right" style="vertical-align:middle; color:white; font-family:verdana,arial,sans-serif; font-size: 12px;" nowrap>
-      $login $datum <span id='clock_id' style='position:relative'></span>&nbsp;
-    </td>
-  </tr>
-</table>
-|;
-}
-
-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|
-<style>
-<!--
-
-.itemBorder {
-  border: 1px solid black
-}
-
-.itemText {
-  text-decoration: none;
-  color: #000000;
-  font: 12px Arial, Helvetica
-}
-
-.rootItemText {
-  text-decoration: none;
-  color: #ffffff;
-  font: 12px Arial, Helvetica
-}
-
-.menu {
-  color:#ffffff;
-  background:url(image/bg_css_menu.png) repeat bottom;
-  border:1px solid;
-  border-color:#ccc #888 #555 #bbb;
-}
-
--->
-</style>
-
-<script type="text/javascript">
-<!--
-var isDOM = (document.getElementById ? true : false);
-var isIE4 = ((document.all && !isDOM) ? true : false);
-var isNS4 = (document.layers ? true : false);
-//var KO = (navigator.appName=="Konqueror" \|\| navigator.appName=="Opera") ;
-var KO = ((navigator.userAgent.indexOf('Opera',0) != -1) \|\| (navigator.userAgent.indexOf('Konqueror',0) != -1));
-function getRef(id) {
-  if (isDOM) return document.getElementById(id);
-  if (isIE4) return document.all[id];
-  if (isNS4) return document.layers[id];
-}
-function getSty(id) {
-  return (isNS4 ? getRef(id) : getRef(id).style);
-}
-var popTimer = 0;
-var litNow = new Array();
-function popOver(menuNum, itemNum) {
-  if (KO) document.getElementById("win1").style.visibility = "hidden";
-  clearTimeout(popTimer);
-  hideAllBut(menuNum);
-  litNow = getTree(menuNum, itemNum);
-  changeCol(litNow, true);
-  targetNum = menu[menuNum][itemNum].target;
-  if (targetNum > 0) {
-    thisX = parseInt(menu[menuNum][0].ref.left) + parseInt(menu[menuNum][itemNum].ref.left);
-    thisY = parseInt(menu[menuNum][0].ref.top) + parseInt(menu[menuNum][itemNum].ref.top);
-    with (menu[targetNum][0].ref) {
-      left = parseInt(thisX + menu[targetNum][0].x);
-      top = parseInt(thisY + menu[targetNum][0].y);
-      visibility = 'visible';
-    }
-  }
-}
-function popOut(menuNum, itemNum) {
-  if ((menuNum == 0) && !menu[menuNum][itemNum].target)
-    hideAllBut(0)
-    if (KO) document.getElementById("win1").style.visibility = "visible";
-  else
-    popTimer = setTimeout('hideAllBut(0)', 500);
-}
-function getTree(menuNum, itemNum) {
-  itemArray = new Array(menu.length);
-  while(1) {
-    itemArray[menuNum] = itemNum;
-    if (menuNum == 0) return itemArray;
-    itemNum = menu[menuNum][0].parentItem;
-    menuNum = menu[menuNum][0].parentMenu;
-  }
-}
-function changeCol(changeArray, isOver) {
-  for (menuCount = 0; menuCount < changeArray.length; menuCount++) {
-    if (changeArray[menuCount]) {
-      newCol = isOver ? menu[menuCount][0].overCol : menu[menuCount][0].backCol;
-      with (menu[menuCount][changeArray[menuCount]].ref) {
-        if (isNS4) bgColor = newCol;
-        else backgroundColor = newCol;
-      }
-    }
-  }
-}
-function hideAllBut(menuNum) {
-  var keepMenus = getTree(menuNum, 1);
-  for (count = 0; count < menu.length; count++)
-    if (!keepMenus[count])
-      menu[count][0].ref.visibility = 'hidden';
-  changeCol(litNow, false);
-}
-
-function Menu(isVert, popInd, x, y, width, overCol, backCol, borderClass, textClass) {
-  this.isVert = isVert;
-  this.popInd = popInd
-  this.x = x;
-  this.y = y;
-  this.width = width;
-  this.overCol = overCol;
-  this.backCol = backCol;
-  this.borderClass = borderClass;
-  this.textClass = textClass;
-  this.parentMenu = null;
-  this.parentItem = null;
-  this.ref = null;
-}
-function Item(text, href, frame, length, spacing, target) {
-  this.text = text;
-  this.href = href;
-  this.frame = frame;
-  this.length = length;
-  this.spacing = spacing;
-  this.target = target;
-  this.ref = null;
-}
-function go(link,frame) {
-  tmp=eval("top."+frame);
-  tmp.location=link;
-        //top.main_window.location=link;
-}
-function writeMenus() {
-  if (!isDOM && !isIE4 && !isNS4) return;
-  for (currMenu = 0; currMenu < menu.length; currMenu++) with (menu[currMenu][0]) {
-    var str = '', itemX = 0, itemY = 0;
-    for (currItem = 1; currItem < menu[currMenu].length; currItem++) with (menu[currMenu][currItem]) {
-      var itemID = 'menu' + currMenu + 'item' + currItem;
-      var w = (isVert ? width : length);
-      var h = (isVert ? length : width);
-      if (isDOM \|\| isIE4) {
-        str += '<div id="' + itemID + '" style="position: absolute; left: ' + itemX + '; top: ' + itemY + '; width: ' + w + '; height: ' + h + '; visibility: inherit; ';
-        if (backCol) str += 'background: ' + backCol + '; ';
-        str += '" ';
-      }
-      if (isNS4) {
-        str += '<layer id="' + itemID + '" left="' + itemX + '" top="' + itemY + '" width="' +  w + '" height="' + h + '" visibility="inherit" ';
-        if (backCol) str += 'bgcolor="' + backCol + '" ';
-      }
-      if (borderClass) str += 'class="' + borderClass + '" "';
-      str += 'onMouseOver="popOver(' + currMenu + ',' + currItem + ')" onMouseOut="popOut(' + currMenu + ',' + currItem + ')">';
-      str += '<table width="' + (w - 8) + '" border="0" cellspacing="0" cellpadding="' + (!isNS4 && borderClass ? 3 : 0) + '">';
-      str +='<tr><td class="' + textClass + '" style="cursor:pointer;" align="left" height="' + (h - 7) + '" onClick=\\'go("' + href + '","' + frame + '")\\'>' + text + '</a></td>';
-      if (target > 0) {
-        menu[target][0].parentMenu = currMenu;
-        menu[target][0].parentItem = currItem;
-        if (popInd) str += '<td class="' + textClass + '" align="right">' + popInd + '</td>';
-      }
-      str += '</tr></table>' + (isNS4 ? '</layer>' : '</div>');
-      if (isVert) itemY += length + spacing;
-      else itemX += length + spacing;
-    }
-    if (isDOM) {
-      var newDiv = document.createElement('div');
-      document.getElementsByTagName('body').item(0).appendChild(newDiv);
-      newDiv.innerHTML = str;
-      ref = newDiv.style;
-      ref.position = 'absolute';
-      ref.visibility = 'hidden';
-    }
-    if (isIE4) {
-      document.body.insertAdjacentHTML('beforeEnd', '<div id="menu' + currMenu + 'div" ' + 'style="position: absolute; visibility: hidden">' + str + '</div>');
-      ref = getSty('menu' + currMenu + 'div');
-    }
-    if (isNS4) {
-      ref = new Layer(0);
-      ref.document.write(str);
-      ref.document.close();
-    }
-    for (currItem = 1; currItem < menu[currMenu].length; currItem++) {
-      itemName = 'menu' + currMenu + 'item' + currItem;
-      if (isDOM \|\| isIE4) menu[currMenu][currItem].ref = getSty(itemName);
-      if (isNS4) menu[currMenu][currItem].ref = ref.document[itemName];
-    }
-  }
-  with(menu[0][0]) {
-    ref.left = x;
-    ref.top = y;
-    ref.visibility = 'visible';
-   }
-}
-var menu = new Array();
-var defOver = '#cccccc';
-var defBack = '#dddddd';
-var defLength = 22;
-menu[0] = new Array();
-menu[0][0] = new Menu(false, '', 5, 18, 19, '#cccccc', '', '', 'rootItemText');
-
-|;
-
-  &section_menu($menu);
-
-  print qq|
-var popOldWidth = window.innerWidth;
-nsResizeHandler = new Function('if (popOldWidth != window.innerWidth) location.reload()');
-if (isNS4) document.captureEvents(Event.CLICK);
-document.onclick = clickHandle;
-function clickHandle(evt) {
-  if (isNS4) document.routeEvent(evt);
-  hideAllBut(0);
-  if (KO) document.getElementById("win1").style.visibility = "visible";
-}
-function moveRoot() {
-  with(menu[0][0].ref) left = ((parseInt(left) < 100) ? 100 : 5);
-}
-//  End -->
-</script>
-
-<BODY scrolling="no" topmargin="0" leftmargin="0"  marginwidth="0" marginheight="0" style="margin: 0" onLoad="writeMenus(); clockon();" onResize="if (isNS4) nsResizeHandler()">
-
-
-<table class="menu" width="100%" border="0" cellpadding="0" cellspacing="0">
-<tr><td height="21"><font size="1"> </font></td></tr></table>
-
-
-|;
-
-  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/ /&nbsp;/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;
-      &section_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|;
-
-        &section_menu($menu, $item);
-
-        #print qq|<br>\n|;
-      }
-    }
-  }
-}
diff --git a/bin/mozilla/menunew.pl b/bin/mozilla/menunew.pl
deleted file mode 100644 (file)
index a1f9a8f..0000000
+++ /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&auml;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 (file)
index 121d76d..0000000
+++ /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|<link rel="stylesheet" href="css/menuv3.css?id=" type="text/css">|);
-
-  $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&auml;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|<ul><li><h2>${menu_text}</h2><ul>${h}</ul></li></ul>\n|;
-      } else {
-        $html .= qq|<li><div class="x">${menu_text}</div><ul>${h}</ul></li>\n|;
-      }
-    } else {
-      $html .= qq|<li>|;
-      $html .= $menu->menuitem_v3(\%myconfig, $form, "${parent}$item",
-                                  { "title" => $menu_title,
-                                    "target" => $target });
-      $html .= qq|${menu_text}</a></li>\n|;
-    }
-  }
-
-  return $html;
-}
diff --git a/bin/mozilla/menuv4.pl b/bin/mozilla/menuv4.pl
deleted file mode 100644 (file)
index 25d7d79..0000000
+++ /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|<link rel="stylesheet" href="css/menuv4.css?id=" type="text/css">|);
-
-  $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&auml;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|<ul><li><h2> ${menu_text} </h2><ul>${h}</ul></li></ul>\n|;
-      } else {
-        $html .= qq|<li><div class="x">${menu_text}</div><ul>${h}</ul></li>\n|;
-      }
-    } else {
-      if ($depth>1) {
-      $html .= qq|<li class='sub'>|;
-      } else {
-      $html .= qq|<li>|;
-      }
-      $html .= $menu->menuitem_v3(\%myconfig, $form, "${parent}$item",
-                                  { "title" => $menu_title,
-                                    "target" => $target });
-      $html .= qq|${menu_text}</a></li>\n|;
-    }
-  }
-
-  return $html;
-}
index 9508f73..0bcb897 100644 (file)
@@ -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|
-<body>
-
 <form method=post action=$form->{script}>
 |;
 
@@ -1512,9 +1510,6 @@ sub backorder_exchangerate {
     . $locale->text('Continue') . qq|">
 
 </form>
-
-</body>
-</html>
 |;
 
   $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();
index 46ce822..b7614ff 100644 (file)
@@ -92,7 +92,7 @@ sub search {
    $form->{CUSTOM_VARIABLES_INCLUSION_CODE}) = CVar->render_search_options('variables'      => $form->{CUSTOM_VARIABLES},
                                                                            'include_prefix' => 'l_',
                                                                            'include_value'  => 'Y');
-  $form->{fokus}    = 'getElementById("projectnumber")';
+  $::request->{layout}->focus('#projectnumber');
 
   $form->header();
   print $form->parse_html_template('projects/search');
index a339cd4..1068da7 100644 (file)
@@ -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',
index e81ecb2..d5c42a0 100644 (file)
@@ -1177,10 +1177,6 @@ sub config_step2 {
 
   $form->header();
 
-#  print qq|
-#    <body>
-#  |;
-
   my $elsterland         = '';
   my $elster_amt         = '';
   my $elsterFFFF         = '';
index c77d74d..9d387f0 100644 (file)
@@ -794,8 +794,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 (file)
index 0000000..f847711
--- /dev/null
@@ -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 (file)
index 0000000..fe6ba0a
--- /dev/null
@@ -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 (file)
index 0000000..a8d9d0d
--- /dev/null
@@ -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; }
index 9714d4a..77fe097 100644 (file)
@@ -115,8 +115,9 @@ td.login {
 th.login {
        text-align: right;
 }
-body.admin {
+div.admin {
        background-color: #FFFFE0;
+    padding: 8px;
        color: #000000;
 }
 body.menu {
index 38b2669..3523c74 100644 (file)
@@ -19,7 +19,6 @@ body.menuv4 {
        /*border: 3px solid;*/
        background-color: #FFFFFF;
        color: #000000;
-       margin-top: 0.2em;
 }
 #menuv4 a, #menuv4 h2, #menuv4 div.x {
        font-size: 80%;
@@ -283,3 +282,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 }
index 2713bb4..852a76c 100644 (file)
@@ -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;
index 87f17b8..c190cb7 100644 (file)
@@ -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;
 }
+
+
index be94243..19f98b2 100644 (file)
@@ -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 }
index a235987..7870074 100644 (file)
@@ -415,14 +415,17 @@ dbcharset = UTF-8</programlisting>
       <sect2 id="Zeichensätze-die-Verwendung-von-UTF-8">
         <title>Zeichensätze/die Verwendung von UTF-8</title>
 
-        <para>kivitendo kann komplett mit UTF-8 als Zeichensatz verwendet
-        werden. Dabei gibt es zwei Punkte zu beachten: PostgreSQL muss in
-        Version 8.2 oder neuer benutzt werden, und der
-        PostgreSQL-Datenbankcluster muss ebenfalls mit UTF-8 als Locale
-        angelegt worden sein.</para>
+       <para>Bei aktuellen Serverinstallationen braucht man hier meist nicht
+       eingreifen</para>
+
+        <para>Dieses kann überprüft werden: ist das Encoding der Datenbank
+       “template1” “UTF8”, so braucht man nichts weiteres diesbezueglich
+       unternehmen. Zum Testen:
+
+        <programlisting>su postgres
+echo '\l' | psql
+exit </programlisting>
 
-        <para>Dieses ist kann überprüft werden: ist das Encoding der Datenbank
-        “template1” “UTF8”, so kann auch kivitendo mit UTF-8 betrieben werden.
         Andernfalls ist es notwendig, einen neuen Datenbankcluster mit
         UTF-8-Encoding anzulegen und diesen zu verwenden. Unter Debian und
         Ubuntu kann dies z.B. für PostgreSQL 8.2 mit dem folgenden Befehl
@@ -460,14 +463,9 @@ dbcharset = UTF-8</programlisting>
         <para>In der Datei <filename>pg_hba.conf</filename>, die im gleichen
         Verzeichnis wie die <filename>postgresql.conf</filename> zu finden
         sein sollte, müssen die Berichtigungen für den Zugriff geändert
-        werden. Hier gibt es mehrere Möglichkeiten. Eine besteht darin, lokale
-        Verbindungen immer zuzulassen:</para>
-
-        <programlisting>local all all trust
-host all all 127.0.0.1 255.0.0.0 trust</programlisting>
-
-        <para>Besser ist es, für eine bestimmte Datenbank Zugriff nur per
-        Passwort zuzulassen. Beispielsweise:</para>
+       werden. Hier gibt es mehrere Möglichkeiten. sinnvoll ist es nur die
+       nögiten Verbindungen immer zuzulassen, für eine lokal laufenden
+       Datenbank zum Beispiel:</para>
 
         <programlisting>local all kivitendo password
 host all kivitendo 127.0.0.1 255.255.255.255 password</programlisting>
@@ -478,10 +476,14 @@ host all kivitendo 127.0.0.1 255.255.255.255 password</programlisting>
 
         <para>In der Datenbank <literal>template1</literal> muss die
         Unterstützung für servergespeicherte Prozeduren eingerichet werden.
-        Melden Sie sich dafür als Benutzer “postgres” an der Datenbank an, und
+        Melden Sie sich dafür als Benutzer “postgres” an der Datenbank an:
+        <programlisting>su - postgres
+psql template1</programlisting>
+
         führen Sie die folgenden Kommandos aus:</para>
 
-        <programlisting>create language 'plpgsql';</programlisting>
+        <programlisting>create language 'plpgsql';
+\q</programlisting>
       </sect2>
 
       <sect2 id="Datenbankbenutzer-anlegen">
@@ -492,7 +494,12 @@ host all kivitendo 127.0.0.1 255.255.255.255 password</programlisting>
         anlegen. Ein Beispiel, wie Sie einen neuen Benutzer anlegen
         können:</para>
 
-        <programlisting>su - postgres createuser -d -P kivitendo</programlisting>
+       Die Frage, ob der neue User Superuser sein soll, können Sie mit nein
+       beantworten, genauso ist die Berechtigung neue User (Roles) zu
+       generieren nicht nötig.
+       <programlisting>su - postgres
+createuser -d -P kivitendo
+exit</programlisting>
 
         <para>Wenn Sie später einen Datenbankzugriff konfigurieren, verändern
         Sie den evtl. voreingestellten Benutzer “postgres” auf “kivitendo” bzw.
@@ -2209,6 +2216,14 @@ insserv kivitendo-task-server</programlisting>
                 dem Kürzel das im Dateinamen verwendetet wird.</para>
               </listitem>
             </varlistentry>
+
+            <varlistentry>
+              <term><varname>template_meta.tmpfile</varname></term>
+
+              <listitem>
+                <para>Datei-Prefix für temporäre Dateien.</para>
+              </listitem>
+            </varlistentry>
           </variablelist>
         </sect3>
 
index 9451db2..04fd432 100644 (file)
@@ -1,11 +1,14 @@
 <html><head>
       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-   <title>2.4. Anpassung der PostgreSQL-Konfiguration</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1-RC2"><link rel="home" href="index.html" title="kivitendo: Installation, Konfiguration, Entwicklung"><link rel="up" href="ch02.html" title="Kapitel 2. Installation und Grundkonfiguration"><link rel="prev" href="ch02s03.html" title="2.3. kivitendo-Konfigurationsdatei"><link rel="next" href="ch02s05.html" title="2.5. Webserver-Konfiguration"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">2.4. Anpassung der PostgreSQL-Konfiguration</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02s03.html">Zurück</a>&nbsp;</td><th width="60%" align="center">Kapitel 2. Installation und Grundkonfiguration</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch02s05.html">Weiter</a></td></tr></table><hr></div><div class="sect1" title="2.4. Anpassung der PostgreSQL-Konfiguration"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="Anpassung-der-PostgreSQL-Konfiguration"></a>2.4. Anpassung der PostgreSQL-Konfiguration</h2></div></div></div><p>PostgreSQL muss auf verschiedene Weisen angepasst werden.</p><div class="sect2" title="2.4.1. Zeichensätze/die Verwendung von UTF-8"><div class="titlepage"><div><div><h3 class="title"><a name="Zeichens%C3%A4tze-die-Verwendung-von-UTF-8"></a>2.4.1. Zeichensätze/die Verwendung von UTF-8</h3></div></div></div><p>kivitendo kann komplett mit UTF-8 als Zeichensatz verwendet
-        werden. Dabei gibt es zwei Punkte zu beachten: PostgreSQL muss in
-        Version 8.2 oder neuer benutzt werden, und der
-        PostgreSQL-Datenbankcluster muss ebenfalls mit UTF-8 als Locale
-        angelegt worden sein.</p><p>Dieses ist kann überprüft werden: ist das Encoding der Datenbank
-        “template1” “UTF8”, so kann auch kivitendo mit UTF-8 betrieben werden.
+   <title>2.4. Anpassung der PostgreSQL-Konfiguration</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1-RC2"><link rel="home" href="index.html" title="kivitendo: Installation, Konfiguration, Entwicklung"><link rel="up" href="ch02.html" title="Kapitel 2. Installation und Grundkonfiguration"><link rel="prev" href="ch02s03.html" title="2.3. kivitendo-Konfigurationsdatei"><link rel="next" href="ch02s05.html" title="2.5. Webserver-Konfiguration"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">2.4. Anpassung der PostgreSQL-Konfiguration</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02s03.html">Zurück</a>&nbsp;</td><th width="60%" align="center">Kapitel 2. Installation und Grundkonfiguration</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch02s05.html">Weiter</a></td></tr></table><hr></div><div class="sect1" title="2.4. Anpassung der PostgreSQL-Konfiguration"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="Anpassung-der-PostgreSQL-Konfiguration"></a>2.4. Anpassung der PostgreSQL-Konfiguration</h2></div></div></div><p>PostgreSQL muss auf verschiedene Weisen angepasst werden.</p><div class="sect2" title="2.4.1. Zeichensätze/die Verwendung von UTF-8"><div class="titlepage"><div><div><h3 class="title"><a name="Zeichens%C3%A4tze-die-Verwendung-von-UTF-8"></a>2.4.1. Zeichensätze/die Verwendung von UTF-8</h3></div></div></div><p>Bei aktuellen Serverinstallationen braucht man hier meist nicht
+       eingreifen</p><p>Dieses kann überprüft werden: ist das Encoding der Datenbank
+       “template1” “UTF8”, so braucht man nichts weiteres diesbezueglich
+       unternehmen. Zum Testen:
+
+        </p><pre class="programlisting">su postgres
+echo '\l' | psql
+exit </pre><p>
+
         Andernfalls ist es notwendig, einen neuen Datenbankcluster mit
         UTF-8-Encoding anzulegen und diesen zu verwenden. Unter Debian und
         Ubuntu kann dies z.B. für PostgreSQL 8.2 mit dem folgenden Befehl
         was mit dem Wert <code class="literal">*</code> geschieht.</p><p>In der Datei <code class="filename">pg_hba.conf</code>, die im gleichen
         Verzeichnis wie die <code class="filename">postgresql.conf</code> zu finden
         sein sollte, müssen die Berichtigungen für den Zugriff geändert
-        werden. Hier gibt es mehrere Möglichkeiten. Eine besteht darin, lokale
-        Verbindungen immer zuzulassen:</p><pre class="programlisting">local all all trust
-host all all 127.0.0.1 255.0.0.0 trust</pre><p>Besser ist es, für eine bestimmte Datenbank Zugriff nur per
-        Passwort zuzulassen. Beispielsweise:</p><pre class="programlisting">local all kivitendo password
+       werden. Hier gibt es mehrere Möglichkeiten. sinnvoll ist es nur die
+       nögiten Verbindungen immer zuzulassen, für eine lokal laufenden
+       Datenbank zum Beispiel:</p><pre class="programlisting">local all kivitendo password
 host all kivitendo 127.0.0.1 255.255.255.255 password</pre></div><div class="sect2" title="2.4.3. Erweiterung für servergespeicherte Prozeduren"><div class="titlepage"><div><div><h3 class="title"><a name="Erweiterung-f%C3%BCr-servergespeicherte-Prozeduren"></a>2.4.3. Erweiterung für servergespeicherte Prozeduren</h3></div></div></div><p>In der Datenbank <code class="literal">template1</code> muss die
         Unterstützung für servergespeicherte Prozeduren eingerichet werden.
-        Melden Sie sich dafür als Benutzer “postgres” an der Datenbank an, und
-        führen Sie die folgenden Kommandos aus:</p><pre class="programlisting">create language 'plpgsql';</pre></div><div class="sect2" title="2.4.4. Datenbankbenutzer anlegen"><div class="titlepage"><div><div><h3 class="title"><a name="Datenbankbenutzer-anlegen"></a>2.4.4. Datenbankbenutzer anlegen</h3></div></div></div><p>Wenn Sie nicht den Datenbanksuperuser “postgres” zum Zugriff
+        Melden Sie sich dafür als Benutzer “postgres” an der Datenbank an:
+        </p><pre class="programlisting">su - postgres
+psql template1</pre><p>
+
+        führen Sie die folgenden Kommandos aus:</p><pre class="programlisting">create language 'plpgsql';
+\q</pre></div><div class="sect2" title="2.4.4. Datenbankbenutzer anlegen"><div class="titlepage"><div><div><h3 class="title"><a name="Datenbankbenutzer-anlegen"></a>2.4.4. Datenbankbenutzer anlegen</h3></div></div></div><p>Wenn Sie nicht den Datenbanksuperuser “postgres” zum Zugriff
         benutzen wollen, so sollten Sie bei PostgreSQL einen neuen Benutzer
         anlegen. Ein Beispiel, wie Sie einen neuen Benutzer anlegen
-        können:</p><pre class="programlisting">su - postgres createuser -d -P kivitendo</pre><p>Wenn Sie später einen Datenbankzugriff konfigurieren, verändern
+        können:</p>
+
+       Die Frage, ob der neue User Superuser sein soll, können Sie mit nein
+       beantworten, genauso ist die Berechtigung neue User (Roles) zu
+       generieren nicht nötig.
+       <pre class="programlisting">su - postgres
+createuser -d -P kivitendo
+exit</pre><p>Wenn Sie später einen Datenbankzugriff konfigurieren, verändern
         Sie den evtl. voreingestellten Benutzer “postgres” auf “kivitendo” bzw.
         den hier gewählten Benutzernamen.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02s03.html">Zurück</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Nach oben</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch02s05.html">Weiter</a></td></tr><tr><td width="40%" align="left" valign="top">2.3. kivitendo-Konfigurationsdatei&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Zum Anfang</a></td><td width="40%" align="right" valign="top">&nbsp;2.5. Webserver-Konfiguration</td></tr></table></div></body></html>
\ No newline at end of file
index 3a13d57..5fcbf83 100644 (file)
@@ -1,6 +1,6 @@
 <html><head>
       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-   <title>2.5. Webserver-Konfiguration</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1-RC2"><link rel="home" href="index.html" title="kivitendo: Installation, Konfiguration, Entwicklung"><link rel="up" href="ch02.html" title="Kapitel 2. Installation und Grundkonfiguration"><link rel="prev" href="ch02s04.html" title="2.4. Anpassung der PostgreSQL-Konfiguration"><link rel="next" href="ch02s06.html" title="2.6. Der Task-Server"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">2.5. Webserver-Konfiguration</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02s04.html">Zurück</a>&nbsp;</td><th width="60%" align="center">Kapitel 2. Installation und Grundkonfiguration</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch02s06.html">Weiter</a></td></tr></table><hr></div><div class="sect1" title="2.5. Webserver-Konfiguration"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="Apache-Konfiguration"></a>2.5. Webserver-Konfiguration</h2></div></div></div><div class="sect2" title="2.5.1. Grundkonfiguration mittels CGI"><div class="titlepage"><div><div><h3 class="title"><a name="d0e490"></a>2.5.1. Grundkonfiguration mittels CGI</h3></div></div></div><div class="note" title="Anmerkung" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Anmerkung]" src="../../../../system/docbook-xsl/images/note.png"></td><th align="left">Anmerkung</th></tr><tr><td align="left" valign="top"><p>Für einen deutlichen Performanceschub sorgt die Ausführung
+   <title>2.5. Webserver-Konfiguration</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1-RC2"><link rel="home" href="index.html" title="kivitendo: Installation, Konfiguration, Entwicklung"><link rel="up" href="ch02.html" title="Kapitel 2. Installation und Grundkonfiguration"><link rel="prev" href="ch02s04.html" title="2.4. Anpassung der PostgreSQL-Konfiguration"><link rel="next" href="ch02s06.html" title="2.6. Der Task-Server"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">2.5. Webserver-Konfiguration</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02s04.html">Zurück</a>&nbsp;</td><th width="60%" align="center">Kapitel 2. Installation und Grundkonfiguration</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch02s06.html">Weiter</a></td></tr></table><hr></div><div class="sect1" title="2.5. Webserver-Konfiguration"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="Apache-Konfiguration"></a>2.5. Webserver-Konfiguration</h2></div></div></div><div class="sect2" title="2.5.1. Grundkonfiguration mittels CGI"><div class="titlepage"><div><div><h3 class="title"><a name="d0e493"></a>2.5.1. Grundkonfiguration mittels CGI</h3></div></div></div><div class="note" title="Anmerkung" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Anmerkung]" src="../../../../system/docbook-xsl/images/note.png"></td><th align="left">Anmerkung</th></tr><tr><td align="left" valign="top"><p>Für einen deutlichen Performanceschub sorgt die Ausführung
           mittels FastCGI/FCGI. Die Einrichtung wird ausführlich im Abschnitt
           <a class="xref" href="ch02s05.html#Apache-Konfiguration.FCGI" title="2.5.2. Konfiguration für FastCGI/FCGI">Konfiguration für FastCGI/FCGI</a> beschrieben.</p></td></tr></table></div><p>Der Zugriff auf das Programmverzeichnis muss in der Apache
         Webserverkonfigurationsdatei <code class="literal">httpd.conf</code> eingestellt
index 752a479..579aee5 100644 (file)
@@ -29,7 +29,7 @@
         Links aus einem der Runlevel-Verzeichnisse heraus in den Boot-Prozess
         einzubinden. Da das bei neueren Linux-Distributionen aber nicht
         zwangsläufig funktioniert, werden auch Start-Scripte mitgeliefert, die
-        anstelle eines symbolischen Links verwendet werden können.</p><div class="sect3" title="2.6.2.1. SystemV-basierende Systeme (z.B. Debian, OpenSuSE, Fedora Core)"><div class="titlepage"><div><div><h4 class="title"><a name="d0e674"></a>2.6.2.1. SystemV-basierende Systeme (z.B. Debian, OpenSuSE, Fedora
+        anstelle eines symbolischen Links verwendet werden können.</p><div class="sect3" title="2.6.2.1. SystemV-basierende Systeme (z.B. Debian, OpenSuSE, Fedora Core)"><div class="titlepage"><div><div><h4 class="title"><a name="d0e677"></a>2.6.2.1. SystemV-basierende Systeme (z.B. Debian, OpenSuSE, Fedora
           Core)</h4></div></div></div><p>Kopieren Sie die Datei
           <code class="filename">scripts/boot/system-v/kivitendo-server</code>
           nach <code class="filename">/etc/init.d/kivitendo-server</code>. Passen
@@ -40,7 +40,7 @@
 insserv kivitendo-task-server</pre></li><li class="listitem"><p>OpenSuSE und Fedora Core:</p><pre class="programlisting">chkconfig --add kivitendo-task-server</pre></li></ul></div><p>Danach kann der Task-Server mit dem folgenden Befehl gestartet
           werden: <span class="command"><strong>/etc/init.d/kivitendo-task-server
           start</strong></span>
-               </p></div><div class="sect3" title="2.6.2.2. Upstart-basierende Systeme (z.B. Ubuntu)"><div class="titlepage"><div><div><h4 class="title"><a name="d0e704"></a>2.6.2.2. Upstart-basierende Systeme (z.B. Ubuntu)</h4></div></div></div><p>Kopieren Sie die Datei
+               </p></div><div class="sect3" title="2.6.2.2. Upstart-basierende Systeme (z.B. Ubuntu)"><div class="titlepage"><div><div><h4 class="title"><a name="d0e707"></a>2.6.2.2. Upstart-basierende Systeme (z.B. Ubuntu)</h4></div></div></div><p>Kopieren Sie die Datei
           <code class="filename">scripts/boot/upstart/kivitendo-task-server.conf</code>
           nach <code class="filename">/etc/init/kivitendo-task-server.conf</code>.
           Passen Sie in der kopierten Datei den Pfad zum Task-Server an (Zeile
index 3210358..e92ccc4 100644 (file)
                      </span></dt><dd><p>Beschreibung des ausgewählten Druckers</p></dd><dt><span class="term">
                         <code class="varname">template_meta.printer.template_code</code>
                      </span></dt><dd><p>Vorlagenürzel des ausgewählten Druckers, identisch mit
-                dem Kürzel das im Dateinamen verwendetet wird.</p></dd></dl></div></div><div class="sect3" title="3.2.7.2. Stammdaten von Kunden und Lieferanten"><div class="titlepage"><div><div><h4 class="title"><a name="dokumentenvorlagen-und-variablen.allgemeine-variablen.kunden-lieferanten"></a>3.2.7.2. Stammdaten von Kunden und Lieferanten</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">
+                dem Kürzel das im Dateinamen verwendetet wird.</p></dd><dt><span class="term">
+                        <code class="varname">template_meta.tmpfile</code>
+                     </span></dt><dd><p>Datei-Prefix für temporäre Dateien.</p></dd></dl></div></div><div class="sect3" title="3.2.7.2. Stammdaten von Kunden und Lieferanten"><div class="titlepage"><div><div><h4 class="title"><a name="dokumentenvorlagen-und-variablen.allgemeine-variablen.kunden-lieferanten"></a>3.2.7.2. Stammdaten von Kunden und Lieferanten</h4></div></div></div><div class="variablelist"><dl><dt><span class="term">
                         <code class="varname">account_number</code>
                      </span></dt><dd><p>Kontonummer</p></dd><dt><span class="term">
                         <code class="varname">bank</code>
                         <code class="varname">invdate</code>
                      </span></dt><dd><p>Rechnungsdatum</p></dd><dt><span class="term">
                         <code class="varname">invnumber</code>
-                     </span></dt><dd><p>Rechnungsnummer</p></dd></dl></div></div></div><div class="sect2" title="3.2.10. Variablen in anderen Vorlagen"><div class="titlepage"><div><div><h3 class="title"><a name="dokumentenvorlagen-und-variablen.andere-vorlagen"></a>3.2.10. Variablen in anderen Vorlagen</h3></div></div></div><div class="sect3" title="3.2.10.1. Einführung"><div class="titlepage"><div><div><h4 class="title"><a name="d0e3731"></a>3.2.10.1. Einführung</h4></div></div></div><p>Die Variablen in anderen Vorlagen sind ähnlich wie in der
+                     </span></dt><dd><p>Rechnungsnummer</p></dd></dl></div></div></div><div class="sect2" title="3.2.10. Variablen in anderen Vorlagen"><div class="titlepage"><div><div><h3 class="title"><a name="dokumentenvorlagen-und-variablen.andere-vorlagen"></a>3.2.10. Variablen in anderen Vorlagen</h3></div></div></div><div class="sect3" title="3.2.10.1. Einführung"><div class="titlepage"><div><div><h4 class="title"><a name="d0e3743"></a>3.2.10.1. Einführung</h4></div></div></div><p>Die Variablen in anderen Vorlagen sind ähnlich wie in der
           Rechnung. Allerdings heißen die Variablen, die mit
           <code class="varname">inv</code> beginnen, jetzt anders. Bei den Angeboten
           fangen sie mit <code class="varname">quo</code> für "quotation" an:
           zeigen:</p><pre class="programlisting">&lt;%if var1 == "Wert"%&gt;</pre><p>Testet die Variable <code class="varname">var1</code> auf
           übereinstimmung mit der Zeichenkette <code class="constant">Wert</code>.
           Mittels <code class="function">!=</code> anstelle von <code class="function">==</code>
-          würde auf Ungleichheit getestet.</p><pre class="programlisting">%if var1 == var2%&gt;</pre><p>Testet die Variable <code class="varname">var1</code> auf
+          würde auf Ungleichheit getestet.</p><pre class="programlisting">&lt;%if var1 == var2%&gt;</pre><p>Testet die Variable <code class="varname">var1</code> auf
           übereinstimmung mit der Variablen <code class="varname">var2</code>. Mittel
           <code class="function">!=</code> anstelle von <code class="function">==</code> würde
           auf Ungleichheit getestet.</p><p>Erfahrere Benutzer können neben der Tests auf (Un-)Gleichheit
index 59181c7..83fbf28 100644 (file)
@@ -1,6 +1,6 @@
 <html><head>
       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-   <title>Kapitel 4. Entwicklerdokumentation</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1-RC2"><link rel="home" href="index.html" title="kivitendo: Installation, Konfiguration, Entwicklung"><link rel="up" href="index.html" title="kivitendo: Installation, Konfiguration, Entwicklung"><link rel="prev" href="ch03s03.html" title="3.3. Excel-Vorlagen"><link rel="next" href="ch04s02.html" title="4.2. Entwicklung unter FastCGI"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Kapitel 4. Entwicklerdokumentation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch03s03.html">Zurück</a>&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch04s02.html">Weiter</a></td></tr></table><hr></div><div class="chapter" title="Kapitel 4. Entwicklerdokumentation"><div class="titlepage"><div><div><h2 class="title"><a name="d0e4331"></a>Kapitel 4. Entwicklerdokumentation</h2></div></div></div><div class="sect1" title="4.1. Globale Variablen"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="devel.globals"></a>4.1. Globale Variablen</h2></div></div></div><div class="sect2" title="4.1.1. Wie sehen globale Variablen in Perl aus?"><div class="titlepage"><div><div><h3 class="title"><a name="d0e4337"></a>4.1.1. Wie sehen globale Variablen in Perl aus?</h3></div></div></div><p>Globale Variablen liegen in einem speziellen namespace namens
+   <title>Kapitel 4. Entwicklerdokumentation</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1-RC2"><link rel="home" href="index.html" title="kivitendo: Installation, Konfiguration, Entwicklung"><link rel="up" href="index.html" title="kivitendo: Installation, Konfiguration, Entwicklung"><link rel="prev" href="ch03s03.html" title="3.3. Excel-Vorlagen"><link rel="next" href="ch04s02.html" title="4.2. Entwicklung unter FastCGI"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Kapitel 4. Entwicklerdokumentation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch03s03.html">Zurück</a>&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch04s02.html">Weiter</a></td></tr></table><hr></div><div class="chapter" title="Kapitel 4. Entwicklerdokumentation"><div class="titlepage"><div><div><h2 class="title"><a name="d0e4343"></a>Kapitel 4. Entwicklerdokumentation</h2></div></div></div><div class="sect1" title="4.1. Globale Variablen"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="devel.globals"></a>4.1. Globale Variablen</h2></div></div></div><div class="sect2" title="4.1.1. Wie sehen globale Variablen in Perl aus?"><div class="titlepage"><div><div><h3 class="title"><a name="d0e4349"></a>4.1.1. Wie sehen globale Variablen in Perl aus?</h3></div></div></div><p>Globale Variablen liegen in einem speziellen namespace namens
         "main", der von überall erreichbar ist. Darüber hinaus sind bareword
         globs global und die meisten speziellen Variablen sind...
         speziell.</p><p>Daraus ergeben sich folgende Formen:</p><div class="variablelist"><dl><dt><span class="term">
@@ -25,7 +25,7 @@
               <code class="varname">$PACKAGE::form</code>.</p></dd><dt><span class="term">
                      <code class="literal">local $form</code>
                   </span></dt><dd><p>Alle Änderungen an <code class="varname">$form</code> werden am Ende
-              des scopes zurückgesetzt</p></dd></dl></div></div><div class="sect2" title="4.1.2. Warum sind globale Variablen ein Problem?"><div class="titlepage"><div><div><h3 class="title"><a name="d0e4438"></a>4.1.2. Warum sind globale Variablen ein Problem?</h3></div></div></div><p>Das erste Problem ist <span class="productname">FCGI</span>™.</p><p>
+              des scopes zurückgesetzt</p></dd></dl></div></div><div class="sect2" title="4.1.2. Warum sind globale Variablen ein Problem?"><div class="titlepage"><div><div><h3 class="title"><a name="d0e4450"></a>4.1.2. Warum sind globale Variablen ein Problem?</h3></div></div></div><p>Das erste Problem ist <span class="productname">FCGI</span>™.</p><p>
                <span class="productname">SQL-Ledger</span>™ hat fast alles im globalen
         namespace abgelegt, und erwartet, dass es da auch wiederzufinden ist.
         Unter <span class="productname">FCGI</span>™ müssen diese Sachen aber wieder
@@ -39,7 +39,7 @@
         dies hat, seit der Einführung, u.a. schon so manche langwierige
         Bug-Suche verkürzt. Da globale Variablen aber implizit mit Package
         angegeben werden, werden die nicht geprüft, und somit kann sich
-        schnell ein Tippfehler einschleichen.</p></div><div class="sect2" title="4.1.3. Kanonische globale Variablen"><div class="titlepage"><div><div><h3 class="title"><a name="d0e4471"></a>4.1.3. Kanonische globale Variablen</h3></div></div></div><p>Um dieses Problem im Griff zu halten gibt es einige wenige
+        schnell ein Tippfehler einschleichen.</p></div><div class="sect2" title="4.1.3. Kanonische globale Variablen"><div class="titlepage"><div><div><h3 class="title"><a name="d0e4483"></a>4.1.3. Kanonische globale Variablen</h3></div></div></div><p>Um dieses Problem im Griff zu halten gibt es einige wenige
         globale Variablen, die kanonisch sind, d.h. sie haben bestimmte
         vorgegebenen Eigenschaften, und alles andere sollte anderweitig
         umhergereicht werden.</p><p>Diese Variablen sind im Moment die folgenden neun:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
@@ -62,7 +62,7 @@
                      <code class="varname">$::request</code>
                   </p></li></ul></div><p>Damit diese nicht erneut als Müllhalde missbraucht werden, im
         Folgenden eine kurze Erläuterung der bestimmten vorgegebenen
-        Eigenschaften (Konventionen):</p><div class="sect3" title="4.1.3.1. $::form"><div class="titlepage"><div><div><h4 class="title"><a name="d0e4535"></a>4.1.3.1. $::form</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Ist ein Objekt der Klasse
+        Eigenschaften (Konventionen):</p><div class="sect3" title="4.1.3.1. $::form"><div class="titlepage"><div><div><h4 class="title"><a name="d0e4547"></a>4.1.3.1. $::form</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Ist ein Objekt der Klasse
               "<code class="classname">Form</code>"</p></li><li class="listitem"><p>Wird nach jedem Request gelöscht</p></li><li class="listitem"><p>Muss auch in Tests und Konsolenscripts vorhanden
               sein.</p></li><li class="listitem"><p>Enthält am Anfang eines Requests die Requestparameter vom
               User</p></li><li class="listitem"><p>Kann zwar intern über Requestgrenzen ein Datenbankhandle
   push @{ $form-&gt;{TEMPLATE_ARRAYS}{number} },          $form-&gt;{"partnumber_$i"};
   push @{ $form-&gt;{TEMPLATE_ARRAYS}{description} },     $form-&gt;{"description_$i"};
   # ...
-}</pre></div><div class="sect3" title="4.1.3.2. %::myconfig"><div class="titlepage"><div><div><h4 class="title"><a name="d0e4619"></a>4.1.3.2. %::myconfig</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Das einzige Hash unter den globalen Variablen</p></li><li class="listitem"><p>Wird spätestens benötigt wenn auf die Datenbank
+}</pre></div><div class="sect3" title="4.1.3.2. %::myconfig"><div class="titlepage"><div><div><h4 class="title"><a name="d0e4631"></a>4.1.3.2. %::myconfig</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Das einzige Hash unter den globalen Variablen</p></li><li class="listitem"><p>Wird spätestens benötigt wenn auf die Datenbank
               zugegriffen wird</p></li><li class="listitem"><p>Wird bei jedem Request neu erstellt.</p></li><li class="listitem"><p>Enthält die Userdaten des aktuellen Logins</p></li><li class="listitem"><p>Sollte nicht ohne Filterung irgendwo gedumpt werden oder
               extern serialisiert werden, weil da auch der Datenbankzugriff
               für diesen user drinsteht.</p></li><li class="listitem"><p>Enthält unter anderem Listenbegrenzung vclimit,
           überwiegend die Daten, die sich unter <span class="guimenu">Programm</span>
           -&gt; <span class="guimenuitem">Einstellungen</span> befinden, bzw. die
           Informationen über den Benutzer die über die
-          Administrator-Schnittstelle (admin.pl) eingegeben wurden.</p></div><div class="sect3" title="4.1.3.3. $::locale"><div class="titlepage"><div><div><h4 class="title"><a name="d0e4658"></a>4.1.3.3. $::locale</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse "Locale"</p></li><li class="listitem"><p>Wird pro Request erstellt</p></li><li class="listitem"><p>Muss auch für Tests und Scripte immer verfügbar
+          Administrator-Schnittstelle (admin.pl) eingegeben wurden.</p></div><div class="sect3" title="4.1.3.3. $::locale"><div class="titlepage"><div><div><h4 class="title"><a name="d0e4670"></a>4.1.3.3. $::locale</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse "Locale"</p></li><li class="listitem"><p>Wird pro Request erstellt</p></li><li class="listitem"><p>Muss auch für Tests und Scripte immer verfügbar
               sein.</p></li><li class="listitem"><p>Cached intern über Requestgrenzen hinweg benutzte
               Locales</p></li></ul></div><p>Lokalisierung für den aktuellen User. Alle Übersetzungen,
-          Zahlen- und Datumsformatierungen laufen über dieses Objekt.</p></div><div class="sect3" title="4.1.3.4. $::lxdebug"><div class="titlepage"><div><div><h4 class="title"><a name="d0e4676"></a>4.1.3.4. $::lxdebug</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse "LXDebug"</p></li><li class="listitem"><p>Wird global gecached</p></li><li class="listitem"><p>Muss immer verfügbar sein, in nahezu allen
+          Zahlen- und Datumsformatierungen laufen über dieses Objekt.</p></div><div class="sect3" title="4.1.3.4. $::lxdebug"><div class="titlepage"><div><div><h4 class="title"><a name="d0e4688"></a>4.1.3.4. $::lxdebug</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse "LXDebug"</p></li><li class="listitem"><p>Wird global gecached</p></li><li class="listitem"><p>Muss immer verfügbar sein, in nahezu allen
               Funktionen</p></li></ul></div><p>
                   <code class="varname">$::lxdebug</code> stellt Debuggingfunktionen
           bereit, wie "<code class="function">enter_sub</code>" und
           "<code class="function">message</code>" und "<code class="function">dump</code>" mit
           denen man flott Informationen ins Log (tmp/kivitendo-debug.log)
           packen kann.</p><p>Beispielsweise so:</p><pre class="programlisting">$main::lxdebug-&gt;message(0, 'Meine Konfig:' . Dumper (%::myconfig));
-$main::lxdebug-&gt;message(0, 'Wer bin ich? Kunde oder Lieferant:' . $form-&gt;{vc});</pre></div><div class="sect3" title="4.1.3.5. $::auth"><div class="titlepage"><div><div><h4 class="title"><a name="d0e4713"></a>4.1.3.5. $::auth</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse "SL::Auth"</p></li><li class="listitem"><p>Wird global gecached</p></li><li class="listitem"><p>Hat eine permanente DB Verbindung zur Authdatenbank</p></li><li class="listitem"><p>Wird nach jedem Request resettet.</p></li></ul></div><p>
+$main::lxdebug-&gt;message(0, 'Wer bin ich? Kunde oder Lieferant:' . $form-&gt;{vc});</pre></div><div class="sect3" title="4.1.3.5. $::auth"><div class="titlepage"><div><div><h4 class="title"><a name="d0e4725"></a>4.1.3.5. $::auth</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse "SL::Auth"</p></li><li class="listitem"><p>Wird global gecached</p></li><li class="listitem"><p>Hat eine permanente DB Verbindung zur Authdatenbank</p></li><li class="listitem"><p>Wird nach jedem Request resettet.</p></li></ul></div><p>
                   <code class="varname">$::auth</code> stellt Funktionen bereit um die
           Rechte des aktuellen Users abzufragen. Obwohl diese Informationen
           vom aktuellen User abhängen wird das Objekt aus
           Geschwindigkeitsgründen nur einmal angelegt und dann nach jedem
-          Request kurz resettet.</p></div><div class="sect3" title="4.1.3.6. $::lx_office_conf"><div class="titlepage"><div><div><h4 class="title"><a name="d0e4734"></a>4.1.3.6. $::lx_office_conf</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse
+          Request kurz resettet.</p></div><div class="sect3" title="4.1.3.6. $::lx_office_conf"><div class="titlepage"><div><div><h4 class="title"><a name="d0e4746"></a>4.1.3.6. $::lx_office_conf</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse
               "<code class="classname">SL::LxOfficeConf</code>"</p></li><li class="listitem"><p>Global gecached</p></li><li class="listitem"><p>Repräsentation der
               <code class="filename">config/kivitendo.conf[.default]</code>-Dateien</p></li></ul></div><p>Globale Konfiguration. Configdateien werden zum Start gelesen
           und danach nicht mehr angefasst. Es ist derzeit nicht geplant, dass
@@ -150,16 +150,16 @@ $main::lxdebug-&gt;message(0, 'Wer bin ich? Kunde oder Lieferant:' . $form-&gt;{
 file = /tmp/kivitendo-debug.log</pre><p>ist der Key <code class="varname">file</code> im Programm als
           <code class="varname">$::lx_office_conf-&gt;{debug}{file}</code>
           erreichbar.</p><div class="warning" title="Warnung" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Warning"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Warnung]" src="../../../../system/docbook-xsl/images/warning.png"></td><th align="left">Warnung</th></tr><tr><td align="left" valign="top"><p>Zugriff auf die Konfiguration erfolgt im Moment über
-            Hashkeys, sind also nicht gegen Tippfehler abgesichert.</p></td></tr></table></div></div><div class="sect3" title="4.1.3.7. $::instance_conf"><div class="titlepage"><div><div><h4 class="title"><a name="d0e4770"></a>4.1.3.7. $::instance_conf</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse
+            Hashkeys, sind also nicht gegen Tippfehler abgesichert.</p></td></tr></table></div></div><div class="sect3" title="4.1.3.7. $::instance_conf"><div class="titlepage"><div><div><h4 class="title"><a name="d0e4782"></a>4.1.3.7. $::instance_conf</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse
               "<code class="classname">SL::InstanceConfiguration</code>"</p></li><li class="listitem"><p>wird pro Request neu erstellt</p></li></ul></div><p>Funktioniert wie <code class="varname">$::lx_office_conf</code>,
           speichert aber Daten die von der Instanz abhängig sind. Eine Instanz
           ist hier eine Mandantendatenbank. Beispielsweise überprüft
           </p><pre class="programlisting">$::instance_conf-&gt;get_inventory_system eq 'perpetual'</pre><p>
-          ob die berüchtigte Bestandsmethode zur Anwendung kommt.</p></div><div class="sect3" title="4.1.3.8. $::dispatcher"><div class="titlepage"><div><div><h4 class="title"><a name="d0e4791"></a>4.1.3.8. $::dispatcher</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse
+          ob die berüchtigte Bestandsmethode zur Anwendung kommt.</p></div><div class="sect3" title="4.1.3.8. $::dispatcher"><div class="titlepage"><div><div><h4 class="title"><a name="d0e4803"></a>4.1.3.8. $::dispatcher</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse
               "<code class="varname">SL::Dispatcher</code>"</p></li><li class="listitem"><p>wird pro Serverprozess erstellt.</p></li><li class="listitem"><p>enthält Informationen über die technische Verbindung zum
               Server</p></li></ul></div><p>Der dritte Punkt ist auch der einzige Grund warum das Objekt
           global gespeichert wird. Wird vermutlich irgendwann in einem anderen
-          Objekt untergebracht.</p></div><div class="sect3" title="4.1.3.9. $::request"><div class="titlepage"><div><div><h4 class="title"><a name="d0e4809"></a>4.1.3.9. $::request</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Hashref (evtl später Objekt)</p></li><li class="listitem"><p>Wird pro Request neu initialisiert.</p></li><li class="listitem"><p>Keine Unterstruktur garantiert.</p></li></ul></div><p>
+          Objekt untergebracht.</p></div><div class="sect3" title="4.1.3.9. $::request"><div class="titlepage"><div><div><h4 class="title"><a name="d0e4821"></a>4.1.3.9. $::request</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Hashref (evtl später Objekt)</p></li><li class="listitem"><p>Wird pro Request neu initialisiert.</p></li><li class="listitem"><p>Keine Unterstruktur garantiert.</p></li></ul></div><p>
                   <code class="varname">$::request</code> ist ein generischer Platz um
           Daten "für den aktuellen Request" abzulegen. Sollte nicht für action
           at a distance benutzt werden, sondern um lokales memoizing zu
@@ -172,20 +172,20 @@ file = /tmp/kivitendo-debug.log</pre><p>ist der Key <code class="varname">file</
               <code class="varname">$::request</code>
                      </p></li><li class="listitem"><p>Muss ich von anderen Teilen des Programms lesend drauf
               zugreifen? Dann <code class="varname">$::request</code>, aber Zugriff über
-              Wrappermethode</p></li></ul></div></div></div><div class="sect2" title="4.1.4. Ehemalige globale Variablen"><div class="titlepage"><div><div><h3 class="title"><a name="d0e4851"></a>4.1.4. Ehemalige globale Variablen</h3></div></div></div><p>Die folgenden Variablen waren einmal im Programm, und wurden
-        entfernt.</p><div class="sect3" title="4.1.4.1. $::cgi"><div class="titlepage"><div><div><h4 class="title"><a name="d0e4856"></a>4.1.4.1. $::cgi</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>war nötig, weil cookie Methoden nicht als
+              Wrappermethode</p></li></ul></div></div></div><div class="sect2" title="4.1.4. Ehemalige globale Variablen"><div class="titlepage"><div><div><h3 class="title"><a name="d0e4863"></a>4.1.4. Ehemalige globale Variablen</h3></div></div></div><p>Die folgenden Variablen waren einmal im Programm, und wurden
+        entfernt.</p><div class="sect3" title="4.1.4.1. $::cgi"><div class="titlepage"><div><div><h4 class="title"><a name="d0e4868"></a>4.1.4.1. $::cgi</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>war nötig, weil cookie Methoden nicht als
               Klassenfunktionen funktionieren</p></li><li class="listitem"><p>Aufruf als Klasse erzeugt Dummyobjekt was im
               Klassennamespace gehalten wird und über Requestgrenzen
               leaked</p></li><li class="listitem"><p>liegt jetzt unter
               <code class="varname">$::request-&gt;{cgi}</code>
-                     </p></li></ul></div></div><div class="sect3" title="4.1.4.2. $::all_units"><div class="titlepage"><div><div><h4 class="title"><a name="d0e4872"></a>4.1.4.2. $::all_units</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>war nötig, weil einige Funktionen in Schleifen zum Teil
+                     </p></li></ul></div></div><div class="sect3" title="4.1.4.2. $::all_units"><div class="titlepage"><div><div><h4 class="title"><a name="d0e4884"></a>4.1.4.2. $::all_units</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>war nötig, weil einige Funktionen in Schleifen zum Teil
               ein paar hundert mal pro Request eine Liste der Einheiten
               brauchen, und de als Parameter durch einen Riesenstack von
               Funktionen geschleift werden müssten.</p></li><li class="listitem"><p>Liegt jetzt unter
               <code class="varname">$::request-&gt;{cache}{all_units}</code>
                      </p></li><li class="listitem"><p>Wird nur in
               <code class="function">AM-&gt;retrieve_all_units()</code> gesetzt oder
-              gelesen.</p></li></ul></div></div><div class="sect3" title="4.1.4.3. %::called_subs"><div class="titlepage"><div><div><h4 class="title"><a name="d0e4891"></a>4.1.4.3. %::called_subs</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>wurde benutzt um callsub deep recursions
+              gelesen.</p></li></ul></div></div><div class="sect3" title="4.1.4.3. %::called_subs"><div class="titlepage"><div><div><h4 class="title"><a name="d0e4903"></a>4.1.4.3. %::called_subs</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>wurde benutzt um callsub deep recursions
               abzufangen.</p></li><li class="listitem"><p>Wurde entfernt, weil callsub nur einen Bruchteil der
               möglichen Rekursioenen darstellt, und da nie welche
               auftreten.</p></li><li class="listitem"><p>komplette recursion protection wurde entfernt.</p></li></ul></div></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch03s03.html">Zurück</a>&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch04s02.html">Weiter</a></td></tr><tr><td width="40%" align="left" valign="top">3.3. Excel-Vorlagen&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Zum Anfang</a></td><td width="40%" align="right" valign="top">&nbsp;4.2. Entwicklung unter FastCGI</td></tr></table></div></body></html>
\ No newline at end of file
index 90dfdde..827e671 100644 (file)
@@ -1,6 +1,6 @@
 <html><head>
       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-   <title>kivitendo: Installation, Konfiguration, Entwicklung</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1-RC2"><link rel="home" href="index.html" title="kivitendo: Installation, Konfiguration, Entwicklung"><link rel="next" href="ch01.html" title="Kapitel 1. Aktuelle Hinweise"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">kivitendo: Installation, Konfiguration, Entwicklung</th></tr><tr><td width="20%" align="left">&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch01.html">Weiter</a></td></tr></table><hr></div><div lang="de" class="book" title="kivitendo: Installation, Konfiguration, Entwicklung"><div class="titlepage"><div><div><h1 class="title"><a name="kivitendo-documentation"></a>kivitendo: Installation, Konfiguration, Entwicklung</h1></div></div><hr></div><div class="toc"><p><b>Inhaltsverzeichnis</b></p><dl><dt><span class="chapter"><a href="ch01.html">1. Aktuelle Hinweise</a></span></dt><dt><span class="chapter"><a href="ch02.html">2. Installation und Grundkonfiguration</a></span></dt><dd><dl><dt><span class="sect1"><a href="ch02.html#Ben%C3%B6tigte-Software-und-Pakete">2.1. Benötigte Software und Pakete</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02.html#Betriebssystem">2.1.1. Betriebssystem</a></span></dt><dt><span class="sect2"><a href="ch02.html#Pakete">2.1.2. Pakete</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s02.html">2.2. Manuelle Installation des Programmpaketes</a></span></dt><dt><span class="sect1"><a href="ch02s03.html">2.3. kivitendo-Konfigurationsdatei</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s03.html#config.config-file.introduction">2.3.1. Einführung</a></span></dt><dt><span class="sect2"><a href="ch02s03.html#config.config-file.sections-parameters">2.3.2. Abschnitte und Parameter</a></span></dt><dt><span class="sect2"><a href="ch02s03.html#config.config-file.prior-versions">2.3.3. Versionen vor 2.6.3</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s04.html">2.4. Anpassung der PostgreSQL-Konfiguration</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s04.html#Zeichens%C3%A4tze-die-Verwendung-von-UTF-8">2.4.1. Zeichensätze/die Verwendung von UTF-8</a></span></dt><dt><span class="sect2"><a href="ch02s04.html#%C3%84nderungen-an-Konfigurationsdateien">2.4.2. Änderungen an Konfigurationsdateien</a></span></dt><dt><span class="sect2"><a href="ch02s04.html#Erweiterung-f%C3%BCr-servergespeicherte-Prozeduren">2.4.3. Erweiterung für servergespeicherte Prozeduren</a></span></dt><dt><span class="sect2"><a href="ch02s04.html#Datenbankbenutzer-anlegen">2.4.4. Datenbankbenutzer anlegen</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s05.html">2.5. Webserver-Konfiguration</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s05.html#d0e490">2.5.1. Grundkonfiguration mittels CGI</a></span></dt><dt><span class="sect2"><a href="ch02s05.html#Apache-Konfiguration.FCGI">2.5.2. Konfiguration für FastCGI/FCGI</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s06.html">2.6. Der Task-Server</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s06.html#Konfiguration-des-Task-Servers">2.6.1. Verfügbare und notwendige Konfigurationsoptionen</a></span></dt><dt><span class="sect2"><a href="ch02s06.html#Einbinden-in-den-Boot-Prozess">2.6.2. Automatisches Starten des Task-Servers beim Booten</a></span></dt><dt><span class="sect2"><a href="ch02s06.html#Prozesskontrolle">2.6.3. Wie der Task-Server gestartet und beendet wird</a></span></dt><dt><span class="sect2"><a href="ch02s06.html#Prozesskontrolle2">2.6.4. Task-Server mit mehreren Mandanten</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s07.html">2.7. Benutzerauthentifizierung und Administratorpasswort</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s07.html#Grundlagen-zur-Benutzerauthentifizierung">2.7.1. Grundlagen zur Benutzerauthentifizierung</a></span></dt><dt><span class="sect2"><a href="ch02s07.html#Administratorpasswort">2.7.2. Administratorpasswort</a></span></dt><dt><span class="sect2"><a href="ch02s07.html#Authentifizierungsdatenbank">2.7.3. Authentifizierungsdatenbank</a></span></dt><dt><span class="sect2"><a href="ch02s07.html#Passwort%C3%BCberpr%C3%BCfung">2.7.4. Passwortüberprüfung</a></span></dt><dt><span class="sect2"><a href="ch02s07.html#Name-des-Session-Cookies">2.7.5. Name des Session-Cookies</a></span></dt><dt><span class="sect2"><a href="ch02s07.html#Anlegen-der-Authentifizierungsdatenbank">2.7.6. Anlegen der Authentifizierungsdatenbank</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s08.html">2.8. Benutzer- und Gruppenverwaltung</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s08.html#Zusammenh%C3%A4nge">2.8.1. Zusammenhänge</a></span></dt><dt><span class="sect2"><a href="ch02s08.html#Datenbanken-anlegen">2.8.2. Datenbanken anlegen</a></span></dt><dt><span class="sect2"><a href="ch02s08.html#Gruppen-anlegen">2.8.3. Gruppen anlegen</a></span></dt><dt><span class="sect2"><a href="ch02s08.html#Benutzer-anlegen">2.8.4. Benutzer anlegen</a></span></dt><dt><span class="sect2"><a href="ch02s08.html#Gruppenmitgliedschaften-verwalten">2.8.5. Gruppenmitgliedschaften verwalten</a></span></dt><dt><span class="sect2"><a href="ch02s08.html#Migration-alter-Installationen">2.8.6. Migration alter Installationen</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s09.html">2.9. Drucken mit kivitendo</a></span></dt><dt><span class="sect1"><a href="ch02s10.html">2.10. OpenDocument-Vorlagen</a></span></dt><dt><span class="sect1"><a href="ch02s11.html">2.11. Konfiguration zur Einnahmenüberschussrechnung/Bilanzierung:
+   <title>kivitendo: Installation, Konfiguration, Entwicklung</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1-RC2"><link rel="home" href="index.html" title="kivitendo: Installation, Konfiguration, Entwicklung"><link rel="next" href="ch01.html" title="Kapitel 1. Aktuelle Hinweise"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">kivitendo: Installation, Konfiguration, Entwicklung</th></tr><tr><td width="20%" align="left">&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch01.html">Weiter</a></td></tr></table><hr></div><div lang="de" class="book" title="kivitendo: Installation, Konfiguration, Entwicklung"><div class="titlepage"><div><div><h1 class="title"><a name="kivitendo-documentation"></a>kivitendo: Installation, Konfiguration, Entwicklung</h1></div></div><hr></div><div class="toc"><p><b>Inhaltsverzeichnis</b></p><dl><dt><span class="chapter"><a href="ch01.html">1. Aktuelle Hinweise</a></span></dt><dt><span class="chapter"><a href="ch02.html">2. Installation und Grundkonfiguration</a></span></dt><dd><dl><dt><span class="sect1"><a href="ch02.html#Ben%C3%B6tigte-Software-und-Pakete">2.1. Benötigte Software und Pakete</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02.html#Betriebssystem">2.1.1. Betriebssystem</a></span></dt><dt><span class="sect2"><a href="ch02.html#Pakete">2.1.2. Pakete</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s02.html">2.2. Manuelle Installation des Programmpaketes</a></span></dt><dt><span class="sect1"><a href="ch02s03.html">2.3. kivitendo-Konfigurationsdatei</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s03.html#config.config-file.introduction">2.3.1. Einführung</a></span></dt><dt><span class="sect2"><a href="ch02s03.html#config.config-file.sections-parameters">2.3.2. Abschnitte und Parameter</a></span></dt><dt><span class="sect2"><a href="ch02s03.html#config.config-file.prior-versions">2.3.3. Versionen vor 2.6.3</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s04.html">2.4. Anpassung der PostgreSQL-Konfiguration</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s04.html#Zeichens%C3%A4tze-die-Verwendung-von-UTF-8">2.4.1. Zeichensätze/die Verwendung von UTF-8</a></span></dt><dt><span class="sect2"><a href="ch02s04.html#%C3%84nderungen-an-Konfigurationsdateien">2.4.2. Änderungen an Konfigurationsdateien</a></span></dt><dt><span class="sect2"><a href="ch02s04.html#Erweiterung-f%C3%BCr-servergespeicherte-Prozeduren">2.4.3. Erweiterung für servergespeicherte Prozeduren</a></span></dt><dt><span class="sect2"><a href="ch02s04.html#Datenbankbenutzer-anlegen">2.4.4. Datenbankbenutzer anlegen</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s05.html">2.5. Webserver-Konfiguration</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s05.html#d0e493">2.5.1. Grundkonfiguration mittels CGI</a></span></dt><dt><span class="sect2"><a href="ch02s05.html#Apache-Konfiguration.FCGI">2.5.2. Konfiguration für FastCGI/FCGI</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s06.html">2.6. Der Task-Server</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s06.html#Konfiguration-des-Task-Servers">2.6.1. Verfügbare und notwendige Konfigurationsoptionen</a></span></dt><dt><span class="sect2"><a href="ch02s06.html#Einbinden-in-den-Boot-Prozess">2.6.2. Automatisches Starten des Task-Servers beim Booten</a></span></dt><dt><span class="sect2"><a href="ch02s06.html#Prozesskontrolle">2.6.3. Wie der Task-Server gestartet und beendet wird</a></span></dt><dt><span class="sect2"><a href="ch02s06.html#Prozesskontrolle2">2.6.4. Task-Server mit mehreren Mandanten</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s07.html">2.7. Benutzerauthentifizierung und Administratorpasswort</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s07.html#Grundlagen-zur-Benutzerauthentifizierung">2.7.1. Grundlagen zur Benutzerauthentifizierung</a></span></dt><dt><span class="sect2"><a href="ch02s07.html#Administratorpasswort">2.7.2. Administratorpasswort</a></span></dt><dt><span class="sect2"><a href="ch02s07.html#Authentifizierungsdatenbank">2.7.3. Authentifizierungsdatenbank</a></span></dt><dt><span class="sect2"><a href="ch02s07.html#Passwort%C3%BCberpr%C3%BCfung">2.7.4. Passwortüberprüfung</a></span></dt><dt><span class="sect2"><a href="ch02s07.html#Name-des-Session-Cookies">2.7.5. Name des Session-Cookies</a></span></dt><dt><span class="sect2"><a href="ch02s07.html#Anlegen-der-Authentifizierungsdatenbank">2.7.6. Anlegen der Authentifizierungsdatenbank</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s08.html">2.8. Benutzer- und Gruppenverwaltung</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s08.html#Zusammenh%C3%A4nge">2.8.1. Zusammenhänge</a></span></dt><dt><span class="sect2"><a href="ch02s08.html#Datenbanken-anlegen">2.8.2. Datenbanken anlegen</a></span></dt><dt><span class="sect2"><a href="ch02s08.html#Gruppen-anlegen">2.8.3. Gruppen anlegen</a></span></dt><dt><span class="sect2"><a href="ch02s08.html#Benutzer-anlegen">2.8.4. Benutzer anlegen</a></span></dt><dt><span class="sect2"><a href="ch02s08.html#Gruppenmitgliedschaften-verwalten">2.8.5. Gruppenmitgliedschaften verwalten</a></span></dt><dt><span class="sect2"><a href="ch02s08.html#Migration-alter-Installationen">2.8.6. Migration alter Installationen</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s09.html">2.9. Drucken mit kivitendo</a></span></dt><dt><span class="sect1"><a href="ch02s10.html">2.10. OpenDocument-Vorlagen</a></span></dt><dt><span class="sect1"><a href="ch02s11.html">2.11. Konfiguration zur Einnahmenüberschussrechnung/Bilanzierung:
       EUR</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s11.html#config.eur.introduction">2.11.1. Einführung</a></span></dt><dt><span class="sect2"><a href="ch02s11.html#config.eur.parameters">2.11.2. Konfigurationsparameter</a></span></dt><dt><span class="sect2"><a href="ch02s11.html#config.eur.setting-parameters">2.11.3. Festlegen der Parameter</a></span></dt><dt><span class="sect2"><a href="ch02s11.html#config.eur.inventory-system-perpetual">2.11.4. Bemerkungen zu Bestandsmethode</a></span></dt><dt><span class="sect2"><a href="ch02s11.html#config.eur.knonw-issues">2.11.5. Bekannte Probleme</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s12.html">2.12. SKR04 19% Umstellung für innergemeinschaftlichen Erwerb</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s12.html#config.skr04-update-3804.introduction">2.12.1. Einführung</a></span></dt><dt><span class="sect2"><a href="ch02s12.html#config.skr04-update-3804.create-chart">2.12.2. Konto 3804 manuell anlegen</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s13.html">2.13. kivitendo ERP verwenden</a></span></dt></dl></dd><dt><span class="chapter"><a href="ch03.html">3. Features und Funktionen</a></span></dt><dd><dl><dt><span class="sect1"><a href="ch03.html#features.periodic-invoices">3.1. Wiederkehrende Rechnungen</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch03.html#features.periodic-invoices.introduction">3.1.1. Einführung</a></span></dt><dt><span class="sect2"><a href="ch03.html#features.periodic-invoices.configuration">3.1.2. Konfiguration</a></span></dt><dt><span class="sect2"><a href="ch03.html#features.periodic-invoices.reports">3.1.3. Auflisten</a></span></dt><dt><span class="sect2"><a href="ch03.html#features.periodic-invoices.task-server">3.1.4. Erzeugung der eigentlichen Rechnungen</a></span></dt><dt><span class="sect2"><a href="ch03.html#features.periodic-invoices.create-for-current-month">3.1.5. Erste Rechnung für aktuellen Monat erstellen</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch03s02.html">3.2. Dokumentenvorlagen und verfügbare Variablen</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.einf%C3%BChrung">3.2.1. Einführung</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.variablen-ausgeben">3.2.2. Variablen ausgeben</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.verwendung-in-druckbefehlen">3.2.3. Verwendung in Druckbefehlen</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.tag-style">3.2.4. Anfang und Ende der Tags verändern</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.zuordnung-dateinamen">3.2.5. Zuordnung von den Dateinamen zu den Funktionen</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.dateinamen-erweitert">3.2.6. Sprache, Drucker und E-Mail</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.allgemeine-variablen">3.2.7. Allgemeine Variablen, die in allen Vorlagen vorhanden
         sind</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.invoice">3.2.8. Variablen in Rechnungen</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.dunning">3.2.9. Variablen in Mahnungen und Rechnungen über Mahngebühren</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.andere-vorlagen">3.2.10. Variablen in anderen Vorlagen</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.bloecke">3.2.11. Blöcke, bedingte Anweisungen und Schleifen</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.markup">3.2.12. Markup-Code zur Textformatierung innerhalb von
-        Formularen</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch03s03.html">3.3. Excel-Vorlagen</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch03s03.html#excel-templates.summary">3.3.1. Zusammenfassung</a></span></dt><dt><span class="sect2"><a href="ch03s03.html#excel-templates.usage">3.3.2. Bedienung</a></span></dt><dt><span class="sect2"><a href="ch03s03.html#excel-templates.syntax">3.3.3. Variablensyntax</a></span></dt><dt><span class="sect2"><a href="ch03s03.html#excel-templates.limitations">3.3.4. Einschränkungen</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="ch04.html">4. Entwicklerdokumentation</a></span></dt><dd><dl><dt><span class="sect1"><a href="ch04.html#devel.globals">4.1. Globale Variablen</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch04.html#d0e4337">4.1.1. Wie sehen globale Variablen in Perl aus?</a></span></dt><dt><span class="sect2"><a href="ch04.html#d0e4438">4.1.2. Warum sind globale Variablen ein Problem?</a></span></dt><dt><span class="sect2"><a href="ch04.html#d0e4471">4.1.3. Kanonische globale Variablen</a></span></dt><dt><span class="sect2"><a href="ch04.html#d0e4851">4.1.4. Ehemalige globale Variablen</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch04s02.html">4.2. Entwicklung unter FastCGI</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch04s02.html#devel.fcgi.general">4.2.1. Allgemeines</a></span></dt><dt><span class="sect2"><a href="ch04s02.html#devel.fcgi.exiting">4.2.2. Programmende und Ausnahmen</a></span></dt><dt><span class="sect2"><a href="ch04s02.html#devel.fcgi.globals">4.2.3. Globale Variablen</a></span></dt><dt><span class="sect2"><a href="ch04s02.html#devel.fcgi.performance">4.2.4. Performance und Statistiken</a></span></dt><dt><span class="sect2"><a href="ch04s02.html#devel.fcgi.known-issues">4.2.5. Bekannte Probleme</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch04s03.html">4.3. SQL-Upgradedateien</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch04s03.html#db-upgrade-files.introduction">4.3.1. Einführung</a></span></dt><dt><span class="sect2"><a href="ch04s03.html#db-upgrade-files.format">4.3.2. Format der Kontrollinformationen</a></span></dt><dt><span class="sect2"><a href="ch04s03.html#db-upgrade-files.dbupgrade-tool">4.3.3. Hilfsscript dbupgrade2_tool.pl</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch04s04.html">4.4. Translations and languages</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch04s04.html#translations-languages.introduction">4.4.1. Introduction</a></span></dt><dt><span class="sect2"><a href="ch04s04.html#translations-languages.file-structure">4.4.2. File structure</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch04s05.html">4.5. Stil-Richtlinien</a></span></dt><dt><span class="sect1"><a href="ch04s06.html">4.6. Dokumentation erstellen</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch04s06.html#devel.build-doc.introduction">4.6.1. Einführung</a></span></dt><dt><span class="sect2"><a href="ch04s06.html#devel.build-doc.required-software">4.6.2. Benötigte Software</a></span></dt><dt><span class="sect2"><a href="ch04s06.html#devel.build-doc.build">4.6.3. PDFs und HTML-Seiten erstellen</a></span></dt><dt><span class="sect2"><a href="ch04s06.html#devel.build-doc.repository">4.6.4. Einchecken in das Git-Repository</a></span></dt></dl></dd></dl></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left">&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch01.html">Weiter</a></td></tr><tr><td width="40%" align="left" valign="top">&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right" valign="top">&nbsp;Kapitel 1. Aktuelle Hinweise</td></tr></table></div></body></html>
\ No newline at end of file
+        Formularen</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch03s03.html">3.3. Excel-Vorlagen</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch03s03.html#excel-templates.summary">3.3.1. Zusammenfassung</a></span></dt><dt><span class="sect2"><a href="ch03s03.html#excel-templates.usage">3.3.2. Bedienung</a></span></dt><dt><span class="sect2"><a href="ch03s03.html#excel-templates.syntax">3.3.3. Variablensyntax</a></span></dt><dt><span class="sect2"><a href="ch03s03.html#excel-templates.limitations">3.3.4. Einschränkungen</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="ch04.html">4. Entwicklerdokumentation</a></span></dt><dd><dl><dt><span class="sect1"><a href="ch04.html#devel.globals">4.1. Globale Variablen</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch04.html#d0e4349">4.1.1. Wie sehen globale Variablen in Perl aus?</a></span></dt><dt><span class="sect2"><a href="ch04.html#d0e4450">4.1.2. Warum sind globale Variablen ein Problem?</a></span></dt><dt><span class="sect2"><a href="ch04.html#d0e4483">4.1.3. Kanonische globale Variablen</a></span></dt><dt><span class="sect2"><a href="ch04.html#d0e4863">4.1.4. Ehemalige globale Variablen</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch04s02.html">4.2. Entwicklung unter FastCGI</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch04s02.html#devel.fcgi.general">4.2.1. Allgemeines</a></span></dt><dt><span class="sect2"><a href="ch04s02.html#devel.fcgi.exiting">4.2.2. Programmende und Ausnahmen</a></span></dt><dt><span class="sect2"><a href="ch04s02.html#devel.fcgi.globals">4.2.3. Globale Variablen</a></span></dt><dt><span class="sect2"><a href="ch04s02.html#devel.fcgi.performance">4.2.4. Performance und Statistiken</a></span></dt><dt><span class="sect2"><a href="ch04s02.html#devel.fcgi.known-issues">4.2.5. Bekannte Probleme</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch04s03.html">4.3. SQL-Upgradedateien</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch04s03.html#db-upgrade-files.introduction">4.3.1. Einführung</a></span></dt><dt><span class="sect2"><a href="ch04s03.html#db-upgrade-files.format">4.3.2. Format der Kontrollinformationen</a></span></dt><dt><span class="sect2"><a href="ch04s03.html#db-upgrade-files.dbupgrade-tool">4.3.3. Hilfsscript dbupgrade2_tool.pl</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch04s04.html">4.4. Translations and languages</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch04s04.html#translations-languages.introduction">4.4.1. Introduction</a></span></dt><dt><span class="sect2"><a href="ch04s04.html#translations-languages.file-structure">4.4.2. File structure</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch04s05.html">4.5. Stil-Richtlinien</a></span></dt><dt><span class="sect1"><a href="ch04s06.html">4.6. Dokumentation erstellen</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch04s06.html#devel.build-doc.introduction">4.6.1. Einführung</a></span></dt><dt><span class="sect2"><a href="ch04s06.html#devel.build-doc.required-software">4.6.2. Benötigte Software</a></span></dt><dt><span class="sect2"><a href="ch04s06.html#devel.build-doc.build">4.6.3. PDFs und HTML-Seiten erstellen</a></span></dt><dt><span class="sect2"><a href="ch04s06.html#devel.build-doc.repository">4.6.4. Einchecken in das Git-Repository</a></span></dt></dl></dd></dl></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left">&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch01.html">Weiter</a></td></tr><tr><td width="40%" align="left" valign="top">&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right" valign="top">&nbsp;Kapitel 1. Aktuelle Hinweise</td></tr></table></div></body></html>
\ No newline at end of file
index 33aae98..af6c5ac 100644 (file)
Binary files a/doc/kivitendo-Dokumentation.pdf and b/doc/kivitendo-Dokumentation.pdf differ
diff --git a/image/maps/icons16.png b/image/maps/icons16.png
new file mode 100644 (file)
index 0000000..ebd9b18
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 (file)
index 0000000..ec72b78
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 (file)
index 0000000..94b95d1
Binary files /dev/null and b/image/maps/icons32.png differ
index d785dd2..5170e1d 100644 (file)
@@ -1,5 +1,7 @@
+<!DOCTYPE html>
 <html>
  <head>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <meta http-equiv="refresh" content="0;URL=controller.pl?action=LoginScreen/user_login">
  </head>
  <body>
diff --git a/js/ajax_layout.js b/js/ajax_layout.js
new file mode 100644 (file)
index 0000000..694e1c5
--- /dev/null
@@ -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('<link rel="stylesheet" href="' + baseURL + e + '" type="text/css" title="Stylesheet">');
+        });
+      }
+      if (data["stylesheets_inline"] && data["stylesheets_inline"].size) {
+        var style = "<style type='text/css'>";
+        $.each(data["stylesheets_inline"], function(i, e){
+          style += e;
+        });
+        style += '</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('<script type="text/javascript" src="' + baseURL + e + '">');
+        });
+      }
+      if (data["javascripts_inline"]) {
+        var script = "<script type='text/javascript'>";
+        $.each(data["javascripts_inline"], function(i, e){
+          script += e;
+        });
+        script += '</script>';
+        $('head').append(script);
+      }
+    }
+  });
+}
index 298d5a2..cabc650 100644 (file)
@@ -166,7 +166,6 @@ $(document).ready(function () {
   });
   // legacy. sone forms install these
   if (typeof fokus == 'function') { fokus(); return; }
-  if (focus_by_name('fokus'))        return;
   if (focus_by_name('cursor_fokus')) return;
   set_cursor_to_first_element();
 });
index 9e4c5bc..bf23469 100644 (file)
@@ -242,6 +242,7 @@ DHTMLSuite.common.prototype = {
        getTopPos : function(inputObj)\r
        {               \r
          var returnValue = inputObj.offsetTop;\r
+      if (returnValue > 700) returnValue = 0;\r
          while((inputObj = inputObj.offsetParent) != null){\r
                if(inputObj.tagName!='HTML'){\r
                        returnValue += (inputObj.offsetTop - inputObj.scrollTop);\r
@@ -1137,7 +1138,7 @@ DHTMLSuite.menuItem = function()
        var cssPrefix;                                                  // Css prefix for the menu items.\r
        var modelItemRef;                                               // Reference to menuModelItem\r
 \r
-       this.layoutCSS = 'menu-item.css';\r
+//     this.layoutCSS = 'menu-item.css';\r
        this.cssPrefix = 'DHTMLSuite_';\r
        \r
        if(!standardObjectsCreated)DHTMLSuite.createStandardObjects();  \r
@@ -1159,7 +1160,7 @@ DHTMLSuite.menuItem.prototype =
        */\r
        createItem : function(menuModelItemObj)\r
        {\r
-               DHTMLSuite.commonObj.loadCSS(this.layoutCSS);   // Load css\r
+//             DHTMLSuite.commonObj.loadCSS(this.layoutCSS);   // Load css\r
                \r
                DHTMLSuite.variableStorage.arrayOfDhtmlSuiteObjects[this.objectIndex] = this;\r
                        \r
@@ -1593,7 +1594,7 @@ DHTMLSuite.menuBar = function()
        var globalObjectIndex;                  // Global index of this object - used to refer to the object of this class outside\r
        this.cssPrefix = 'DHTMLSuite_';\r
        this.menuItemLayoutCss = false; // false = use default for the menuItem class.\r
-       this.layoutCSS = 'menu-bar.css';\r
+//     this.layoutCSS = 'menu-bar.css';\r
        this.menuBarBackgroundImage = 'menu_strip_bg.jpg';\r
        this.menuItem_objects = new Array();\r
        DHTMLSuite.variableStorage.menuBar_highlightedItems = new Array();\r
@@ -1629,7 +1630,7 @@ DHTMLSuite.menuBar.prototype = {
        init : function()\r
        {\r
                \r
-               DHTMLSuite.commonObj.loadCSS(this.layoutCSS);   \r
+//             DHTMLSuite.commonObj.loadCSS(this.layoutCSS);   \r
                this.__createDivs();    // Create general divs\r
                this.__createMenuItems();       // Create menu items\r
                this.__setBasicEvents();        // Set basic events.\r
@@ -2384,12 +2385,10 @@ DHTMLSuite.menuBar.prototype = {
         $('div.DHTMLSuite_menuBar_top').click(function(e) {\r
           if ($(e.target).attr('class') == 'DHTMLSuite_menuBar_top') { menu.hideSubMenus(); menu.unsetMenuBarState() }\r
         });\r
-        $('#win1').load(function(){\r
-            $('#win1').contents().mousedown(function(){\r
-                menu.hideSubMenus();\r
-                menu.menuBarState = false;\r
-            });\r
-        })\r
+        $('#content').mousedown(function(){\r
+            menu.hideSubMenus();\r
+            menu.menuBarState = false;\r
+        });\r
        }\r
 }\r
 \r
diff --git a/js/jquery.cookie.js b/js/jquery.cookie.js
new file mode 100644 (file)
index 0000000..7bc9744
--- /dev/null
@@ -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);
index ec22426..ed7c48f 100644 (file)
@@ -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);
+})
index 1eb8ab6..e6d9521 100644 (file)
@@ -93,6 +93,7 @@ $self->{texts} = {
   'Account for interest'        => 'Konto f&uuml;r Zinsen',
   'Account number'              => 'Kontonummer',
   'Account number #1, bank code #2, #3' => 'Kontonummer #1, BLZ #2, #3',
+  'Account number not unique!'  => 'Kontonummer bereits vorhanden!',
   'Account saved!'              => 'Konto gespeichert!',
   'Accounting Group deleted!'   => 'Buchungsgruppe gel&ouml;scht!',
   'Accounting Group saved!'     => 'Buchungsgruppe gespeichert!',
@@ -366,6 +367,7 @@ $self->{texts} = {
   'Cannot post invoice!'        => 'Rechnung kann nicht gebucht werden!',
   'Cannot post payment for a closed period!' => 'Es können keine Zahlungen für abgeschlossene Bücher gebucht werden!',
   'Cannot post payment!'        => 'Zahlung kann nicht gebucht werden!',
+  'Cannot post storno for a closed period!' => 'Für einen geschlossenen Zeitraum können keine Stornos gebucht werden!',
   'Cannot post transaction for a closed period!' => 'Für einen bereits abgeschlossenen Zeitraum kann keine Buchung angelegt werden!',
   'Cannot post transaction with a debit and credit entry for the same account!' => 'Kann Soll und Haben nicht auf dasselbe Konto buchen!',
   'Cannot post transaction!'    => 'Rechnung kann nicht gebucht werden!',
diff --git a/menu.pl b/menu.pl
deleted file mode 120000 (symlink)
index 385000d..0000000
--- 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 (symlink)
index 385000d..0000000
--- 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 (symlink)
index 385000d..0000000
+++ /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 (symlink)
index 385000d..0000000
--- 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 (symlink)
index 385000d..0000000
--- 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 (executable)
index 0000000..e6a47d9
--- /dev/null
@@ -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 E<lt>s.schoeling@linet-services.deE<gt>
+
+=cut
+
+
index f663014..f526416 100755 (executable)
@@ -254,20 +254,6 @@ sub handle_file {
     }
   }
 
-  # if this is the menu.pl file
-  if ($file eq 'menu.pl') {
-    foreach my $item (@menufiles) {
-      &scanmenu("$basedir/$item");
-    }
-  }
-
-  if ($file eq 'menunew.pl') {
-    foreach my $item (@menufiles) {
-      &scanmenu("$basedir/$item");
-      print "." if $opt_v;
-    }
-  }
-
   $file =~ s/\.pl//;
 
   foreach my $text (keys %$missing) {
diff --git a/scripts/make_icons.sh b/scripts/make_icons.sh
new file mode 100755 (executable)
index 0000000..85be431
--- /dev/null
@@ -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
index 542f486..abca29a 100644 (file)
 %======Die eigentliche-Tabelle========================================
 
 % temporaere Datei mit Tabelle anlegen
-\begin{filecontents}{<%tmpfile%>.table.tex}
+\begin{filecontents}{<%template_meta.tmpfile%>.table.tex}
 \mainfont
 \resetlaufsumme
 
   }
 \end{filecontents}  % Ende der Hilfsdatei.
 
-\LTXtable{\textwidth}{<%tmpfile%>.table.tex}
+\LTXtable{\textwidth}{<%template_meta.tmpfile%>.table.tex}
 
 \rule{\textwidth}{0pt}   % Ein (unsichtbarer) Strich quer ueber die Seite
 \vspace{ 5mm}
index db4198e..91a193b 100644 (file)
@@ -1,7 +1,6 @@
 [%- USE T8 %]
 [% USE HTML %]
 [%- USE L %]
-<body>
  <h1>[% title %]</h1>
 
  <p>
@@ -40,5 +39,3 @@
 
   <input type="hidden" name="action" value="analyze">
  </form>
-</body>
-</html>
index f75b1b7..b059a3a 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
 [% USE HTML %][% USE LxERP %]
-<body>
 
  <p><div class="listtop">[% title %]</div></p>
 
 
  <hr>
 
-</body>
-</html>
index 1041b12..c82876a 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
 [% USE HTML %][% USE LxERP %]
-<body>
 
  <p><div class="listtop">[% title %]</div></p>
 
@@ -28,5 +27,3 @@
   </p>
  </form>
 
-</body>
-</html>
index 1195f28..4d47e60 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
 [% USE HTML %][% USE LxERP %]
-<body>
 
  <p><div class="listtop">[% title %]</div></p>
 
@@ -77,5 +76,3 @@
   </p>
  </form>
 
-</body>
-</html>
index db56f82..74ce4f2 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
 [% USE HTML %][% USE LxERP %]
-<body>
 
  <p><div class="listtop">[% title %]</div></p>
 
     -->
  </script>
 
-</body>
-</html>
index ad9a076..3522cea 100644 (file)
@@ -1,7 +1,6 @@
 [%- USE T8 %]
 [% USE HTML %]
 [% USE LxERP %]
-<body>
  <h1>[% title %]</h1>
 
  <p>
@@ -22,5 +21,3 @@
    <input type="submit" value="[% 'Re-run analysis' | $T8 %]">
   </form>
  </p>
-</body>
-</html>
index 63181fc..6570c43 100644 (file)
@@ -1,7 +1,6 @@
 [%- USE T8 %]
 [% USE HTML %]
 [% USE LxERP %]
-<body>
  <h1>[% title %]</h1>
 
  <p>
@@ -29,5 +28,3 @@
    <input type="button" onclick="history.back()" value="[% 'No' | $T8 %]">
   </form>
  </p>
-</body>
-</html>
index f099928..e6252dc 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
 [% USE HTML %]
-<body>
 
  <p><div class="listtop">[% title %]</div></p>
 
@@ -19,5 +18,3 @@
   </form>
  </p>
 
-</body>
-</html>
index 7a3f044..6fde4ef 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
 [% USE HTML %]
-<body>
 
  <p><div class="listtop">[% title %]</div></p>
 
@@ -19,5 +18,3 @@
   </form>
  </p>
 
-</body>
-</html>
index 876cb4e..543f228 100644 (file)
@@ -1,7 +1,9 @@
 [%- USE T8 %]
 [% USE HTML %]
 [% USE LxERP%]
-<body class="admin" onload="document.getElementById('rpw').focus()">
+ <script type='text/javascript'>
+    $(function(){ document.getElementsById('rpw').focus();});
+ </script>
  <div align="center">
 
   <a href="http://www.kivitendo.org"><img src="image/kivitendo.png" border="0"></a>
@@ -33,5 +35,3 @@
 
  </div>
 
-</body>
-</html>
index bce74e0..756247a 100644 (file)
@@ -1,9 +1,13 @@
 [%- USE T8 %]
-[% USE HTML %]<body class="admin" onload="set_subject(); document.getElementsByName('to')[0].focus(); ">
-
+[%- USE HTML %]
  <script type="text/javascript">
   <!--
-      function set_subject() {
+      $(function(){
+        document.getElementsByName('to')[0].focus();
+        set_subject();
+      });
+
+      function set_subject () {
         var subject_template = "[% 'Backup of dataset' | $T8 %]";
         var subject = document.Form.subject.value;
 
@@ -93,5 +97,3 @@
 
  [% END %]
 
-</body>
-</html>
index 68f31d7..bb29cf9 100644 (file)
@@ -1,7 +1,6 @@
 [%- USE T8 %]
 [%- USE LxERP %]
-[% USE HTML %]<body class="admin">
-
+[%- USE HTML %]
  <h2>[% title %]</h2>
 
  <p>[% LxERP.t8('The dataset backup has been sent via email to #1.', to) | html %]</p>
@@ -10,5 +9,3 @@
   <input type="hidden" name="nextsub" value="list_users">
   <input type="submit" name="action" value="[% 'Continue' | $T8 %]">
  </form>
-</body>
-</html>
index 7f0397a..8e727d9 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
+[%- USE HTML %]
 
  <div class="listtop">[% title %]</div>
 
@@ -58,5 +58,3 @@
 
  </form>
 
-</body>
-</html>
index 816d0b1..f8e5ffe 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
+[%- USE HTML %]
 
  <div class="listtop">[% title %]</div>
 
@@ -40,5 +40,3 @@
 
  </form>
 
-</body>
-</html>
index 23c547a..3a106f5 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body class="admin">
-
+[%- USE HTML %]
   <h2>[% title %]</h2>
 
   <form method="post" action="admin.pl">
 
     -->
   </script>
-</body>
-</html>
index 00f0489..2f2fa6d 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
+[%- USE HTML %]
 
  <div class="listtop">[% title %]</div>
 
@@ -46,5 +46,3 @@
 
  </form>
 
-</body>
-</html>
index f6097a5..74e1467 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body class="admin">
-
+[%- USE HTML %]
   <h2>[% title %]</h2>
 
   <form method="post" action="admin.pl">
@@ -68,5 +67,3 @@
 
   <p>[% 'Leave host and port field empty unless you want to make a remote connection.' | $T8 %]</p>
 
-</body>
-</html>
index 31fffca..f832912 100644 (file)
@@ -1,8 +1,6 @@
 [%- USE T8 %]
 [%- USE HTML %]
 [%- USE LxERP %]
-<body class="admin">
-
   <h2>[% title %]</h2>
 
   <form method="post" action="admin.pl">
@@ -15,5 +13,3 @@
 
   </form>
 
-</body>
-</html>
index c3537da..6926c9c 100644 (file)
@@ -1,7 +1,6 @@
 [%- USE T8 %]
 [%- USE LxERP %]
-[% USE HTML %]<body class="admin">
-
+[%- USE HTML %]
   <h2>[% title %]</h2>
 
   <form method="post" action="admin.pl">
@@ -13,5 +12,3 @@
    <p><input type="submit" class="submit" name="action" value="[% 'Continue' | $T8 %]"></p>
   </form>
 
-</body>
-</html>
index b55a3d5..b88757a 100644 (file)
@@ -16,5 +16,3 @@
  <input type="submit" name="action" value="[% 'Continue' | $T8 %]">
 </form>
 
-</body>
-</html>
index 5db6ab3..2e891ee 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body class="admin">
-
+[%- USE HTML %]
  <h2>[% title %]</h2>
  <p><a href="admin.pl?action=pg_database_administration">[% 'Back' | $T8 %]</a></p>
  <form method="post" action="admin.pl">
@@ -28,5 +27,3 @@
 
  </form>
 
-</body>
-</html>
index a6d8bf0..591ae30 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
+[%- USE HTML %]
   <div class="listtop">[% 'Delete group' | $T8 %]: [% name %]</div>
   <p class="message_hint">[ [% name %] ] - [% 'Do you really want to delete this group?' | $T8 %]</p>
 
@@ -12,5 +12,3 @@
     <input type="submit" class="submit" name="action" value="[% 'Delete' | $T8 %]">
    </form>
 
- </body>
-</html>
index 3114b62..de6c8d7 100644 (file)
@@ -1,5 +1,4 @@
 [% USE T8 %][% USE HTML %][% USE L %][% USE LxERP -%]
-<body>
  [% L.stylesheet_tag('jquery.multiselect2side') %]
  [% L.javascript_tag('jquery.selectboxes', 'jquery.multiselect2side') %]
 
@@ -58,5 +57,3 @@
  </form>
 
  [% L.multiselect2side('user_ids_', labelsx => LxERP.t8('All users'), labeldx => LxERP.t8('Users in this group')) %]
-</body>
-</html>
index fe70347..662c040 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %][% USE LxERP %]<body>
+[%- USE HTML %][%- USE LxERP %]
 
  <div class="listtop">[% 'Edit group membership' | $T8 %]</div>
 
@@ -43,5 +43,3 @@
 
  </form>
 
-</body>
-</html>
index d893a58..ee6d9ef 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
+[%- USE HTML %]
 
   <div class="listtop">[% 'Edit groups' | $T8 %]</div>
   [% IF message %]
@@ -57,5 +57,4 @@
 
  </form>
 
-</body>
-</html>
+ <hr size="2" noshade>
index 6d72ca0..8db61d9 100644 (file)
@@ -1,8 +1,6 @@
 [%- USE T8 %]
 [%- USE HTML %]
 [%- USE L %]
-<body class="admin">
-
  <script type="text/javascript" src="js/common.js"></script>
  <script type="text/javascript" src="js/jquery.js"></script>
  <script type="text/javascript">
     -->
  </script>
 
-</body>
-</html>
index ea8e8d7..02a4706 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body class="admin" onload="">
-
+[%- USE HTML %]
  <h1>[% title %]</h1>
 
  <form method="post" action="admin.pl">
@@ -84,5 +83,3 @@
 
  <hr size="3" noshade>
 
-</body>
-</html>
index 2817315..7758fec 100644 (file)
@@ -1,5 +1,8 @@
 [%- USE T8 %]
-[% USE HTML %]<body class="admin" onload="document.getElementsByName('dbname')[0].focus(); ">
+[%- USE HTML %]
+  <script type='text/javascript'>
+    $(function(){ document.getElementsByName('dbname')[0].focus();});
+  </script>
 
  <h2>[% title %]</h2>
 
@@ -54,5 +57,3 @@
 
  </form>
 
-</body>
-</html>
index 0143fb4..baece7d 100644 (file)
@@ -13,5 +13,3 @@
   <input type="hidden" name="nextsub" value="list_users">
   <input type="submit" name="action" value="[% 'Continue' | $T8 %]">
  </form>
-</body>
-</html>
index ede5e7c..2cef649 100644 (file)
@@ -1,6 +1,4 @@
 [%- USE T8 %]
-<body class="admin">
-
  <h2>[% title %]</h2>
 
  <p>[%- 'The restoration process has started. Here\'s the output of the &quot;pg_restore&quot; command:' | $T8 %]</p>
index fc0b283..6559709 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
+[%- USE HTML %]
 
  <div class="listtop">[% title %]</div>
 
@@ -24,5 +24,3 @@
   </form>
  </p>
 
-</body>
-</html>
index 8a93f90..80fdd56 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body class="admin">
-
+[%- USE HTML %]
  <h2>[% title %]</h2>
  <p><a href="admin.pl?action=pg_database_administration">[% 'Back' | $T8 %]</a></p>
  [% IF ALL_UPDATED %]
@@ -53,5 +52,3 @@
 
  [% END %]
 
-</body>
-</html>
index ef34e55..b353452 100644 (file)
@@ -1,6 +1,6 @@
 [%- USE T8 %]
 [%- USE LxERP %]
-[% USE HTML %]<body>
+[%- USE HTML %]
 
  <div class="listtop">[% title %]</div>
 
@@ -22,5 +22,3 @@
 
  </form>
 
-</body>
-</html>
index 5f5114c..376a4b0 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
+[%- USE HTML %]
 
  <div class="listtop">[% title %]</div>
 
@@ -21,5 +21,3 @@
 
  </form>
 
-</body>
-</html>
index c20263c..99b6002 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
+[%- USE HTML %]
 
  <div class="listtop">[% title %]</div>
 
@@ -15,5 +15,3 @@
 
  </form>
 
-</body>
-</html>
index 6f50b64..7aef54d 100644 (file)
@@ -1,5 +1,4 @@
 [%- USE T8 %]
-<body>
 
 <form method=post>
 
@@ -37,5 +36,3 @@
 
 </form>
 
-</body>
-</html>
index 6ff4b5e..6a413d8 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
 
-<body>
 <form method='post'>
 
 <h1 class=listtop>[% title %]</h1>
@@ -40,5 +39,3 @@
  <input type="submit" name='get_login_form' value="[% 'Back' | $T8 %]">
  <input type="submit" name="add_printer" value ="[% 'Add' | $T8 %]">
 </form>
-</body>
-</html>
index 1675eab..761cc0e 100644 (file)
@@ -2,7 +2,6 @@
 [%- USE LxERP %]
 [%- USE T8 %]
 [%- USE L %]
-<body>
 
 <h1>[% title | html %]</h1>
 
@@ -23,5 +22,3 @@
 
 </form>
 
-</body>
-</html>
index 2da736f..4843f86 100644 (file)
@@ -2,7 +2,6 @@
 [%- USE L %]
 [%- USE LxERP %]
 [%- USE T8 %]
-<body>
 
 <h1>[% title | html %]</h1>
 
index bc4a8a2..7f5718d 100644 (file)
@@ -2,7 +2,6 @@
 [%- USE L %]
 [%- USE LxERP %]
 [%- USE T8 %]
-<body>
 
 <h1>[% title | html %]</h1>
 
@@ -62,5 +61,3 @@
 
   </form>
 
-  </body>
-  </html>
index 29a9687..387c18c 100644 (file)
@@ -1,7 +1,6 @@
 [%- USE T8 %]
 [%- USE LxERP %]
-[% USE HTML %][% USE L %]<body onLoad="fokus()">
-
+[%- USE HTML %][%- USE L %]
  <p>
   <div class="listtop">[% title %]</div>
  </p>
     -->
  </script>
 
-</body>
-</html>
index 541b29a..28dd70d 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
+[%- USE HTML %]
 
  <div class="listtop">[% title %]</div>
 
@@ -18,5 +18,4 @@
   <input type="submit" class="submit" name="action" value="[% 'Delete' | $T8 %]">
  </form>
 
-</body>
 </form>
index 76a08e4..dcf0be0 100644 (file)
@@ -8,12 +8,11 @@
 </script>
 
 <script type="text/javascript">
-window.onload = function() {
+$(function() {
     setupDependencies('EditAccount'); //name of form(s). Seperate each with a comma (ie: 'weboptions', 'myotherform' )
-  };
+});
 </script>
 
-<body>
 <form method="post" name="EditAccount" action="am.pl">
 
 <input type="hidden" name="id"                 value="[% HTML.escape(id) %]">
index 5b6d40a..05351ff 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
+[%- USE HTML %]
 
  <div class="listtop">[% title %]</div>
 
   </p>
  </form>
 
-</body>
-</html>
index 105f8b3..dc00c7c 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
+[%- USE HTML %]
 
  [% IF MESSAGE %]<p>[% MESSAGE %]</p>[% END %]
 
@@ -11,7 +11,7 @@
    <table border="0">
     <tr>
      <td align="right">[% 'Description' | $T8 %]</td>
-     <td><input name="description" value="[% HTML.escape(description) %]"></td>
+     <td><input id="description" name="description" value="[% HTML.escape(description) %]"></td>
     </tr>
 
     <tr>
@@ -32,5 +32,3 @@
   </p>
  </form>
 
-</body>
-</html>
index c495e69..832bd0f 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
+[%- USE HTML %]
  <form method="post" action="am.pl">
   <input type="hidden" name="id" value="[% HTML.escape(id) %]">
   <input type="hidden" name="type" value="tax">
@@ -47,6 +47,4 @@
   [% END %]
 
 </form>
-</body>
-</html>
 
index bbce544..220b9ec 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
+[%- USE HTML %]
 
  <h1>[% title %]</h1>
 
@@ -53,7 +53,7 @@
    </p>
 
    [% IF CAN_EDIT %]
-    <p><textarea name="content" id="content" cols="100" rows="25">[% HTML.escape(content) %]</textarea></p>
+    <p><textarea name="content" id="edit_content" cols="100" rows="25">[% HTML.escape(content) %]</textarea></p>
 
     <p>
      <input type="hidden" name="save_nextsub" value="save_template">
@@ -79,5 +79,3 @@
 
  </form>
 
-</body>
-</html>
index c9495e1..8384d44 100644 (file)
@@ -3,7 +3,6 @@
 
 <script type="text/javascript" src="js/jquery-ui.js"></script>
 
-<body>
 
  [% IF saved_message %]
   <p>[% saved_message %]</p>
 
  [% L.sortable_element('#unit_list tbody', url => 'controller.pl?action=Unit/reorder', with => 'unit_id') %]
 
-</body>
-</html>
index c7ca819..2208de5 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body [% IF onload %]onload="[% onload %]"[% END %]>
-
+[%- USE HTML %]
  [% IF saved_message %]
   <p>[% saved_message %]</p>
  [% END %]
@@ -18,7 +17,7 @@
    <tr>
     <td align="right">[% 'Description' | $T8 %]</td>
     <td>
-     <input name="description" size="60" value="[% HTML.escape(description) %]">
+     <input id='description' name="description" size="60" value="[% HTML.escape(description) %]">
      <input type="hidden" name="orig_description" value="[% HTML.escape(description) %]">
     </td>
    </tr>
 
  [% END %]
 
-</body>
-</html>
index 99ec45f..e446f43 100644 (file)
@@ -2,7 +2,6 @@
 [%- USE HTML %]
 [%- USE LxERP %]
 [%- USE T8 %]
-<body>
 
 <form method=post action=am.pl>
 
index a49d18e..30f8080 100644 (file)
@@ -2,7 +2,6 @@
 [%- USE L %]
 [%- USE LxERP %]
 [%- USE T8 %]
-<body>
 
 <h1>[% title | html %]</h1>
 
@@ -48,5 +47,3 @@
 
   </form>
 
-  </body>
-  </html>
index 2287eb6..1a0b033 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE HTML %]
 [%- USE T8 %]
-<body>
 
 <form method=post action=am.pl>
 
index 2e2010e..5ccb55c 100644 (file)
@@ -2,7 +2,6 @@
 [%- USE HTML %]
 [%- USE LxERP %]
 [%- USE L %]
-<body>
 
 <table width=100%>
   <tr>
@@ -31,5 +30,3 @@
 
   </form>
 
-  </body>
-  </html>
index 358f18f..0938a45 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
 [%- USE HTML %]
-<body>
  <h1>[% title %]</h1>
 
  <table width="100%">
@@ -43,7 +42,6 @@
 
  </table>
 
-</body>
 <script type='text/javascript'>
   function account_details(id) {
     $.ajax({
@@ -57,4 +55,3 @@
 </script>
 
 
-</html>
index 0f3c013..863b1a1 100644 (file)
@@ -3,7 +3,6 @@
 
 <script type="text/javascript" src="js/jquery-ui.js"></script>
 
-<body>
 
  [% IF MESSAGE %]<p>[% MESSAGE %]</p>[% END %]
 
@@ -44,5 +43,3 @@
 
  [% L.sortable_element('#price_factor_list tbody', url => 'controller.pl?action=PriceFactor/reorder', with => 'price_factor_id') %]
 
-</body>
-</html>
index 3d24b51..b5d43bc 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
+[%- USE HTML %]
 
  <div class="listtop">[% title %]</div>
 
@@ -32,6 +32,4 @@
   </form>
  </p>
 
-</body>
-</html>
 
index d4e0e0f..65a9a73 100644 (file)
@@ -3,7 +3,6 @@
 
 <script type="text/javascript" src="js/jquery-ui.js"></script>
 
-<body>
 
  [% IF saved_message %]<p>[% saved_message %]</p>[% END %]
 
@@ -41,5 +40,3 @@
 
  [% L.sortable_element('#warehouse_list tbody', url => 'controller.pl?action=Warehouse/reorder', with => 'warehouse_id') %]
 
-</body>
-</html>
index 3eccf69..6c2ebe1 100644 (file)
@@ -1,5 +1,8 @@
 [%- USE T8 %]
-[% USE HTML %]<body onload="document.Form.name.focus();">
+[%- USE HTML %]
+  <script type='text/javascript'>
+    $(function(){document.Form.name.focus();});
+  </script>
 
  <style type="text/css">
   .small {
 
  </form>
 
-</body>
-</html>
index 4c76eb6..0a237d4 100644 (file)
@@ -3,7 +3,6 @@
 
 <script type="text/javascript" src="js/jquery-ui.js"></script>
 
-<body>
 
  [% IF MESSAGE %]<p>[% MESSAGE %]</p>[% END %]
 
@@ -95,5 +94,3 @@
 
  [% L.sortable_element('#cvarcfg_list tbody', url => 'controller.pl?action=CustomVariableConfig/reorder', with => 'cvarcfg_id') %]
 
-</body>
-</html>
index 466ab34..8ac37ec 100644 (file)
@@ -66,5 +66,3 @@ function set_duedate() {
 </script>
 
 
-</body>
-</html>
index fb29079..99898a6 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
 [%- USE L %]
-<body>
 
  <form method=post name="search" action=[% script %]>
 
@@ -14,6 +13,7 @@
       <th align=right>[% 'Vendor' | $T8 %]</th>
       <td colspan=3>
             [%- INCLUDE 'generic/multibox.html'
+                 id            = 'vendor',
                  name          = 'vendor',
                  default       = oldvendor,
                  style         = 'width: 250px',
    <br>
    <input class=submit type=submit name=action value="[% 'Continue' | $T8 %]">
   </form>
- </body>
- <script type="text/javascript">
- <!--
-   $(document).ready(function(){
-    focus();
-    setupDateFormat('[% dateformat | html %]','[% 'Falsches Datumsformat!' | $T8 %]');
-    setupPoints('[% numberformat | html %]','[% 'wrongformat' | $T8 %]');
-   })
- //-->
- </script>
-</html>
index 0e65ea9..363bb9d 100644 (file)
@@ -3,8 +3,6 @@
 [%- USE T8 %]
 [%- USE LxERP %]
 
-<body onLoad="[% onload %]">
-
 <form method=post name="arledger" action="[% script %]">
 
 [% L.hidden_tag('id', id) %]
@@ -34,9 +32,9 @@
                 <th align="right" nowrap>[% 'Customer' | $T8 %]</th>
                 <td colspan=3>
 [%- IF selectcustomer %]
-    <select name="customer" onchange="document.getElementById('update_button').click();">[% selectcustomer %]</select>
+    <select id='customer' name="customer" onchange="document.getElementById('update_button').click();">[% selectcustomer %]</select>
 [%- ELSE %]
-    <input name=customer value="[% customer | html %]" size=35>
+    <input id='customer' name=customer value="[% customer | html %]" size=35>
 [%- END %]
                 <input type="button" value="[% 'Details (one letter abbreviation)' | $T8 %]" onclick="show_vc_details('customer')"></td>
                 [% L.hidden_tag('selectcustomer', selectcustomer) %]
index 89cb50c..07f2fc1 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
 [%- USE L %]
-<body>
 
  <form method=post name="search" action=[% script %]>
 
  <!--
    $(document).ready(function(){
     $('customer').focus();
-    setupDateFormat('[% dateformat | html %]','[% 'Falsches Datumsformat!' | $T8 %]');
-    setupPoints('[% numberformat | html %]','[% 'wrongformat' | $T8 %]');
    })
  //-->
  </script>
- </body>
-</html>
index f3fb66e..ffd0b86 100644 (file)
@@ -2,7 +2,6 @@
 [%- USE T8 %]
 [%- USE L  %]
 [%- USE LxERP %]
-<body>
 
 <h1>[% 'Select from one of the projects below' | $T8 %]</h1>
 
@@ -35,5 +34,3 @@
 
 </form>
 
-</body>
-</html>
index 737a49e..90eecd0 100644 (file)
@@ -1,5 +1,4 @@
 [% USE HTML %][% USE L %][% USE LxERP %]
-<body>
 
  <h1>[% FORM.title %]</h1>
 
@@ -54,5 +53,3 @@
    <a href="[% SELF.url_for(action => 'list') %]">[%- LxERP.t8('Abort') %]</a>
   </p>
  </form>
-</body>
-</html>
index b8ea3f6..b3d53ea 100644 (file)
@@ -1,6 +1,5 @@
 [% USE HTML %][% USE L %][% USE LxERP %]
 
-<body>
  <h1>[% FORM.title %]</h1>
 
 [%- INCLUDE 'common/flash.html' %]
@@ -76,5 +75,3 @@
    <a href="[% SELF.url_for(controller => 'TaskServer', action => 'show') %]">[%- LxERP.t8('Task server control') %]</a>
   </p>
  </form>
-</body>
-</html>
index bf732d4..e044a7a 100644 (file)
@@ -1,6 +1,5 @@
 [% USE HTML %][% USE L %][% USE LxERP %]
 
-<body>
  <h1>[% FORM.title %]</h1>
 
 [%- INCLUDE 'common/flash.html' %]
@@ -59,5 +58,3 @@
    <a href="[% SELF.url_for(controller => 'TaskServer', action => 'show') %]">[%- LxERP.t8('Task server control') %]</a>
   </p>
  </form>
-</body>
-</html>
index e9df400..5e42d08 100644 (file)
@@ -1,5 +1,4 @@
 [% USE HTML %][% USE L %][% USE LxERP %]
-<body>
 
  <h1>[% FORM.title %]</h1>
 
@@ -50,5 +49,3 @@
  <p>
   <a href="[% back_to %]">[%- LxERP.t8('Back') %]</a>
  </p>
-</body>
-</html>
index b124682..ef4febe 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
 [% USE HTML %]
-<body>
 
 [%- IF params.error %]
  <p><div class="message_error">[% params.error %]</div></p>
@@ -67,5 +66,3 @@
   </p>
  </form>
 
-</body>
-</html>
index eaa86fd..0b6778b 100644 (file)
@@ -5,7 +5,6 @@
 [%- USE url %]
 [%- SET list_spool__callback = href _ '&sort=' _ sort %]
 [% L.javascript_tag('jquery.checkall') %]
-<body>
 
 <h1>[% title | html %]</h1>
 
@@ -81,5 +80,3 @@
 
 </form>
 
-</body>
-</html>
index cc163ef..6fd9767 100644 (file)
@@ -2,7 +2,6 @@
 [%- USE T8 %]
 [%- USE LxERP %]
 [%- USE HTML %]
-<body>
 <form method=post action=bp.pl>
 
 <h1>[% 'Print' | $T8 %] [% label.$type.title %]</h1>[% L.hidden_tag('title', LxERP.t8('Print') _ ' ' _ label.$type.title) %]
@@ -83,6 +82,4 @@
 
 </form>
 
-</body>
 
-</html>
index 01d5726..590b1d3 100644 (file)
@@ -1,5 +1,4 @@
 [% USE HTML %][% USE L %][% USE LxERP %]
-<body>
 
  <form method="post" action="controller.pl">
   <div class="listtop">[% FORM.title %]</div>
@@ -40,5 +39,3 @@
    <a href="[% SELF.url_for(action => 'list') %]">[%- LxERP.t8('Abort') %]</a>
   </p>
  </form>
-</body>
-</html>
index 80bfed7..c3f3a99 100644 (file)
@@ -1,6 +1,5 @@
 [% USE HTML %][% USE L %][% USE LxERP %]
 
-<body>
  <div class="listtop">[% FORM.title %]</div>
 
 [%- INCLUDE 'common/flash.html' %]
@@ -49,5 +48,3 @@
    <a href="[% SELF.url_for(action => 'new') %]">[%- LxERP.t8('Create new business') %]</a>
   </p>
  </form>
-</body>
-</html>
index 3189dce..82cd180 100644 (file)
@@ -2,9 +2,6 @@
 [% USE T8 %]
 [% USE HTML %]
 [% USE LxERP %]
-
-<body onLoad="[% onload %]">
-
 <form method=post action="[% script %]">
 
 [% L.hidden_tag('accno', accno) %]
@@ -92,5 +89,3 @@
 <br>[% L.submit_tag('action', LxERP.t8('List Transactions')) %]
 </form>
 
-</body>
-</html>
index a0abdc2..89c2f45 100644 (file)
@@ -23,7 +23,6 @@
  <hr>
 [% END %]
 
-<body>
 
  <div width="100%" class="listtop">
   [% IF is_customer %][% 'Customer details' | $T8 %][% ELSE %][% 'Vendor details' | $T8 %][% END %] &quot;[% HTML.escape(name) %]&quot;
 
  [% END %]
 
-</body>
-</html>
index 9197646..e675105 100644 (file)
@@ -11,5 +11,3 @@
 <input class=submit type=submit name=action value="[% 'Post' | $T8 %]">
  </form>
 
-</body>
-</html>
index c513eca..4d24a8a 100644 (file)
@@ -2,8 +2,6 @@
 [%- USE HTML %]
 [%- USE T8 %]
 [%- USE LxERP %]
-<body onload=[% onload %]>
-
 <form method=post action=cp.pl>
 
 [% L.hidden_tag('defaultcurrency', defaultcurrency) %]
index e499e80..beb09a0 100644 (file)
@@ -43,8 +43,7 @@
 <tr>
  <th align="right" valign="top">[%- LxERP.t8('Default buchungsgruppe') %]:</th>
  <td colspan="10" valign="top">
-  [% opts = SELF.all_buchungsgruppen, title_key = 'description', default = SELF.profile.get('default_buchungsgruppe') %]
-  [% L.select_tag('settings.default_buchungsgruppe', opts, style => 'width: 300px') %]
+  [% L.select_tag('settings.default_buchungsgruppe', SELF.all_buchungsgruppen, title_key = 'description', default = SELF.profile.get('default_buchungsgruppe'), style => 'width: 300px') %]
   <br>
   [% opts = [ [ 'never', LxERP.t8('Do not set default buchungsgruppe') ], [ 'all', LxERP.t8('Apply to all parts') ], [ 'missing', LxERP.t8('Apply to parts without buchungsgruppe') ] ] %]
   [% L.select_tag('settings.apply_buchungsgruppe', opts, default = SELF.profile.get('apply_buchungsgruppe'), style = 'width: 300px') %]
@@ -54,7 +53,6 @@
 <tr>
  <th align="right" valign="top">[%- LxERP.t8('Default unit') %]:</th>
  <td colspan="10" valign="top">
-  [% opts = SELF.all_units, title_key = 'name', value_key = 'name', default = SELF.profile.get('default_unit') %]
-  [% L.select_tag('settings.default_unit', opts, style => 'width: 300px') %]
+  [% L.select_tag('settings.default_unit', SELF.all_units, title_key='name', value_key='name', default=SELF.profile.get('default_unit'), style = 'width: 300px') %]
  </td>
 </tr>
index 4d6618b..c8e6721 100644 (file)
@@ -2,7 +2,6 @@
 [%- USE LxERP %]
 [%- USE L %]
 [%- USE T8 %]
-<body>
 
  <div class="listtop">[% FORM.title %]</div>
 
     });
     -->
  </script>
-</body>
-</html>
index bfa4f37..6b22e47 100644 (file)
 
     </table>
 
-[% IF cp_id %]
-    <input type="submit" id="delete_contact" name="action" value="[% 'Delete Contact' | $T8 %]">
-[% END %]
+    [% IF cp_id %]
+      <input type="button" id="delete_contact" onclick="submitInputButton(this);" name="action" value="[% 'Delete Contact' | $T8 %]">
+    [% END %]
 
     <br style="clear: left" />
index cab0f8e..652d6df 100644 (file)
       function enable_delete_shipto(used) { var s=document.getElementById('delete_shipto');  if (s) s.disabled = (used > 0 ? true : false); }
       function enable_delete_contact(used){ var s=document.getElementById('delete_contact'); if (s) s.disabled = (used > 0 ? true : false); }
 
+      function submitInputButton(button)
+      {
+        var hidden = document.createElement("input");
+        hidden.setAttribute("type", "hidden");
+
+        if( button.hasAttribute("name") )
+          hidden.setAttribute("name", button.getAttribute("name"));
+
+        if( button.hasAttribute("value") )
+          hidden.setAttribute("value", button.getAttribute("value"));
+
+
+        button.form.appendChild(hidden);
+
+        button.disabled = true;
+
+        button.form.submit();
+      }
+
       var maintab = new ddtabcontent("maintab");
       maintab.setpersist(true);
       maintab.setselectedClassTarget("link"); //"link" or "linkparent"
@@ -53,5 +72,3 @@
 
     -->
  </script>
-</body>
-</html>
index 8530b1e..43f64b0 100644 (file)
@@ -1,7 +1,6 @@
 [%- USE T8 %]
 [% USE HTML %][% USE LxERP %]
 [% USE L %]
-<body>
 
  <h1>[% title %]</h1>
 
index eeea49a..2d78134 100644 (file)
@@ -1,7 +1,6 @@
 [%- USE T8 %]
 [%- USE L %]
-[% USE HTML %]<body onload="fokus()">
-
+[%- USE HTML %]
  <form method="post" action="ct.pl" name="Form">
 
   <input type="hidden" name="db" value="[% HTML.escape(db) %]">
@@ -16,7 +15,7 @@
 
    <tr>
     <th align="right" nowrap>[% IF IS_CUSTOMER %][% 'Customer Name' | $T8 %][%- ELSE %][% 'Vendor Name' | $T8 %][%- END %]</th>
-    <td><input name="name" size="35"></td>
+    <td><input id="name" name="name" size="35"></td>
    </tr>
 
    <tr>
   <input type="submit" class="submit" name="action" value="[% 'Continue' | $T8 %]">
  </form>
 
-</body>
-</html>
index 0f7c127..f7d291b 100644 (file)
@@ -1,7 +1,5 @@
 [%- USE HTML %]
 [%- USE T8 %]
-<body onload="fokus()">
-
  <form method="post" action="ct.pl" name="Form">
 
   <input type="hidden" name="db" value="[% db | html %]">
   <input type="submit" class="submit" name="action" value="[% 'Continue' | $T8 %]">
  </form>
 
-</body>
-</html>
index 49c0f77..5b79f97 100644 (file)
@@ -1,5 +1,4 @@
 [%- USE T8 %]
-<body>
 
 <form method=post action='[% script %]'>
 
@@ -65,5 +64,3 @@
 <input type=submit class=submit name=action value="[% 'Continue' | $T8 %]">
 </form>
 
-</body>
-</html>
index 8b38948..9c69bf1 100644 (file)
@@ -1,7 +1,6 @@
 [%- USE T8 %]
 [%- USE HTML %]
 <html>
-<body>
   Export in Bearbeitung<br>
 
   <br>
@@ -20,5 +19,3 @@
 %]
 [% END %]
 
-</body>
-</html>
index 89f81a1..b1ffef8 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
 [%- USE L %]
-<body>
 
 <form method=post action="[% script %]">
 
@@ -80,5 +79,3 @@
 <input type=submit class=submit name=action value="[% 'Continue' | $T8 %]">
 </form>
 
-</body>
-</html>
index 03cc368..d6ea250 100644 (file)
@@ -1,5 +1,4 @@
 [%- USE T8 %]
-<body>
 
 <form method=post action="[% script %]">
 <table width=100%>
@@ -45,5 +44,3 @@
 <input type=submit class=submit name=action value="[% 'Continue' | $T8 %]">
 </form>
 
-</body>
-</html>
index f9dba70..a6e26c6 100644 (file)
@@ -1,12 +1,10 @@
 [%- USE T8 %]
 [% USE HTML %]<p>[% '...done' | $T8 %]</p>
 
-<form action="[% IF is_admin %]admin.pl[% ELSE %][% menufile %][% END %]">
+<form action="[% IF is_admin %]admin.pl[% ELSE %][% login.pl %][% END %]">
 
- <input type="hidden" name="action" value="[% IF is_admin %]login[% ELSE %]display[% END %]">
+ <input type="hidden" name="action" value="[% IF is_admin %]login[% ELSE %]company_logo[% END %]">
 
  <p><input type="submit" value="[% 'Continue' | $T8 %]"></p>
 </form>
 
-</body>
-</html>
index 09d840b..285fb83 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
+[%- USE HTML %]
 
  <table width="100%">
   <tr>
index d009ea0..81eb941 100644 (file)
@@ -1,6 +1,5 @@
 [% USE HTML %][% USE T8 %][% USE L %][% USE LxERP %]
 [% SET is_used = SELF.department.is_used %]
-<body>
 
  <form method="post" action="controller.pl">
   <div class="listtop">[% FORM.title %]</div>
@@ -24,5 +23,3 @@
    <a href="[% SELF.url_for(action => 'list') %]">[%- 'Abort' | $T8 %]</a>
   </p>
  </form>
-</body>
-</html>
index 7433aa9..5406f63 100644 (file)
@@ -1,6 +1,5 @@
 [% USE HTML %][% USE T8 %][% USE L %][% USE LxERP %]
 
-<body>
  <div class="listtop">[% FORM.title %]</div>
 
 [%- INCLUDE 'common/flash.html' %]
@@ -39,5 +38,3 @@
    <a href="[% SELF.url_for(action => 'new') %]">[%- 'Create new department' | $T8 %]</a>
   </p>
  </form>
-</body>
-</html>
index 9cd3592..252463e 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %][% USE LxERP %]<body>
+[%- USE HTML %][%- USE LxERP %]
 
  <div class="listtop">[% 'Delete delivery order' | $T8 %]</div>
 
@@ -19,5 +19,3 @@
   <input name="action" class="submit" type="submit" value="[% 'No' | $T8 %]">
  </form>
 
-</body>
-</html>
index cc7d34b..a37e942 100644 (file)
@@ -1,9 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %][% USE LxERP %]<!-- <body> -->
-<!--  <form> -->
-<!--   <p> -->
-<!--    <table> -->
-
+[% USE HTML %][% USE LxERP %]
  [%- IF delivered %]
  [%- SET RO = ' readonly' %]
  [%- END %]
     }
   }
 </script>
-</body>
-</html>
index 848fa89..ef41502 100644 (file)
@@ -2,8 +2,6 @@
 [%- USE HTML %]
 [%- USE LxERP %]
 [%- USE L %]
-<body onload="on_load()">
-
  <script type="text/javascript" src="js/show_form_details.js"></script>
  <script type="text/javascript" src="js/show_history.js"></script>
  <script type="text/javascript" src="js/show_vc_details.js"></script>
  <script type="text/javascript" src="js/stock_in_out.js"></script>
  <script type="text/javascript" src="js/follow_up.js"></script>
 
- <script type="text/javascript">
-  <!--
-      function on_load() {
-        [% IF onload %][% onload %];[% END %]
-        setupDateFormat('[% myconfig_dateformat %]', '[% 'Falsches Datumsformat!' | $T8 %]');
-        setupPoints('[% myconfig_numberformat %]', '[% 'wrongformat' | $T8 %]');
-      }
-    -->
- </script>
-
  <style type="text/css">
   .fixed_width {
     width: 250px;
index f7ab5d5..6e1bedc 100644 (file)
@@ -1,7 +1,6 @@
 [%- USE T8 %]
 [%- USE L %]
-[% USE HTML %][% USE LxERP %]<body onload="on_load();">
-
+[%- USE HTML %][%- USE LxERP %]
  [%- IF vc == 'customer' %]
  [%- SET is_customer = '1' %]
  [%- ELSE %]
@@ -9,11 +8,7 @@
  [%- END %]
 
  <script type="text/javascript">
-  <!--
-      function on_load() {
-        document.Form.donumber.focus();
-      }
-    -->
+   $(function(){ document.Form.donumber.focus(); });
  </script>
 
  <style type="text/css">
    <input class="submit" type="submit" name="action" value="[% 'Continue' | $T8 %]">
   </p>
  </form>
-
-</body>
-</html>
index 8110594..b3a5250 100644 (file)
@@ -1,18 +1,16 @@
 [% USE HTML %]
 [% USE L %]
 [% L.javascript_tag('jquery') %]
-<body onload="on_load();">
-
  <script type="text/javascript">
   <!--
-      function on_load() {
+      $(function(){
         var row = $('#row').attr('value');
         window.opener.document.getElementsByName("stock_" + $('#in_out').attr('value') + "_" + row)[0].value = $('#stock').attr('value');
         $(window.opener.document.getElementById("stock_in_out_qty_display_" + row)).html($('#qty_display').attr('value'));
         $(window.opener.document.getElementById("stock_in_out_qty_matches_" + row)).val([% qty_matches %]);
 
         window.close();
-      }
+      });
     -->
  </script>
 
@@ -23,5 +21,3 @@
   <input type="hidden" name="qty_display" id="qty_display" value="[% HTML.escape(qty_display) %]">
  </form>
 
-</body>
-</html>
index 57bfc93..27457f3 100644 (file)
@@ -1,7 +1,6 @@
 [%- USE T8 %]
 [%- USE L %]
-[% USE HTML %][% USE LxERP %][% USE JavaScript %]<body[% UNLESS delivered %] onload="on_load();"[% END %]>
-
+[%- USE HTML %][%- USE LxERP %][%- USE JavaScript %]
  [%- UNLESS delivered %]
  <script type="text/javascript">
   <!--
@@ -29,7 +28,7 @@
         control.options[initial_bin_index].selected = true;
       }
 
-      function on_load() {
+      $(function(){
         [%- USE STOCK_INFO_it = Iterator(STOCK_INFO) %][%- FOREACH si = STOCK_INFO_it %]
           // new si for wh [% si.warehouse_id %] bin [% si.bin_id %]
           [%- SET warehouse_selected = '0' %]
@@ -47,7 +46,7 @@
           warehouse_selected([% STOCK_INFO_it.count %], 0);
           [%- END %]
         [%- END %]
-      }
+      });
     -->
  </script>
  [%- END %]
    [%- END %]
   </p>
  </form>
-</body>
-</html>
 
index f9ffbba..6aee351 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %][% USE LxERP %]<body>
+[%- USE HTML %][%- USE LxERP %]
 
  [%- IF delivered %]
  [%- SET RO = ' readonly' %]
   [%- END %]
  </form>
 
-</body>
-</html>
 
index 13aae21..87af688 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
+[%- USE HTML %]
 
  <form action="[% HTML.escape(script) %]" method="post">
 
@@ -49,5 +49,3 @@
   </table>
 
  </form>
-</body>
-</html>
index aaf04ac..ed75369 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
+[%- USE HTML %]
 
  <form action="[% HTML.escape(script) %]" method="post">
 
@@ -30,5 +30,3 @@
   </table>
 
  </form>
-</body>
-</html>
index da8d947..c58651e 100644 (file)
@@ -1,17 +1,5 @@
 [%- USE T8 %]
 [% USE HTML %]<script type="text/javascript" src="js/common.js"></script>
-<script type="text/javascript">
- <!--
-     function setup_controls() {
-       fokus();
-       setupDateFormat('[% myconfig_dateformat %]', '[% 'Wrong date format!' | $T8 %]');
-       setupPoints('[% myconfig_numberformat %]', '[% 'wrongformat' | $T8 %]');
-     }
-   -->
-</script>
-
-<body onLoad="setup_controls();">
-
  <div class="listtop">[% title %]</div>
 
  <form method="post" name="search" action="dn.pl">
@@ -94,6 +82,4 @@
 
  </form>
 
-</body>
 
-</html>
index b539ad9..3dabbfa 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
+[%- USE HTML %]
  <script type="text/javascript" src="js/common.js"></script>
  <script type="text/javascript" src="js/dunning.js"></script>
 
   <input class="submit" type="submit" name="action" value="[% 'Save' | $T8 %]">
 
  </form>
-</body>
 
-</html>
index 5d3bfdf..1873788 100644 (file)
@@ -1,8 +1,6 @@
 [%- USE T8 %]
 [%- USE HTML %]
 [%- USE L %]
-<body onLoad="[% onload %]">
-
  <script type="text/javascript" src="js/common.js"></script>
 
  <form method="post" name="search" action="dn.pl">
        <th align="right">[% 'Customer' | $T8 %]</th>
        <td colspan="3">
         [% IF SHOW_CUSTOMER_DDBOX %]
-         <select name="customer_id">
+         <select id='customer' name="customer_id">
           <option value=""></option>
           [% FOREACH row = ALL_CUSTOMERS %]<option value="[% HTML.escape(row.id) %]">[% HTML.escape(row.name) %]</option>
           [% END %]
          </select>
          [% ELSE %]
-         <input name="customer" size="35">
+         <input id='customer' name="customer" size="35">
         [% END %]
        </td>
       </tr>
   <input class="submit" type="submit" name="action" value="[% 'Continue' | $T8 %]">
 
  </form>
-</body>
 
-</html>
index 1b96ed9..e2d558d 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body onload="[% onload %]">
-
+[%- USE HTML %]
  <script type="text/javascript">
   <!--
       function email_updated() {
@@ -39,5 +38,3 @@
   <button type="button" onclick="email_updated()">[% 'Save and close' | $T8 %]</button>
 
  </form>
-</body>
-</html>
index 2f05d15..ee85ec0 100644 (file)
@@ -2,7 +2,7 @@
 [% USE HTML %]  <input type="hidden" name="rowcount" value="[% rowcount %]">
 
   <p>
-    <input type="checkbox" name="force_lang" size="6" value="1" onclick="document.getElementsByName('language_id')[0].disabled = !document.getElementsByName('force_lang')[0].checked;">
+    <input type="checkbox" id='force_lang' name="force_lang" size="6" value="1">
     [% 'Override invoice language' | $T8 %]
     [% PRINT_OPTIONS %]
   </p>
@@ -15,3 +15,7 @@
   </p>
 
  </form>
+ <script type='text/javascript'>
+   $(function(){$("select[name='language_id']").attr('disabled', $('#force_lang').attr('checked') ? '' : 'disabled')})
+   $('#force_lang').click(function(){ $('select[name="language_id"]').attr('disabled', $('#force_lang').attr('checked') ? '' : 'disabled') })
+ </script>
index 99e2dfb..ce7579b 100644 (file)
@@ -4,8 +4,6 @@
 [% L.javascript_tag('jquery.checkall') %]
 [% SET all_active = 1 %][% FOREACH row = DUNNINGS %][% IF !row.active %][% SET all_active = 0 %][% LAST %][% END %][% END %]
 [% SET all_email = 1 %][% FOREACH row = DUNNINGS %][% IF !row.email %][% SET all_email = 0 %][% LAST %][% END %][% END %]
-<body [% IF onload %] onload="[% onload %]"[% END %]>
-
  <script type="text/javascript" src="js/common.js"></script>
  <script type="text/javascript" src="js/dunning.js"></script>
 
@@ -77,7 +75,7 @@
 
   <hr size=3 noshade>
 
-  <input type="checkbox" name="force_lang" size="6" value="1" onclick="document.getElementsByName('language_id')[0].disabled = !document.getElementsByName('force_lang')[0].checked;">
+  <input type="checkbox" id='force_lang' name="force_lang" size="6" value="1">
   [% 'Override invoice language' | $T8 %]
   [% PRINT_OPTIONS %]
 
@@ -95,5 +93,8 @@
          [% UNLESS DEBUG_DUNNING %]onclick="this.disabled=true; this.value='[% 'The dunning process started' | $T8 %]'; document.Form.submit()"[% END %]>
 
  </form>
-</body>
-</html>
+ <script type='text/javascript'>
+   $(function(){$("select[name='language_id']").attr('disabled', $('#force_lang').attr('checked') ? '' : 'disabled')})
+   $('#force_lang').click(function(){ $('select[name="language_id"]').attr('disabled', $('#force_lang').attr('checked') ? '' : 'disabled') })
+ </script>
+
index 4beb3d6..72f954d 100644 (file)
@@ -1,13 +1,8 @@
 [%- USE T8 %]
 [%- USE L %]
-[% USE HTML %]<body onload="on_load();">
-
+[%- USE HTML %]
  <script type="text/javascript">
-  <!--
-      function on_load() {
-        document.Form.subject.focus();
-      }
-    -->
+   $(function(){ document.Form.subject.focus(); });
  </script>
 
  <form action="fu.pl" method="post" name="Form">
   <input type="hidden" name="trans_rowcount" value="[% LINKS.size %]">
  </form>
 
-</body>
-</html>
index d166865..0a91a41 100644 (file)
@@ -1 +1 @@
-<body onload="window.close()"></body></html>
+<script type='text/javascript'>$(function(){ window.close() })</script>
index 2c80715..999f5a5 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
 [% USE HTML %]
-<body>
 
  [%- IF SAVED_MESSAGE %]
  <p>[% SAVED_MESSAGE %]</p>
@@ -44,5 +43,3 @@
   </p>
 
  </form>
-</body>
-</html>
index e818633..a068311 100644 (file)
@@ -7,7 +7,6 @@
  <input type="hidden" name="callback" value="[% HTML.escape(callback) %]">
  <input type="hidden" name="rowcount" value="[% FOLLOW_UPS.size %]">
 
- <p>
   <table width="100%">
    <tr>
     <td class="listheading">&nbsp;</td>
     </td>
     <td>[% HTML.escape(row.follow_up_date) %]</td>
     <td>[% HTML.escape(row.created_on) %]</td>
-    <td><a href="[% edit_url %][% HTML.escape(row.id) %]">[% HTML.escape(row.subject) %]</a></td>
-    <td>[% IF row.reference_link %]<a href="[% row.reference_link %]">[% END %][% HTML.escape(row.reference) %][% IF row.reference_link %]</a>[% END %]</td>
+    <td><a href="[% edit_url | html %][% HTML.escape(row.id) %]">[% HTML.escape(row.subject) %]</a></td>
+    <td>[% IF row.reference_link %]<a href="[% row.reference_link | html %]">[% END %][% HTML.escape(row.reference) %][% IF row.reference_link %]</a>[% END %]</td>
     <td>[% HTML.escape(row.created_by_name) %]</td>
    </tr>
    [%- END %]
   </table>
- </p>
 
  <p>
   <input type="hidden" name="action" value="dispatcher">
index 576bfdf..3b9fcee 100644 (file)
@@ -1,14 +1,8 @@
 [%- USE T8 %]
 [%- USE L %]
 [% USE HTML %]
-<body onload="on_load()">
-
  <script type="text/javascript">
-  <!--
-      function on_load() {
-        document.Form.subject.focus();
-      }
-    -->
+   $(function(){ document.Form.subject.focus(); });
  </script>
 
  <div class="listtop">[% title %]</div>
   </p>
  </form>
 
-</body>
-</html>
index 73dd750..97e9e42 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body onload="[% onload %]">
-
+[%- USE HTML %]
  <form name="Form">
 
   <input type="hidden" name="input_name" value="[% HTML.escape(input_name) %]">
@@ -87,5 +86,3 @@
    }
  </script>
 
-</body>
-</html>
index f3cdbcd..49ccd3c 100644 (file)
@@ -1,7 +1,5 @@
 [%- USE T8 %]
 [%- USE HTML %]
-<body[% IF onload %] onload="[% onload %]"[% END %]>
-
  <form method="post">
 
   <input type="hidden" name="input_name" value="[% HTML.escape(input_name) %]">
       //-->
  </script>
 
-</body>
-</html>
index 9aec0ca..b8303a0 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body onload="fokus()">
-
+[%- USE HTML %]
 <form name="Form" method="post" action="[% script %]">
 
 <table width="100%">
@@ -15,7 +14,7 @@
         <tr>
           <th align="right" nowrap>[% 'To' | $T8 %]</th>
 
-          <td><input name="email" size="30" value="[% HTML.escape(email) %]"></td>
+          <td><input id="email" name="email" size="30" value="[% HTML.escape(email) %]"></td>
         </tr>
         <tr>
           <th align="right" nowrap>[% 'Cc' | $T8 %]</th>
@@ -29,7 +28,7 @@
         <tr>
           <th align="right" nowrap>[% 'Subject' | $T8 %]</th>
 
-          <td><input name="subject" size="30" value="[% HTML.escape(subject) %]"></td>
+          <td><input id="subject" name="subject" size="30" value="[% HTML.escape(subject) %]"></td>
         </tr>
         <tr>
           <th align="right" nowrap>[% 'Attachment name' | $T8 %]</th>
@@ -72,5 +71,3 @@
 <input name="action" class="submit" type="submit" value="[% 'Continue' | $T8 %]">
 </form>
 
-</body>
-</html>
index 7778152..47defef 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
+[%- USE HTML %]
 
  <div class="message_error">[% IF title_error %][% title_error %][% ELSE %][% 'Error!' | $T8 %][% END %]
  <p class="message_error_label">[% label_error %]</p>
@@ -34,5 +34,3 @@
 
  [%- END %]
 
-</body>
-</html>
index 7c6deb9..8b70d41 100644 (file)
@@ -1,4 +1,5 @@
-[%- USE LxERP %][% USE HTML %]<body>
+[%- USE LxERP %]
+[%- USE HTML %]
 
  <h1 class="message_error">[%- LxERP.t8('Error!') %]</h1>
 
@@ -20,5 +21,3 @@
   </table>
  </div>
 
-</body>
-</html>
index a6f6bd7..c0f70a0 100644 (file)
@@ -1,13 +1,4 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
- <table width="100%">
-  <tr>
-   <th class="message_ok">[% IF title_information %][% title_information %][% ELSE %][% 'Information' | $T8 %][% END %]</th>
-  </tr>
-  <tr height="5"></tr>
+<div class="message_ok">[% IF title_information %][% title_information %][% ELSE %][% 'Information' | $T8 %][% END %]</div>
+<p>[% label_information %]</p>
 
-  <tr><td>[% label_information %]</td></tr>
- </table>
-
-</body>
-</html>
index 3d6fbe0..82b6f74 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]  <body>
+[%- USE HTML %]
 
     <h4 class="error">[% 'Item not on file!' | $T8 %]
 
@@ -22,6 +22,4 @@
       <input class="submit" type="submit" name="action_back_to_record" value="[% 'Back' | $T8 %]">
     </form>
 
-  </body>
-</html>
 
index ac4aa4a..3bca0a8 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body [% IF onload %]onload="[% onload %]"[% END %]>
-
+[%- USE HTML %]
  <form action="[% HTML.escape(script) %]" method="post" name="Form">
 
   <input type="hidden" name="input_partnumber" value="[% HTML.escape(input_partnumber) %]">
       //-->
  </script>
 
-</body>
-</html>
index 20858c1..9f8957e 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body onload="[% onload %]">
-
+[%- USE HTML %]
  <form name="Form">
 
   <input type="hidden" name="input_name" value="[% HTML.escape(input_name) %]">
@@ -62,5 +61,3 @@
       //-->
  </script>
 
-</body>
-</html>
index 324c473..f081041 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body [% IF onload %]onload="[% onload %]"[% END %]>
-
+[%- USE HTML %]
  <form method="post" action="[% HTML.escape(script) %]">
 
   <input type="hidden" name="nextsub" value="[% HTML.escape(nextsub) %]">
@@ -81,5 +80,3 @@
 
  </form>
 
-</body>
-</html>
index 35258df..e34bed9 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body onload="[% onload %]">
-
+[%- USE HTML %]
  <form name="Form">
 
   <input type="hidden" name="input_name" value="[% HTML.escape(input_name) %]">
@@ -62,5 +61,3 @@
       //-->
  </script>
 
-</body>
-</html>
index 72b50cd..1b4b9d0 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body onload="[% onload %]">
-
+[%- USE HTML %]
  <form name="Form">
 
   <input type="hidden" name="input_name" value="[% HTML.escape(input_name) %]">
@@ -24,5 +23,3 @@
     -->
  </script>
 
-</body>
-</html>
index 345886a..60d01ad 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
+[%- USE HTML %]
 
  <p>
   <div class="listtop">[% HTML.escape(title) %]</div>
@@ -44,5 +44,3 @@
 
  </form>
 
-</body>
-</html>
index c6acd84..c5658df 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
+[%- USE HTML %]
 
  <p>
   <div class="listtop">[% HTML.escape(title) %]</div>
@@ -42,5 +42,3 @@
 
  </form>
 
-</body>
-</html>
index e6ba49e..448b8a3 100644 (file)
@@ -2,8 +2,6 @@
 [%- USE LxERP %]
 [%- USE T8 %]
 [%- USE L %]
-<body onLoad="focus()">
-
 <script type="text/javascript">
   <!--
   function setTaxkey(row) {
index 9f7c45e..3f1fd40 100644 (file)
@@ -2,8 +2,6 @@
 [%- USE HTML %]
 [%- USE LxERP %]
 [%- USE L %]
-<body onLoad="[% onload %]">
-
 <form method=post action=gl.pl>
 
 <input type=hidden name=sort value=datesort>
 <input class=submit type=submit name=action value="[% 'Continue' | $T8 %]">
 </form>
 
-</body>
-</html>
index eb62525..7f8ea04 100644 (file)
@@ -1,7 +1,6 @@
 [%- USE T8 %]
 [%- USE HTML %]
 [%- USE LxERP %]
-<body>
 
  <form method="post" action="ic.pl">
 
@@ -35,5 +34,3 @@
   </p>
  </form>
 
-</body>
-</html>
index cc28548..910c91a 100644 (file)
@@ -1,7 +1,6 @@
 [%- USE T8 %]
 [%- USE HTML %]
 [%- USE LxERP %]
-<body>
 
  <form method="post" action="ic.pl">
 
@@ -22,5 +21,3 @@
    <input type="button" class="submit" onclick="history.back()" value="[% 'Back' | $T8 %]">
   </p>
  </form>
-</body>
-</html>
index 1ed3b36..4beaf5e 100644 (file)
@@ -1,8 +1,6 @@
 [%- USE T8 %]
 [%- USE HTML %]
 [%- USE LxERP %]
-<body onLoad="fokus()">
-
  <script type="text/javascript" src="js/common.js"></script>
  <script type="text/javascript" src="js/parts_language_selection.js"></script>
 
@@ -52,7 +50,7 @@
             <table>
              <tr>
               <th align="right">[% 'Part Number' | $T8 %]</th>
-              <td><input name="partnumber" value="[% HTML.escape(partnumber) %]" size="40"></td>
+              <td><input id='partnumber' name="partnumber" value="[% HTML.escape(partnumber) %]" size="40"></td>
              </tr>
              <tr>
               <th align="right">[% 'Part Description' | $T8 %]</th>
index 947f7d0..59fd2f6 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body onload="[% onload %]">
-
+[%- USE HTML %]
  <form name="Form">
 
   <input type="hidden" name="input_name" value="[% HTML.escape(input_name) %]">
@@ -66,5 +65,3 @@
       //-->
  </script>
 
-</body>
-</html>
index be2528c..ffdf29b 100644 (file)
@@ -2,7 +2,6 @@
 [%- USE HTML %]
 [%- USE LxERP %]
 [%- USE L %]
-<body>
 
  <form method="post" action="ic.pl">
 
           </td>
          </tr>
 
+         <tr>
+          <td>
+           <input name="l_notes" id="l_notes" class="checkbox" type="checkbox" value="Y">
+           <label for="l_notes">[% 'Notes' | $T8 %]</label>
+          </td>
+         </tr>
+
          [% CUSTOM_VARIABLES_INCLUSION_CODE %]
         </table>
        </td>
   </p>
  </form>
 
-</body>
-</html>
index a8ce648..e6eeb98 100644 (file)
@@ -1,7 +1,6 @@
 [%- USE T8 %]
 [%- USE HTML %]
 [%- USE LxERP %]
-<body>
 
  <form method="post" action="ic.pl">
 
   </p>
  </form>
 
-</body>
-</html>
index f57ef77..803e93e 100644 (file)
@@ -1,5 +1,4 @@
 [% USE LxERP %][% USE HTML %][% USE L %]
-<body>
 
  <div class="listtop">[% title %]</div>
 
@@ -41,5 +40,3 @@
 
   [% L.submit_tag('action', LxERP.t8('Continue')) %]
  </form>
-</body>
-</html>
index 318a5eb..10f0ce2 100644 (file)
@@ -1,5 +1,4 @@
 [% USE HTML %][% USE L %][% USE LxERP %]
-<body>
 
  <form method="post" action="[% HTML.escape(script) %]">
 
@@ -85,5 +84,3 @@
 
   [% L.submit_tag("__dummy", LxERP.t8("Continue")) %]
  </form>
-</body>
-</html>
index ee186c0..4065b03 100644 (file)
@@ -3,7 +3,6 @@
 [%- USE LxERP %]
 [%- USE L %]
 [%- SET follow_up_trans_info = invnumber _ ' (' _ vendor_name _ ')' %]
-<body>
 <script type="text/javascript" src="js/common.js"></script>
 <script type="text/javascript" src="js/vendor_selection.js"></script>
 <script type="text/javascript" src="js/calculate_qty.js"></script>
@@ -34,6 +33,7 @@
           <th align="right">[% 'Vendor' | $T8 %]</th>
           <td>
             [%- INCLUDE 'generic/multibox.html'
+                 id            = 'vendor',
                  name          = 'vendor',
                  style         = 'width: 250px',
                  DATA          = ALL_VENDORS,
 [% IF creditwarning != '' %]
        alert('[% 'Credit Limit exceeded!!!' | $T8 %]');
 [% ELSE %]
-       focus();
 [% END %]
-       setupDateFormat('[% dateformat %]', '[% 'Falsches Datumsformat!' | $T8 %]');
-       setupPoints('[% numberformat %]', '[% 'wrongformat' | $T8 %]');
      });
      function set_duedate() {
        $.ajax({
index e0ef583..6cbcd4e 100644 (file)
 <input type="hidden" name="gldate" value="[% gldate %]">
 </form>
 
-</body>
 
-</html>
index 433d3b1..bbe05f0 100644 (file)
@@ -3,7 +3,6 @@
 [%- USE LxERP %]
 [%- USE L %]
 [%- SET follow_up_trans_info = invnumber _ ' (' _ customer_name _ ')' %]
-<body>
 <script type="text/javascript" src="js/common.js"></script>
 <script type="text/javascript" src="js/delivery_customer_selection.js"></script>
 <script type="text/javascript" src="js/vendor_selection.js"></script>
@@ -35,6 +34,7 @@
           <th align="right">[% 'Customer' | $T8 %]</th>
           <td>
             [%- INCLUDE 'generic/multibox.html'
+                 id            = 'customer',
                  name          = 'customer',
                  style         = 'width: 250px',
                  DATA          = ALL_CUSTOMERS,
 [% ELSIF creditwarning != '' %]
        alert('[% 'Credit Limit exceeded!!!' | $T8 %]');
 [% ELSE %]
-       focus();
 [% END %]
-       setupDateFormat('[% dateformat %]', '[% 'Falsches Datumsformat!' | $T8 %]');
-       setupPoints('[% numberformat %]', '[% 'wrongformat' | $T8 %]');
      });
      function set_duedate() {
        $.ajax({
diff --git a/templates/webpages/layout/focus_setup.html b/templates/webpages/layout/focus_setup.html
new file mode 100644 (file)
index 0000000..e97fb69
--- /dev/null
@@ -0,0 +1 @@
+function fokus(){ [% IF focus %]$('[% focus %]').focus()[% END %] }
diff --git a/templates/webpages/layout/javascript_setup.html b/templates/webpages/layout/javascript_setup.html
new file mode 100644 (file)
index 0000000..49ecb0a
--- /dev/null
@@ -0,0 +1,5 @@
+[%- USE T8 %]
+$(function() {
+  setupPoints('[% myconfig.numberformat %]', '[% 'wrongformat' | $T8 %]');
+  setupDateFormat('[% myconfig.dateformat %]', '[% 'Falsches Datumsformat!' | $T8 %]');
+})
index 6f0ff8b..92dc8d2 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %][% USE LxERP %]<body>
+[%- USE HTML %][%- USE LxERP %]
  [%- DEFAULT myconfig_dbhost = 'localhost' %]
    <noscript>
    [% INCLUDE 'generic/information.html'
@@ -8,7 +8,7 @@
    %]
    </noscript>
  <center>
-  <a class="nomobile" href="http://www.kivitendo.de" target="_top"><img src="image/kivitendo.png" border="0" title="[% 'kivitendo Homepage' | $T8 %]"></a>
+  <a class="nomobile" href="http://www.kivitendo.de" target="_top"><img src="image/kivitendo.png" border="0" alt='[% 'kivitendo' | $T8 %]' title="[% 'kivitendo Homepage' | $T8 %]"></a>
 
   <h3 class="login">[% 'kivitendo' | $T8 %] [% version %]</h3>
 
@@ -57,5 +57,3 @@
 
  [%- todo_list %]
 
-</body>
-</html>
index a15da6b..a92c7c3 100644 (file)
@@ -1,5 +1,4 @@
 [%- USE LxERP %]
-<body>
 
  <p><b>[% LxERP.t8('Error!') %]</b></p>
 
@@ -22,5 +21,3 @@
   <a href="admin.pl" target="_top">[% LxERP.t8('Administration') %]</a>
  </p>
 
-</body>
-</html>
index c756e5c..556cd01 100644 (file)
@@ -1,5 +1,4 @@
 [%- USE T8 %]
-<body>
 
  <p><b>[% 'Error!' | $T8 %]</b></p>
 
@@ -17,5 +16,3 @@
   <a href="admin.pl" target="_top">[% 'Administration' | $T8 %]</a>
  </p>
 
-</body>
-</html>
index e477a42..f65b6a2 100644 (file)
@@ -1,5 +1,4 @@
 [% USE LxERP %][% USE HTML %]
-<body>
  <div class="listtop">[% title %]</div>
 
  <p>
@@ -28,5 +27,3 @@
  <p>
   <a href="controller.pl?action=LoginScreen/user_login">[%- LxERP.t8('Back to login') %]</a>
  </p>
-</body>
-</html>
index 877cc18..08776e7 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body class="login" onLoad="document.loginscreen.login.focus()">
-
+[%- USE HTML %]
  <center>
   <table class="login" border="3" cellpadding="20">
    <tr>
@@ -24,7 +23,7 @@
           <table>
            <tr>
             <th align="right">[% 'Login Name' | $T8 %]</th>
-            <td><input class="login" name="{AUTH}login" size="30" tabindex="1"></td>
+            <td><input id='login' class="login" name="{AUTH}login" size="30" tabindex="1"></td>
            </tr>
            <tr>
             <th align="right">[% 'Password' | $T8 %]</th>
@@ -45,6 +44,6 @@
     </td>
    </tr>
   </table>
-
-</body>
-</html>
+  <script type='text/javascript'>
+    $(function(){ $('#login').focus() })
+  </script>
index 862d7de..44f6c79 100644 (file)
@@ -1,23 +1,22 @@
 [%- USE T8 %]
-<body class="frame-header">
-<div class="frame-header">
+<div id="frame-header">
 [% UNLESS is_links %]
  <span class="frame-header-element frame-header-left">
     [<a href="JavaScript:Switch_Menu();" title="[% 'Switch Menu on / off' | $T8 %]">[% 'Menu' | $T8 %]</a>]
     [<a href="controller.pl?action=LoginScreen/user_login" target="_blank" title="[% 'Open a further kivitendo window or tab' | $T8 %]">[% 'New window/tab' | $T8 %]</a>]
-    [<a href="JavaScript:top.main_window.print();" title="[% 'Hardcopy' | $T8 %]">[% 'Print' | $T8 %]</a>]
-    [<a href="Javascript:top.main_window.history.back();" title="[% 'Go one step back' | $T8 %]">[% 'Back' | $T8 %]</a>]
-    [<a href="Javascript:top.main_window.history.forward();" title="[% 'Go one step forward' | $T8 %]">[% 'Fwd' | $T8 %]</a>]
+    [<a href="JavaScript:top.print();" title="[% 'Hardcopy' | $T8 %]">[% 'Print' | $T8 %]</a>]
+    [<a href="Javascript:top.history.back();" title="[% 'Go one step back' | $T8 %]">[% 'Back' | $T8 %]</a>]
+    [<a href="Javascript:top.history.forward();" title="[% 'Go one step forward' | $T8 %]">[% 'Fwd' | $T8 %]</a>]
  </span>
 [%- END %]
 [% IF is_fastcgi && LXCONFIG.debug.show_debug_menu %]
  <span class="frame-header-element frame-header-center">
   Debug:
   [<a href='controller.pl?action=DebugMenu/reload'>FCGI Reload</a>]
-  [<a href='controller.pl?action=DebugMenu/toggle&level=request_timer'>[% IF LXDEBUG.level_by_name('request_timer') %]<b>Timing</b>[% ELSE %]Timing[% END %]</a>]
-  [<a href='controller.pl?action=DebugMenu/toggle&level=trace'>[% IF LXDEBUG.level_by_name('trace') %]<b>Trace</b>[% ELSE %]Trace[% END %]</a>]
-  [<a href='controller.pl?action=DebugMenu/toggle&level=query'>[% IF LXDEBUG.level_by_name('query') %]<b>Query</b>[% ELSE %]Query[% END %]</a>]
-  [<a href='controller.pl?action=DebugMenu/toggle&level=warn'>[% IF LXDEBUG.level_by_name('warn') %]<b>Warnings</b>[% ELSE %]Warnings[% END %]</a>]
+  [<a href='controller.pl?action=DebugMenu/toggle&amp;level=request_timer'>[% IF LXDEBUG.level_by_name('request_timer') %]<b>Timing</b>[% ELSE %]Timing[% END %]</a>]
+  [<a href='controller.pl?action=DebugMenu/toggle&amp;level=trace'>[% IF LXDEBUG.level_by_name('trace') %]<b>Trace</b>[% ELSE %]Trace[% END %]</a>]
+  [<a href='controller.pl?action=DebugMenu/toggle&amp;level=query'>[% IF LXDEBUG.level_by_name('query') %]<b>Query</b>[% ELSE %]Query[% END %]</a>]
+  [<a href='controller.pl?action=DebugMenu/toggle&amp;level=warn'>[% IF LXDEBUG.level_by_name('warn') %]<b>Warnings</b>[% ELSE %]Warnings[% END %]</a>]
  </span>
 [%- END %]
  <span class="frame-header-element frame-header-right">
@@ -28,5 +27,3 @@
   [% now.hms %]
  </span>
 </div>
-</body>
-</html>
diff --git a/templates/webpages/menu/menu.html b/templates/webpages/menu/menu.html
new file mode 100644 (file)
index 0000000..385ad81
--- /dev/null
@@ -0,0 +1,2 @@
+[%- USE JSON %]
+$(function(){$([% JSON.json(sections) %]).each(function(i,b){var a=$('<a class="ml">').append($('<span class="mii ms">').append($('<div>').addClass(b[3])),$('<span class="mic">').append(b[0]));if(b[5])a.attr('href', b[5]);$('#html-menu').append($('<div class="mi">').addClass(b[4]).addClass(b[1]).attr('id','mi'+b[2]).append(a))});$('#html-menu div.i, #html-menu div.sm').not('[id^='+$.cookie('html-menu-selection')+'_]').hide();$('#html-menu div.m').each(function(){$(this).click(function(){$.cookie('html-menu-selection',$(this).attr('id'));$('#html-menu div.mi').not('div.m').not('[id^='+$(this).attr('id')+'_]').hide();$('#html-menu div.mi[id^='+$(this).attr('id')+'_]').toggle()})})})
index d552675..7285d86 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body class="menunew">
-
+[% USE HTML %]
  <script type="text/javascript">
 <!--
 function clockon() {
@@ -10,7 +9,7 @@ function clockon() {
   document.getElementById('clock_id').innerHTML = (h<10?'0'+h:h)+":"+(m<10?'0'+m:m);
   var timer=setTimeout("clockon()", 10000);
 }
-window.onload=clockon
+$(clockon);
 //-->
  </script>
 
@@ -20,12 +19,12 @@ window.onload=clockon
   <tr>
    <td>
     &nbsp;
-    [<a href="menunew.pl?action=display" target="_blank">[% 'new Window' | $T8 %]</a>]
+    [<a href="login.pl?action=company_logo" target="_blank">[% 'new Window' | $T8 %]</a>]
     &nbsp;
-    [<a href="JavaScript:top.main_window.print()">[% 'print' | $T8 %]</a>]
+    [<a href="JavaScript:top.print()">[% 'print' | $T8 %]</a>]
    </td>
    <td align="right" nowrap>
-    [[% 'User' | $T8 %]: [% HTML.escape(login) %] -
+    [[% 'User' | $T8 %]: [% HTML.escape(MYCONFIG.login) %] -
     <a href="controller.pl?action=LoginScreen/logout" target="_top">[% 'logout' | $T8 %]</a>]
     [% date %] <span id='clock_id' style='position:relative'></span>&nbsp;
    </td>
@@ -35,11 +34,11 @@ window.onload=clockon
  <div id="main_menu_div"></div>
 
  [%- SET main_id = '100' %]
- <ul id="main_menu_model">
+ <ul id="main_menu_model"  style='display:none'>
  [%- FOREACH mainitem = menu_items %]
   [%- SET main_id = main_id + 1 %]
   <li id="[% main_id %]"[% IF mainitem.image %] itemIcon="[% mainitem.image %]"[% END %]>
-   <a href="[% IF mainitem.href %][% mainitem.href %][% ELSE %]#[% END %]"[% IF mainitem.target %] target="[% mainitem.target %]"[% END %]>
+   <a href="[% IF mainitem.href %][% mainitem.href %][% ELSE %]#[% END %]">
     [%- HTML.escape(mainitem.title) %]
    </a>
    [%- IF mainitem.subitems %]
@@ -48,7 +47,7 @@ window.onload=clockon
      [%- FOREACH sub1item = mainitem.subitems %]
       [%- SET sub1_id = sub1_id + 1 %]
       <li id="[% sub1_id %]"[% IF sub1item.image %] itemIcon="[% sub1item.image %]"[% END %]>
-       <a href="[% IF sub1item.href %][% sub1item.href %][% ELSE %]#[% END %]"[% IF sub1item.target %] target="[% sub1item.target %]"[% END %]>
+       <a href="[% IF sub1item.href %][% sub1item.href %][% ELSE %]#[% END %]">
         [%- HTML.escape(sub1item.title) %]
        </a>
        [%- IF sub1item.subitems %]
@@ -57,7 +56,7 @@ window.onload=clockon
          [%- FOREACH sub2item = sub1item.subitems %]
           [%- SET sub2_id = sub2_id + 1 %]
           <li id="[% sub2_id %]"[% IF sub2item.image %] itemIcon="[% sub2item.image %]"[% END %]>
-           <a href="[% IF sub2item.href %][% sub2item.href %][% ELSE %]#[% END %]"[% IF sub2item.target %] target="[% sub2item.target %]"[% END %]>
+           <a href="[% IF sub2item.href %][% sub2item.href %][% ELSE %]#[% END %]">
             [%- HTML.escape(sub2item.title) %]
            </a>
           </li>
@@ -72,25 +71,25 @@ window.onload=clockon
  [%- END %]
  </ul>
 
- <iframe id="win1" src="[% callback %]" width="100%" height="94%" name="main_window" style="position: absolute; border: 0px; z-index: 99; ">
-  <p>[% 'MSG_BROWSER_DOES_NOT_SUPPORT_IFRAMES' | $T8 %]</p>
- </iframe>
  <script type="text/javascript">
   <!--
 
-DHTMLSuite.createStandardObjects();
+$(function(){
+  DHTMLSuite.createStandardObjects();
+
+  DHTMLSuite.configObj.setImagePath('image/dhtmlsuite/');
 
-DHTMLSuite.configObj.setCssPath('[% myconfig.css_path %]/dhtmlsuite/');
-DHTMLSuite.configObj.setImagePath('image/dhtmlsuite/');
+  var menu_model = new DHTMLSuite.menuModel();
+  menu_model.addItemsFromMarkup('main_menu_model');
+  menu_model.init();
+
+  var menu_bar = new DHTMLSuite.menuBar();
+  menu_bar.addMenuItems(menu_model);
+  menu_bar.setTarget('main_menu_div');
+  menu_bar.init();
+});
 
-var menu_model = new DHTMLSuite.menuModel();
-menu_model.addItemsFromMarkup('main_menu_model');
-menu_model.init();
 
-var menu_bar = new DHTMLSuite.menuBar();
-menu_bar.addMenuItems(menu_model);
-menu_bar.setTarget('main_menu_div');
-menu_bar.init();
 
 function open_url(url, target) {
 
@@ -98,6 +97,3 @@ function open_url(url, target) {
 
     -->
  </script>
-
-</body>
-</html>
index cfe50a3..eae64cc 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body style="padding:0px; margin:0px;">
-
+[% USE HTML %]
  <script type="text/javascript" src="js/jquery.js"></script>
  <script type="text/javascript">
  <!--
@@ -35,7 +34,7 @@ function clockon() {
   document.getElementById('clock_id').innerHTML = (h<10?'0'+h:h)+":"+(m<10?'0'+m:m);
   var timer=setTimeout("clockon()", 10000);
 }
-window.onload=clockon
+$(clockon);
 //-->
  </script>
 
@@ -43,9 +42,9 @@ window.onload=clockon
   <tr>
    <td style="color:white; font-family:verdana,arial,sans-serif; font-size: 12px;" nowrap>
     &nbsp;
-    [<a href="menuv3.pl?action=display" target="_blank">[% 'new Window' | $T8 %]</a>]
+    [<a href="login.pl?action=company_logo" target="_blank">[% 'new Window' | $T8 %]</a>]
     &nbsp;
-    [<a href="JavaScript:top.main_window.print()">[% 'print' | $T8 %]</a>]
+    [<a href="JavaScript:top.print()">[% 'print' | $T8 %]</a>]
     &nbsp;
     [[% 'Search contacts' | $T8 %] <input size="15" name="search_term" id="search_term" onkeydown="return on_keydown_quicksearch(event)">]
    </td>
@@ -57,17 +56,9 @@ window.onload=clockon
   </tr>
  </table>
 
-
  <div id="menuv3">
 
   [% menu %]
 
  </div>
-
  <div style="clear: both;"></div>
-
- <iframe id="win1" src="[% callback %]" width="100%" height="94%" name="main_window" style="position: absolute; border: 0px; z-index: 99; ">
-  <p>[% 'MSG_BROWSER_DOES_NOT_SUPPORT_IFRAMES' | $T8 %]</p>
- </iframe>
-</body>
-</html>
index b0b72f4..a24b637 100644 (file)
@@ -1,26 +1,9 @@
 [%- USE T8 %]
 [%- USE HTML %]
-<body class="frame-header menuv4">
- <div class="frame-header">
-  <span class="frame-header-element frame-header-left">
-   [<a href="menuv4.pl?action=display" target="_blank">[% 'new Window' | $T8 %]</a>]
-   [<a href="JavaScript:top.main_window.print()">[% 'print' | $T8 %]</a>]
-  </span>
-  <span class="frame-header-element frame-header-right">
-   [[% 'User' | $T8 %]: [% HTML.escape(login) %] -
-   <a href="controller.pl?action=LoginScreen/logout" target="_top">[% 'logout' | $T8 %]</a>]
-   [% date %] <span id='clock_id' style='position:relative'></span>&nbsp;
-  </span>
- </div>
  <div id="menuv4">
   [% menu %]
  </div>
  <div style="clear: both;"></div>
- <iframe id="win1" src="[% callback %]" width="100%" height="94%" name="main_window" style="position: absolute; border: 0px; z-index: 99; ">
-  <p>[% 'MSG_BROWSER_DOES_NOT_SUPPORT_IFRAMES' | $T8 %]</p>
- </iframe>
-</body>
-
 
  <script type="text/javascript">
 <!--
@@ -31,7 +14,6 @@ function clockon() {
   document.getElementById('clock_id').innerHTML = (h<10?'0'+h:h)+":"+(m<10?'0'+m:m);
   var timer=setTimeout("clockon()", 10000);
 }
-window.onload=clockon
+$(clockon);
 //-->
  </script>
-</html>
index 35a5135..06cf9b4 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
+[%- USE HTML %]
 
  <div class="listtop" width="100%">[% 'Carry over shipping address' | $T8 %]</div>
 
@@ -83,5 +83,3 @@
 
  </form>
 
-</body>
-</html>
index 5f63afc..6ef6c0e 100644 (file)
@@ -2,7 +2,6 @@
 [%- USE L %]
 [%- USE LxERP %]
 
-<body>
 
 <form method="post" action="[% script %]">
 
@@ -23,5 +22,3 @@
 <button class=submit type=button onclick="history.back()">[% 'No' | $T8 %]</button>
 </form>
 
-</body>
-</html>
index ff45868..839fb45 100644 (file)
@@ -1,7 +1,6 @@
 [% USE HTML %]
 [% USE LxERP %]
 [% USE L %]
-<body>
 
  <div class="listtop">[% title %]</div>
 
     -->
  </script>
 
-</body>
-</html>
index 6a8e64f..ddf4a53 100644 (file)
 [% END %]
 
 </form>
-
-
-    <script type="text/javascript">
-     <!--
-       $('document').ready(function(){
-         setupDateFormat('[% dateformat %]', '[% 'Falsches Datumsformat!' | $T8 %]');
-         setupPoints('[% numberformat %]', '[% 'wrongformat' | $T8 %]');
-       });
-     //-->
-    </script>
-</body>
-</html>
index 7619076..eed285c 100644 (file)
@@ -2,7 +2,6 @@
 [%- USE HTML %]
 [%- USE LxERP %]
 [%- USE L %]
-<body onLoad="[% onload %]">
 
   <form method="post" name="oe" action="[% script %]">
 
index 6b8a184..bea5c67 100644 (file)
@@ -3,7 +3,6 @@
 
 <div class="listtop">[% 'Overdue sales quotations and requests for quotations' | $T8 %]</div>
 
-<p>
  <table width="100%">
   <tr>
    <td class="listheading">[% 'Date' | $T8 %]</td>
@@ -20,7 +19,7 @@
    <td>[% HTML.escape(row.transdate) %]</td>
    <td>[% HTML.escape(row.reqdate) %]</td>
    <td>
-    <a href="[% edit_url %]&vc=[% HTML.url(row.vc) %]&type=[% IF row.vc == 'customer' %]sales_quotation[% ELSE %]request_quotation[% END %]&id=[% HTML.url(row.id) %]">
+    <a href="[% edit_url | html %]&amp;vc=[% row.vc | html %]&amp;type=[% IF row.vc == 'customer' %]sales_quotation[% ELSE %]request_quotation[% END %]&amp;id=[% row.id | html %]">
      [% IF row.vc == 'customer' %]
      [% 'Sales quotation' | $T8 %]
      [% ELSE %]
@@ -42,4 +41,3 @@
   </tr>
   [%- END %]
  </table>
-</p>
index 115f077..576979d 100644 (file)
@@ -2,7 +2,6 @@
 [% USE LxERP %]
 [% USE T8 %]
 [%- IF !TABDIALOG %]
-<body>
 
  <p><div class="listtop">[% 'Price information' | $T8 %]</div></p>
 
  </p>
 
 [%- IF !TABDIALOG %]
-</body>
-</html>
 [%- END %]
index 81818fe..8d1b33e 100644 (file)
@@ -1,13 +1,11 @@
 [% USE HTML %]
 [% USE L %]
-<body onload="copy_values_and_close()">
-
  <script type="text/javascript">
   <!--
-      function copy_values_and_close() {
+      $(function() {
         window.opener.document.getElementsByName("periodic_invoices_config")[0].value = $("#periodic_invoices_config").attr('value');
         window.close();
-      }
+      })
     -->
  </script>
 
@@ -15,5 +13,3 @@
   [% L.hidden_tag("periodic_invoices_config", periodic_invoices_config) %]
  </form>
 
-</body>
-</html>
index 9282beb..82db67c 100644 (file)
@@ -4,7 +4,6 @@
 [%- USE L %]
 [%- SET vclabel = vc == 'customer' ? LxERP.t8('Customer') : LxERP.t8('Vendor') %]
 [%- SET vcnumberlabel = vc == 'customer' ? LxERP.t8('Customer Number') : LxERP.t8('Vendor Number') %]
-<body>
 
 <form method="post" action="oe.pl">
 
 <input class="submit" type="submit" name="action" value="[% 'Continue' | $T8 %]">
 </form>
 
-</body>
-</html>
index 040ed56..b429865 100755 (executable)
@@ -1,5 +1,4 @@
 [% USE HTML %][% USE T8 %][% USE L %][% USE LxERP %]
-<body>
 
  <form method="post" action="controller.pl">
   <div class="listtop">[% FORM.title %]</div>
@@ -87,5 +86,3 @@
   </table>
  </form>
 
-</body>
-</html>
index fd1ffd9..3213be2 100644 (file)
@@ -2,7 +2,6 @@
 
 <script type="text/javascript" src="js/jquery-ui.js"></script>
 
-<body>
  <div class="listtop">[% FORM.title %]</div>
 
 [%- INCLUDE 'common/flash.html' %]
@@ -52,5 +51,3 @@
 
  [% L.sortable_element('#payment_term_list tbody', url => 'controller.pl?action=PaymentTerm/reorder', with => 'payment_term_id') %]
 
-</body>
-</html>
index 99ea233..d0f1fce 100644 (file)
@@ -2,7 +2,6 @@
 [%- USE T8 %]
 [%- USE HTML %]
 [% L.javascript_tag('show_history.js') %]
-<body>
 
 <form method=post action="[% script %]">
 
@@ -40,5 +39,3 @@
 <input type=button onclick="set_history_window([% id %]);" name=history id=history value="[% 'history' | $T8 %]">
 </form>
 
-</body>
-</html>
index c66bb49..c833fdc 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE HTML %]
 [%- USE T8 %]
-<body>
 
 <table width=100%>
   <tr>
@@ -36,6 +35,4 @@
   <input class=submit type=submit name=action value="[% 'Add' | $T8 %]">
 </form>
 
-</body>
-</html>
 
index fbf1e5d..ed75005 100644 (file)
@@ -2,7 +2,6 @@
 [%- USE T8 %]
 [%- USE HTML %]
 [% L.javascript_tag('show_history.js') %]
-<body>
 
 <form method=post action="[% script %]">
 
@@ -40,5 +39,3 @@
 <input type=button onclick="set_history_window([% id %]);" name=history id=history value="[% 'history' | $T8 %]">
 </form>
 
-</body>
-</html>
index c205a1b..b1586eb 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE HTML %]
 [%- USE T8 %]
-<body>
 
 <table width=100%>
   <tr>
@@ -36,6 +35,4 @@
   <input class=submit type=submit name=action value="[% 'Add' | $T8 %]">
 </form>
 
-</body>
-</html>
 
index 6ea5be4..714d66e 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
 [%- USE LxERP %]
-<body>
 
 <form method=post action="[% script %]">
 
@@ -43,6 +42,4 @@
 <input class=submit type=submit name=action value="[% 'Continue' | $T8 %]">
 </form>
 
-</body>
-</html>
 
index bd79216..dec347e 100644 (file)
@@ -1,6 +1,6 @@
 [%- USE T8 %]
 [%- USE L %]
-[% USE HTML %][% USE LxERP %]<body>
+[%- USE HTML %][%- USE LxERP %]
 
  [%- IF message %]
  <p>[% message %]</p>
  </script>
 
  [% PROCESS 'common/help_overlay.html' %]
-</body>
-</html>
index 25c74c3..f2718a1 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body onload="fokus()">
-
+[%- USE HTML %]
  <form method="post" action="projects.pl" name="Form">
 
   <div class="listtop">[% title %]</div>
@@ -66,5 +65,3 @@
   </p>
  </form>
 
-</body>
-</html>
index 376ff6f..940b306 100644 (file)
@@ -2,8 +2,6 @@
 [%- USE HTML %]
 [%- USE L %]
 [%- USE LxERP %]
-<body onLoad="[% onload %]">
-
 <h1>[% 'Reconciliation' | $T8 %]</h1>
 
 <form method=post action="[% script %]">
@@ -29,5 +27,3 @@
 
 </form>
 
-</body>
-</html>
index b292f85..642442a 100644 (file)
@@ -3,7 +3,6 @@
 [%- USE T8 %]
 [%- USE LxERP  %]
 [%- L.javascript_tag('jquery.checkall')  %]
-<body>
 
 <h1>[% accno | html %]--[% account | html %]</h1>
 
 
 </form>
 
-</body>
-</html>
index 0d49f28..45a1fce 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
+[%- USE HTML %]
 
  <h1>[% HTML.escape(title) %]</h1>
 
@@ -91,5 +91,3 @@
 
 
  </form>
-</body>
-</html>
index 332c5ef..7190865 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body[% IF onload %] onload="[% onload %]"[% END %]>
-
+[%- USE HTML %]
  <style type="text/css">
   <!--
 .top_border {
   </form>
  [% END %]
 
-</body>
index 8956ed7..59a98b7 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %][% USE LxERP %]<body>
+[%- USE HTML %][%- USE LxERP %]
 
  [%- SET default_margin = LxERP.format_amount(1.5) %]
 
 [%- END %]
 
  </form>
-</body>
-</html>
index 1fd8d45..e6e9324 100644 (file)
@@ -1,8 +1,6 @@
 [%- USE T8 %]
 [%- USE HTML %]
 [%- USE LxERP %]
-<body bgcolor="#ffffff">
-
 <h2 align="center">
 [% company %]
 <br>[% address %]
index 6d44c8f..387769e 100644 (file)
@@ -2,7 +2,6 @@
 [%- USE L %]
 [%- USE LxERP %]
 [%- USE T8 %]
-<body>
 
 <h1>[% 'E-mail Statement to' | $T8 %] [% $ct %]</h1>
 
@@ -44,5 +43,3 @@
 <input name=action class=submit type=submit value="[% 'Continue' | $T8 %]">
 </form>
 
-</body>
-</html>
index 269e44c..54e47f7 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
+[%- USE HTML %]
 
  <script type="text/javascript">
   <!--
   </form>
  [% END %]
 
-</body>
index d99d458..cf755d6 100644 (file)
@@ -74,7 +74,6 @@
   </tr>
 [%- END %]
 
-<body onLoad="[% onload %]">
 <h1>[% title %]</h1>
 
 <form method=post action='[% script %]'>
 
 </form>
 
-</body>
-</html>
index 4ff5b50..1a56a14 100644 (file)
@@ -15,7 +15,6 @@
   </tr>
 [% END %]
 
-<body>
 
 <h1>[% title %] [% SET tax_report__accno_title = accno _ '_description' %][% GET $tax_report__accno_title %]</h1>
 
@@ -57,6 +56,4 @@
 [%- END %]
 </table>
 <hr size=3 noshade>
-</body>
-</html>
 
index 56d36d0..41a8ff0 100644 (file)
@@ -9,7 +9,6 @@
  [% SET arap = 'ar' %]
  [% SET iris = 'is' %]
 [%- END %]
-<body>
 
  <p><div class="listtop">[% title %]</div></p>
 
     -->
  </script>
 
-</body>
-</html>
index a2dc8c0..c20436f 100644 (file)
@@ -10,7 +10,6 @@
  [% SET arap = 'ar' %]
  [% SET iris = 'is' %]
 [%- END %]
-<body>
 
  [%- IF error_message %]
  <p><div class="message_error">[% error_message %]</div></p>
   <input type="hidden" name="confirmation" value="1">
  </form>
 
-</body>
-</html>
index 6740ba1..773cdea 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
 [% USE HTML %]
-<body>
 
  <p><div class="listtop">[% title %]</div></p>
 
@@ -24,5 +23,3 @@
   </ul>
  </p>
 
-</body>
-</html>
index 3af74c9..1ab516e 100644 (file)
@@ -11,7 +11,6 @@
  [% SET arap = 'ar' %]
  [% SET iris = 'is' %]
 [%- END %]
-<body>
 
  <p><div class="listtop">[% title %]: [% HTML.escape(export.ids.join(', ')) %]</div></p>
 
      <input type="hidden" name="vc" value="[% HTML.escape(vc) %]">
  </form>
 
-</body>
-</html>
index 063b4ee..9f76291 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
 [% USE HTML %]
-<body>
 
  <p><div class="listtop">[% title %]</div></p>
 
@@ -31,5 +30,3 @@
   <input type="hidden" name="vc" value="[%- HTML.escape(vc) %]">
  </form>
 
-</body>
-</html>
index 74060f5..613f12d 100644 (file)
@@ -2,7 +2,6 @@
 [%- USE HTML %]
 [%- USE LxERP %]
 [%- USE L %]
-<body>
 
  <p><div class="listtop">[% title %]</div></p>
 
@@ -86,5 +85,3 @@
    <input type="submit" class="submit" name="action_bank_transfer_list" value="[% 'Continue' | $T8 %]">
   </p>
  </form>
-</body>
-</html>
index 2b1c279..293ffd2 100644 (file)
@@ -1,5 +1,4 @@
 [% USE HTML %][% USE L %][% USE LxERP %]
-<body>
 
  <div class="listtop">[% FORM.title %]</div>
 
@@ -33,5 +32,3 @@
   |
   <a href="[% SELF.url_for(controller => 'BackgroundJobHistory', action => 'list') %]">[%- LxERP.t8('View background job history') %]</a>
  </p>
-</body>
-</html>
index 8d6a137..04566d2 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
+[%- USE HTML %]
 
  <div class="listtop" style="margin-bottom: 10px">[% 'Your TODO list' | $T8 %]</div>
 
@@ -14,5 +14,3 @@
 
  [%- END %]
 
-</body>
-</html>
index 0d1a74a..d5b3152 100644 (file)
@@ -3,7 +3,6 @@
  Edit templates/webpages/ustva/config_step1_master.html
  and run locale/<cc>/locales.pl -->
 
-<body>
 <form name="verzeichnis" method="post" action="[% HTML.escape(script) %]">
 <table width="100%">
    <tr>
        <input type="hidden" name="[% HTML.escape(var.variable) %]" value="[% HTML.escape(var.value) %]">
      [%- END %]
   </form>
-</body>
index 9f4f79d..48a2e3e 100644 (file)
@@ -4,7 +4,6 @@
  and run locale/<cc>/locales.pl -->
 
 
-<body>
   <form name="elsterform" method="post" action="[% script %]">
     <table width="100%">
        <tr>
 
 
   </form>
-</body>
-</html>
index e5ee490..53946be 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
+[%- USE HTML %]
 
 <h1>[% 'Generic Tax Report' | $T8 %]</h1>
 <p>[% 'Taxnumber' | $T8 %]: [% taxnumber %]</p>
@@ -21,5 +21,3 @@
 
 </table>
 
-</html>
-</body>
index a397e13..5db479d 100644 (file)
@@ -3,7 +3,6 @@
  Edit templates/webpages/ustva/report_master.html
  and run locale/<cc>/locales.pl -->
 
- <body>
  <form method="post" action="[% HTML.escape(script) %]">
 
  <input type="hidden" name="title" value="[% HTML.escape(title) %]">
    </td>
   </tr>
   </table>
-</body>
-</html>
index e1d2281..95a4b61 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
 [%- USE L %]
-<body>
 
  <form method=post name="search_invoice" action=[% script %]>
 
@@ -53,7 +52,7 @@
            <th align="right">[% 'Item mode' | $T8 %]</th>
            <td colspan="3" align=left><input name="l_parts" class=checkbox type=checkbox value=Y> ([%'Show items from invoices individually' | $T8 %]) </td>
           </tr>
-          <tr> 
+          <tr>
            <th align="right">
              [% 'Total sum' | $T8 %]
            </th>
            <td align=left><input name="l_lastcost_total" class=checkbox type=checkbox value=Y checked>[% 'Purchase price total' | $T8 %]</td>
            <td align=left><input name="l_marge_total" class=checkbox type=checkbox value=Y checked>[% 'Margetotal' | $T8 %]</td>
            <td colspan="4"> ([% 'Single values in item mode, cumulated values in invoice mode' | $T8 %])
-           
+
           </tr>
           <tr>
            <td align=left><input name="l_sellprice" class=checkbox type=checkbox value=Y checked>[% 'Sales price' | $T8 %]</td>
     </th>
     </tr>
         [% CUSTOM_VARIABLES_INCLUSION_CODE_CT %]
+
      <tr><td colspan="7">&nbsp;</td></tr>
     <tr>
     <th colspan="4" align="left">
  <!--
    $(document).ready(function(){
     $('customer').focus();
-    setupDateFormat('[% dateformat | html %]','[% 'Falsches Datumsformat!' | $T8 %]');
-    setupPoints('[% numberformat | html %]','[% 'wrongformat' | $T8 %]');
    })
  //-->
  </script>
- </body>
-</html>
index bae4770..3674058 100644 (file)
@@ -1,7 +1,6 @@
 [%- USE T8 %]
 [%- USE L %]
-[% USE HTML %][% USE JavaScript %]<body onload="on_load();">
-
+[%- USE HTML %][%- USE JavaScript %]
  <script type="text/javascript">
    <!--
       warehouses = new Array();
         control.options[bin_index].selected = true;
       }
 
-      function on_load() {
+      $(function() {
         warehouse_selected(0, 0);
         document.Form.partnumber.focus();
-      }
+      })
      -->
  </script>
 
   </p>
  </form>
 
-</body>
-</html>
index f156cb7..837023e 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %][% USE JavaScript %]<body>
+[%- USE HTML %][%- USE JavaScript %]
 
  <form method="post" action="wh.pl">
 
@@ -85,5 +85,3 @@
   </p>
  </form>
 
-</body>
-</html>
index 9215374..77a5070 100644 (file)
@@ -1,7 +1,6 @@
 [%- USE T8 %]
 [%- USE L %]
-[% USE HTML %][% USE JavaScript %]<body onload="on_load();">
-
+[%- USE HTML %][%- USE JavaScript %]
  <script type="text/javascript">
    <!--
       warehouses = new Array();
         control.options[bin_index].selected = true;
       }
 
-      function on_load() {
+      $(function () {
         warehouse_selected(0, 0);
         document.Form.partnumber.focus();
-      }
+      });
      -->
  </script>
 
   </p>
  </form>
 
-</body>
-</html>
index 6ef7eda..e026dc6 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %][% USE JavaScript %]<body onload="on_load();">
-
+[%- USE HTML %][%- USE JavaScript %]
  <script type="text/javascript">
   <!--
       warehouses = new Array();
         control.options[0].selected = true;
       }
 
-      function on_load() {
+      $(function() {
         [% FOREACH row = CONTENTS %]
         warehouse_selected([% loop.count %], [% initial_warehouse_idx %]);
         [% END %]
-      }
+      });
     -->
  </script>
 
   </p>
  </form>
 
-</body>
-</html>
index 254e854..29ffe75 100644 (file)
@@ -1,8 +1,7 @@
 [%- USE T8 %]
 [%- USE HTML %]
 [%- USE L %]
-[% USE JavaScript %]<body onload="on_load();">
-
+[%- USE JavaScript %]
  <script type="text/javascript" src="js/common.js"></script>
  <script type="text/javascript" src="js/part_selection.js"></script>
  <script type="text/javascript">
         control.options[bin_index].selected = true;
       }
 
-      function on_load() {
+      $(function() {
         warehouse_selected(0, 0);
         document.Form.partnumber.focus();
-      }
+      });
      -->
  </script>
 
   </p>
  </form>
 
-</body>
-</html>
index 3999e8c..394450c 100644 (file)
@@ -1,7 +1,6 @@
 [%- USE T8 %]
 [%- USE L %]
-[% USE HTML %][% USE JavaScript %][% USE LxERP %]<body onload="on_load(); [% onload %]">
-
+[%- USE HTML %][%- USE JavaScript %][%- USE LxERP %]
  <script type="text/javascript" src="js/common.js"></script>
  <script type="text/javascript" src="js/part_selection.js"></script>
  <script type="text/javascript">
@@ -50,9 +49,9 @@
         control.options[bin_index].selected = true;
       }
 
-      function on_load() {
+      $(function() {
         warehouse_selected([% warehouse_id %], [% bin_id %]);
-      }
+      })
     -->
  </script>
 
   </p>
  </form>
 
-</body>
-</html>
index fef9940..bdff796 100644 (file)
@@ -1,7 +1,6 @@
 [%- USE T8 %]
 [%- USE L %]
-[% USE HTML %][% USE JavaScript %][% USE LxERP %]<body onload="on_load(); [% onload %]">
-
+[%- USE HTML %][%- USE JavaScript %][%- USE LxERP %]
  <script type="text/javascript" src="js/common.js"></script>
  <script type="text/javascript" src="js/part_selection.js"></script>
  <script type="text/javascript">
@@ -50,9 +49,9 @@
         control.options[bin_index].selected = true;
       }
 
-      function on_load() {
+      $(function() {
         warehouse_selected([% warehouse_id %], [% bin_id %]);
-      }
+      })
     -->
  </script>
 
    <input type="submit" class="submit" name="action" value="[% 'Stock' | $T8 %]">
    [%- END %]
   </p>
- </form> 
-</body>
-</html>
+ </form>
+