]> wagnertech.de Git - mfinanz.git/commitdiff
Merge branch 'master' of vc.linet-services.de:public/lx-office-erp
authorNiclas Zimmermann <niclas@lx-office-hosting.de>
Thu, 18 Oct 2012 12:28:21 +0000 (14:28 +0200)
committerNiclas Zimmermann <niclas@lx-office-hosting.de>
Thu, 18 Oct 2012 12:28:21 +0000 (14:28 +0200)
284 files changed:
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/Dispatcher.pm
SL/Dispatcher/AuthHandler.pm
SL/Dispatcher/AuthHandler/Admin.pm
SL/Dispatcher/AuthHandler/User.pm
SL/Drafts.pm
SL/Form.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/ap.pl
bin/mozilla/ar.pl
bin/mozilla/arap.pl
bin/mozilla/ca.pl
bin/mozilla/common.pl
bin/mozilla/cp.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/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
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/dhtmlsuite/menu-for-applications.js
js/jquery.cookie.js [new file with mode: 0644]
js/switchmenuframe.js
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/make_icons.sh [new file with mode: 0755]
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.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 fbee5c0288a7345f8cecb0984d8453024ad136df..29f2bc79a38434f8a72a561b7d3dbcad2a4e08ca 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 6d879e82ad2507447639e154d194842a48f245ac..7fe1d36eaf922c881cc817165ad6326ce0c9cd78 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 855350c73f0a201e7e432db4ba5ff5b96464a049..69c48eb70a360a648c38dea9ef7b1ec1b39be63f 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 47dfa90c9b7c135a93b419454e6f992b114141da..89f21ccfadd169c0c12ed022f0057bc581f99848 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 522f101252b46db4c5f74880ba078696fd7216b4..bf85c86346183b8d0c52b02fd514285237a7fc1d 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 43bf6680b98c38dd1f50b9dd5672efb4fe5b4362..35a351877f8f6ef84ac26f530141259780d4a3a0 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 22b2be44d17c0c0ae9f768f85f85746fa8724149..c2444315130886f73773d9b019a328474311b348 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 77202e8e40ac31183b5b802aee9ee5b6a934869f..2e41ee90e53d3a87b3d9bf7e915549fb1ab9a8c6 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 150245c587898fd742166dfd39ecc61552f891d5..1273d679fa2aee8ebb34e7310715565a2cf45d71 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 7298f5c1d58f633d39a4609cd888d388d2e2ed93..16111af9c91ec0b45e69a999bb07a5dd1fa09a87 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 539cd9cb24f6b488592e1460bfe4cc528f2e312a..3660bf88a7e80b19ceb59fc2a74cfcfe7e406069 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();
 
@@ -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 d29578b4187ca19257886dc365106b1d3ff03a84..451c41831f9914875f83655e5829dbb6bef48ddf 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..2bb0455
--- /dev/null
@@ -0,0 +1,129 @@
+package SL::Layout::Css;
+
+use strict;
+
+use List::Util qw(max);
+use Exporter qw(import);
+
+our @EXPORT = qw(clock_line print_menu menuitem_v3);
+
+sub clock_line {
+  my ($Sekunden, $Minuten,   $Stunden,   $Monatstag, $Monat,
+      $Jahr,     $Wochentag, $Jahrestag, $Sommerzeit)
+    = localtime(time);
+  $Monat     += 1;
+  $Jahrestag += 1;
+  $Monat     = $Monat < 10     ? $Monat     = "0" . $Monat     : $Monat;
+  $Monatstag = $Monatstag < 10 ? $Monatstag = "0" . $Monatstag : $Monatstag;
+  $Jahr += 1900;
+  my @Wochentage = ("Sonntag",    "Montag",  "Dienstag", "Mittwoch",
+                    "Donnerstag", "Freitag", "Samstag");
+  my @Monatsnamen = ("",       "Januar",    "Februar", "M&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"}) ||
+        ($menu_item->{"module"} eq "menu.pl")) {
+
+      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..d8f079f
--- /dev/null
@@ -0,0 +1,140 @@
+package SL::Layout::Javascript;
+
+use strict;
+use parent qw(SL::Layout::Base);
+
+use List::Util qw(max);
+use URI;
+
+sub init_sub_layouts {
+  [ SL::Layout::None->new ]
+}
+
+sub pre_content {
+  &display
+}
+
+sub start_content {
+  "<div id='content'>\n";
+}
+
+sub end_content {
+  "</div>\n";
+}
+
+sub stylesheets {
+  $_[0]->add_stylesheets(qw(
+    dhtmlsuite/menu-item.css
+    dhtmlsuite/menu-bar.css
+  ));
+  $_[0]->SUPER::stylesheets;
+}
+
+sub display {
+  my ($self) = @_;
+  my $form     = $main::form;
+
+  my $callback            = $form->unescape($form->{callback});
+  $callback               = URI->new($callback)->rel($callback) if $callback;
+  $callback               = "login.pl?action=company_logo"      if $callback =~ /^(\.\/)?$/;
+
+  $self->render("menu/menunew", { partial => 1, no_output => 1 },
+    force_ul_width  => 1,
+    date            => $self->clock_line,
+    menu_items      => $self->acc_menu,
+    callback        => $callback,
+  );
+}
+
+sub clock_line {
+  my $form     = $main::form;
+
+  my ($Sekunden, $Minuten,   $Stunden,   $Monatstag, $Monat,
+      $Jahr,     $Wochentag, $Jahrestag, $Sommerzeit)
+    = localtime(time);
+  $Monat     += 1;
+  $Jahrestag += 1;
+  $Monat     = $Monat < 10     ? $Monat     = "0" . $Monat     : $Monat;
+  $Monatstag = $Monatstag < 10 ? $Monatstag = "0" . $Monatstag : $Monatstag;
+  $Jahr += 1900;
+  my @Wochentage = ("Sonntag",    "Montag",  "Dienstag", "Mittwoch",
+                    "Donnerstag", "Freitag", "Samstag");
+  my @Monatsnamen = ("",       "Januar",    "Februar", "M&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}) || ($menu_item->{module} eq "menu.pl")) {
+      $item->{subitems} = [];
+      $item->{image} = _icon_path("$name.png");
+      $self->create_menu($menu, $item->{subitems}, "${parent}${name}", $depth * 1 + 1);
+
+    } else {
+      $item->{image} = _icon_path("${parent}${name}.png");
+      $menu->menuitem_new("${parent}${name}", $item);
+    }
+  }
+}
+
+sub _icon_path {
+  my ($label, $size) = @_;
+
+  $size ||= 16;
+
+  my $img = "image/icons/${size}x${size}/$label";
+
+  return unless -f $img;
+  return $img;
+}
+
+1;
diff --git a/SL/Layout/Login.pm b/SL/Layout/Login.pm
new file mode 100644 (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..0e65e8a
--- /dev/null
@@ -0,0 +1,34 @@
+package SL::Layout::None;
+
+use strict;
+use parent qw(SL::Layout::Base);
+
+sub javascripts_inline {
+  _setup_formats(),
+  _setup_focus(),
+}
+
+sub use_javascript {
+  'js/common.js'
+}
+
+sub use_stylesheet {
+  'main.css'
+}
+
+sub _setup_formats {
+  $::form->parse_html_template('layout/javascript_setup')
+}
+
+sub _setup_focus {
+  if ($::request->{layout}->focus || $::form->{fokus}) {
+    return $::form->parse_html_template('layout/focus_setup', {
+      focus => $::request->{layout}->focus,
+      fokus => $::form->{fokus},
+    })
+  } else {
+    return ();
+  }
+}
+
+1;
diff --git a/SL/Layout/Top.pm b/SL/Layout/Top.pm
new file mode 100644 (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 ab35fed1a48bfc108ece19b371c6be7ba34186c2..48ac6229daa2b672aa74ad6fb7cdbb24883c1fed 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 688f165bce2b356b32acdac537c551646e8fe23e..deb4e19fe383f1fcd1a8da0624abe949e128e1d3 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 2de54ee5ebe5edb7d2da4414c12b95e4bec01871..5255c8eeebc28ac5acee2271156a34de4113732e 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");
index c704174c8f66ec2fac026e3e217c8f708b91c369..0a7145a60eb879803ef41ad51edf7754707b830d 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 c84772813d2b098c8602978f85e740dafd4f79dc..f967c7975942e266105c79c124c78789fc4ed191 100644 (file)
@@ -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;
index 9860530ad030b2ba4fd103a757bc7bea10d5228c..e31f322b6471f53040a3c0590dede84dda740673 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();
index 45193ed877097e6c9d5161bc67a53925ab76ebc8..2e82596cf89d8cef565825f698ba0baba632caa9 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);
 
 
@@ -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,
   });
@@ -547,9 +542,6 @@ $follow_ups_block
 
   print "
 </form>
-
-</body>
-</html>
 ";
 
   $main::lxdebug->leave_sub();
@@ -850,8 +842,6 @@ sub delete {
   delete $form->{header};
 
   print qq|
-<body>
-
 <form method=post action=$form->{script}>
 |;
 
@@ -871,9 +861,6 @@ sub delete {
 <input name=action class=submit type=submit value="|
     . $locale->text('Yes') . qq|">
 </form>
-
-</body>
-</html>
 |;
 
   $main::lxdebug->leave_sub();
@@ -914,7 +901,7 @@ sub search {
   my $cgi      = $::request->{cgi};
 
   my ($customer, $department);
-  my ($jsscript, $button1, $button2, $onload);
+  my ($jsscript, $button1, $button2);
 
   # setup customer selection
   $form->all_vc(\%myconfig, "customer", "AR");
index 3b1a443113e2dcc28f59bfa6e715f49db5f24967..27b0e3bfa2003bd48b4d9ce10fc3f47671a943b7 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 af6c6c8241e4de3eda394d9d2abd174cfcf22432..4cababbe641bb6ee8729418c96405268fc037914 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 1b054cf22ab4858d2ba94408da07566850d6b743..59c2f9481671e2090b4b05617a31b2a9f109eb21 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 a8caa526b1f1d3eda12614bd57f9f2b94a730197..5fbf7c0a2f96a36f56326170038a2270a53eae82 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 627f6963340f74c548de25cc519839ecc22383fd..378e5a17cf14e02f47c5c71244e2ad55f71509f3 100644 (file)
@@ -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 1dc880ef907fdecf8ddd9ad3c4a843f643e02f61..b58cd7190bd296f3adf130649cd4990dbf003729 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 c471d009bcca0a9f61210a8bfafe94f145fc4af2..cac7bea36c974de7885d90a33a938cb603c8ce0a 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 b2e6037809b99e6cd5a8caa7fd4387b493686d3a..3b5adb230597532b2842b0d675714eef13b4c44a 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 fb6166f18c82707bd85255147d75573617a4b6ef..fd67b5f4c6b29abf7bf499b876a0cb2b4c61a3e5 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);
@@ -928,8 +923,6 @@ sub delete {
   $form->header;
 
   print qq|
-<body>
-
 <form method=post action=gl.pl>
 |;
 
index 2dc3366d6c4aa2d410c41d7afda19a94233f0234..2cbad4f62ce5b38f9a60809d72e8cb771c90c71c 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();
index 1aa0248d0be8e17371acea54b77d2b158fa7b35d..74b4e6591a84bec3d0c87f46f7a183062e39caaf 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,
index 844f694d93ae5b060307845ecb27d9b911df3559..8a8df0ba2ddf9330f1142c1e30cfacf3d7b49993 100644 (file)
@@ -780,8 +780,6 @@ sub delete {
 
   $form->header;
   print qq|
-<body>
-
 <form method=post action=$form->{script}>
 |;
 
index b08e5dbe0a176f7494cc34b47e3ac09e631fb644..58d4c4f9172b8fee3fd9a680373d7dfb0b0c3061 100644 (file)
@@ -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 9508f736f9b85987ddd2ccaab65b861dd197020c..0bcb897bf98c446facfb361ab7fe7d92a46b4e8c 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 a339cd41a4209113c1c88a7e26cd5c4174d4a09b..1068da7491fbf053da11e74bc32e18378295c6cf 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 e81ecb26aab843bc304a91472284317bf1865bf6..d5c42a039ad69688037c26785ce0221c0b27f4f1 100644 (file)
@@ -1177,10 +1177,6 @@ sub config_step2 {
 
   $form->header();
 
-#  print qq|
-#    <body>
-#  |;
-
   my $elsterland         = '';
   my $elster_amt         = '';
   my $elsterFFFF         = '';
index c77d74ddec83ab7b13ae46eb15f00dad59ba8022..fee9ff9d109d9c41f327a436ec1c335befaf36eb 100644 (file)
@@ -795,7 +795,6 @@ sub report {
   $form->{jsscript} = 1;
 
 #  $form->{fokus}   = "partnumber";
-#  $form->{onload} .= "focus();";
   $form->{title}   = $locale->text("Report about warehouse contents");
 
   $form->header();
diff --git a/css/icons16.css b/css/icons16.css
new file mode 100644 (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 9714d4ac3eebc2862920ac46a5288fc61e6fea39..77fe0978dceb314f0a9934c389c0bbc4ad6a73ca 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 38b2669a692cafcf357aded4cbb76fe9fce9b00a..2abe56f4d2fc9f13f7405c050aaf24ab2c02fbf1 100644 (file)
@@ -283,3 +283,39 @@ div#menuv3 li:hover ul, div#menuv3 li li:hover ul, div#menuv3 li li li:hover ul,
        position: relativ: left: 10px;
 }
 /* End of non-anchor hover selectors */
+
+/* html menu */
+/* types of lines: m sm i (menu submenu item)
+   each line is a mi (menuitem) and has one mii (menu-item-icon) whcih is ms (menu-spacer)
+   and one mic (menu-item-chunk)
+   indenting is done with the levels s0, s1, s2 */
+#content.html-menu, #html-menu {
+  transition:         margin-left 0.2s, width 0.2s;
+  -moz-transition:    margin-left 0.2s, width 0.2s;
+  -webkit-transition: margin-left 0.2s, width 0.2s;
+  -o-transition:      margin-left 0.2s, width 0.2s;
+}
+#content.html-menu { margin-left: 190px; }
+#content.html-menu.folded { margin-left: 40px }
+#html-menu.folded:hover + #content.html-menu.folded { margin-left: 190px }
+#html-menu { float:left; width: 183px; font-size: 8pt; margin-top: 10px; overflow:hidden; }
+#html-menu.folded { width: 32px; }
+#html-menu.folded:hover { width: 183px; }
+#html-menu div.mi { margin-top: 4px; margin-bottom: 3px; white-space: nowrap; clear:both; position:relative; }
+#html-menu div.sm { font-weight: bold }
+#html-menu img { vertical-align: top; border: 0; }
+#html-menu a { vertical-align: top }
+#html-menu .i span.ms { float: left; width: 24px; margin-bottom: 4px; }
+#html-menu .m span.ms { float: left; width: 32px }
+#html-menu .sm span.ms { float: left; width: 24px; background: url(../../image/unterpunkt.png); }
+#html-menu div.m { height: 24px }
+#html-menu div.m span.mic { color:black; position: relative; top: 4px }
+#html-menu div.m:hover,
+#html-menu div.i:hover { color:blue; background-color: #d1d1d1; cursor: pointer; }
+#html-menu span.mic { white-space: normal; display: inline-block; vertical-align: top; line-height: 1.2; }
+#html-menu a.ml span.mic { width: 145px } /* fix deep indents */
+#html-menu div.s0 { padding-left: 2px }
+#html-menu div.s1 { padding-left: 8px }
+#html-menu div.s2 { padding-left: 16px }
+
+body { margin: 0 }
index 2713bb41344600fe27b35438380e1d1f3a817bf7..852a76c985c183d33b70f47919e44b707f4e9a34 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 87f17b8404822001b19c39946b77a3c8b822cea6..c190cb7e59db4fa37a890fef7129047c19d92ed8 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 be94243928e1214bbeaf41d179885cb0af9eb847..19f98b20c851a916134ab4dcdbcf625ace7fc151 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 }
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 d785dd2b2d58cd8fc8f4a693a7406f6b66c68991..5170e1d4a0776baf16bf35374b9d05d3c46d4aa0 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 9e4c5bc2936833f5d63c69fa735848807bc4a395..bf23469a8eb23f6f77fd782bf29b6fd96d9770d6 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 ec2242648eea2d6ef4c863701da00346e770a482..ed7c48f29f33887c72466903b853a4de4edf2d5f 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);
+})
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
+
+
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 db4198e1b2da12acbfb0978d45361a8563ac94be..91a193bcb32c4cf26ddc0174b81facf4ebc36106 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 f75b1b7562aa249063c8a1c49ebc49ce192c6b2a..b059a3a8e42e3ef94d2bce7c7c5c3a8361f10fc5 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
 [% USE HTML %][% USE LxERP %]
-<body>
 
  <p><div class="listtop">[% title %]</div></p>
 
 
  <hr>
 
-</body>
-</html>
index 1041b12917fab26c5664ac75257ace7fb36f4aba..c82876a1ee5f6f00872e576ecfbc6e17127e8dc8 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 35ecb01ce34dc0c4e8c5c4e40d4cf96113abc2bd..5971d5c272af3b57e82fc5e26771f1483f79f2d4 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
 [% USE HTML %][% USE LxERP %]
-<body>
 
  <p><div class="listtop">[% title %]</div></p>
 
@@ -24,5 +23,3 @@
   </p>
  </form>
 
-</body>
-</html>
index 1195f287e2ec71c54840faa9775cfc73bb73b7ef..4d47e605b7260807059c7a1e1b8c9ca48734d8f0 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 db56f82295ca5f77e0ed140edfa603f1bfb02145..74ce4f2fcaee6c7bca3096556e9cdd984fe2f6c5 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
 [% USE HTML %][% USE LxERP %]
-<body>
 
  <p><div class="listtop">[% title %]</div></p>
 
     -->
  </script>
 
-</body>
-</html>
index ad9a076595497f2c6dfa89d589ac8ed98cb54f39..3522ceac0e35565cc0f1c48d7529043dda139e54 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 63181fcccdb9aef518aee2b4efc320b536f59831..6570c436b7464e102d10159d9b2c5d5f64ff51b8 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 f0999282fe2f8252306faf1da4bae373cfe3a832..e6252dc7d6b857df4bc75a89d51bd34697988cae 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 ee0c244a6b7a98d00d77c8c49c0f9e0b5def53c8..4fab42b0ca740cb0415a1954fe2713e840919c27 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 7a3f044343d6a4e4bacb67fb11b91d1fda07ef47..6fde4eff1ef752c98c91cf0e734767e322320c3b 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 876cb4ee7b1625d6b6ae05113c6b069e28415958..543f228e2579c8c08231e8eb57b32537019433b6 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 bce74e048a22ef891f6d800a47fd8e45d7170851..756247a5f7e965f4949e77fe86c25917bc795cba 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 68f31d77103d66035e80827c9bbefaef7282b6d1..bb29cf922bb3d6d7dc52b211fc0fe435944bb45e 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 7f0397a88415989da32322f016b817e87c29b4c1..8e727d9625e03c23411b28910719549a2dcba645 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 816d0b18e1a4ee38ef574c1aec69261994c2642b..f8e5ffe195e00f56103c73a867d99c8e5a202eca 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 23c547a3fcdb98224c674d2e6662aa0f9729c3b9..3a106f5858b58f96b080eda002f1a8299fb58d8b 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 00f0489180fe0bcc8b8422f3a226e5f29ce3cb0f..2f2fa6de591448403dfaddf1e4ed6b2f147e0c5d 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 f6097a51b3d99e4667ef01288111e5973618b86d..74e14670ab9a387f3e5df8e51dd0495104601701 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 31fffca0e74a12e513f2283bd812e5cdda09d1d4..f832912e4b69c597c39b87c3d419a07fef41ccad 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 c3537da4e88d1881a2130a627d72cad23de9bd1c..6926c9c279b223b8c346bc00bd69940413654425 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 b55a3d57be92bd8209abc1e7caa0c76e6436eca4..b88757a3bc93edcbd9f737ad7835d9ca1c95ccaa 100644 (file)
@@ -16,5 +16,3 @@
  <input type="submit" name="action" value="[% 'Continue' | $T8 %]">
 </form>
 
-</body>
-</html>
index 68c7ecaeea4007addd982c1f1c7f89d779a577a6..8b137891791fe96927ad78e64b0aad7bded08bdc 100644 (file)
@@ -1,2 +1 @@
-<body>
 
index 5db6ab37d915bcad07b3270feb631ee82897c6c8..2e891ee6512168537314c420055b3438722dd3dc 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 a6d8bf06975dcc55fcd5d7a7677ded3126bf7b87..591ae30cd0011e7b1b3e978bd36256292f8e966a 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 3114b62e3fd8aa51cd3a0288207ca71fbf5ab414..de6c8d73644b557ed9c8f473fe0e038203c52ac2 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 fe70347a5eacd11631c7a26f5308d48c02f1ceb6..662c0400a02f850d344affc7201bc215292fead1 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 d893a5807c6122d5750e9dc97526561104fa49f9..ee6d9ef0a8d02d57de345aa54e58ef4667922749 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 6d72ca03fdb254cf56af147527f64b1e3ba3953a..8db61d90d967da561b7c1b3dd3a4b16d00b06c90 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 ea8e8d74c4c43f6a814c90887605d71ca5362349..02a47062cc002198b3f948e6717eecc3a083371f 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 2817315148b68722da43a4a6b197a3ba88248c44..7758fec06584ff044ceac65e6efbaeaa63ea9d55 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 0143fb4d6ed81426bea79145af36db3ca1378eb0..baece7d7edabfe295b4e0156c71630da03f5aa0a 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 ede5e7ccdaea05013c640df6e732fba99cbe1aed..2cef6495fa46f8a3d2724d59a116022fc325eb93 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 fc0b2839e4e80bd42fdfe96a4c881a8d2d7509b7..6559709e1d86ad271692d0f6219d3927f0134d01 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 8a93f90ddf09e21997f7cbe546eac86e0674f537..80fdd56c43c620021f062e0ee5bfa9a6802efc18 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 ef34e55e7fed074d2f2857db4b8ae92accf870b6..b35345241942724aa1616930ec1267913b50717b 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 5f5114caa87d21c3311a3e57cf39c599acddf001..376a4b08e76a694118b017458f63efcf9e99d0fd 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 c20263c39323b01fc1b9c8ee4e7014e4bb5e24f8..99b60027cdeb4ca0af2fcd816c0653e83b48c2f7 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 6f50b6410f2f32e7da7825683ad6e3ddd5504a09..7aef54db9bd75e19d3693ea5e8b81612822e5846 100644 (file)
@@ -1,5 +1,4 @@
 [%- USE T8 %]
-<body>
 
 <form method=post>
 
@@ -37,5 +36,3 @@
 
 </form>
 
-</body>
-</html>
index 6ff4b5e88d471a44a8d26801d5703cec98fa573e..6a413d8532a1bfd1675dad2a8437b68797f1804c 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 1675eab5eb948a375e5b57c585eb77e5bc57bcef..761cc0ee1ec77d1d4f24567fb4a7eba09be884c8 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 2da736fe12e4c00904125ca0b33086e28b83bb4f..4843f86145596847ed48cb2e23a13eb2e519064e 100644 (file)
@@ -2,7 +2,6 @@
 [%- USE L %]
 [%- USE LxERP %]
 [%- USE T8 %]
-<body>
 
 <h1>[% title | html %]</h1>
 
index bc4a8a28ed3edebfd6967b37fd909f2860310b77..7f5718d7443b37c5ae501ef35b012d65bdebf10b 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 29a968757d0069cd0ac29e3b3b31c8e842467c2f..387c18cab45550e3a86c3de08f051c00a7c7c8ea 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 541b29a71fcc3d2c2428923b31fd615fe6089029..28dd70d2788454d77a9db73bb5d7478026364d2c 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 76a08e46340305b8382d9486f512dd1a323d461f..dcf0be088524ca2e90fe1776bc1d3dd333b594a7 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 5b6d40a1575a4b9de1caa2f6e056ef839773c6d4..05351ff29a45ae83c08279ae853c7d002f4a0368 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
+[%- USE HTML %]
 
  <div class="listtop">[% title %]</div>
 
   </p>
  </form>
 
-</body>
-</html>
index 105f8b30f80325d3a59188055cd8381690e360bc..a46d2cb536e4c3c4cc5403f729c212042142c9b0 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
+[%- USE HTML %]
 
  [% IF MESSAGE %]<p>[% MESSAGE %]</p>[% END %]
 
@@ -32,5 +32,3 @@
   </p>
  </form>
 
-</body>
-</html>
index c495e6913141a0f488979726fbbae1456dd0463e..832bd0f2be3f55feca252992c10c8e327100aef9 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 bbce544146238305d17e23b5486f203033206936..4c49e7066a4339173c639e701032be12714dc386 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
+[%- USE HTML %]
 
  <h1>[% title %]</h1>
 
@@ -79,5 +79,3 @@
 
  </form>
 
-</body>
-</html>
index c9495e14e7ad2d0a56a6586597e8fc1ec9ffba59..8384d44fc5b4bd14f4dbac77fa42c600b9af27da 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 c7ca819af2b5514ed7f84c52a161cc7e7f55b42d..ba953df27633a46673104b4fe02a542cf3ca2819 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 %]
 
  [% END %]
 
-</body>
-</html>
index 99bfdf3a78d83f5f99553d00d83ce19a3716c0d2..c5c9e34bbafc9df8469c3b6966e1b2385e35acad 100644 (file)
@@ -11,5 +11,3 @@
 
 </form>
 
-</body>
-</html>
index 99ec45f8702da1157627ef3383a44105a983caf6..e446f4302456fdc9ad998c7490c15055a6eefac5 100644 (file)
@@ -2,7 +2,6 @@
 [%- USE HTML %]
 [%- USE LxERP %]
 [%- USE T8 %]
-<body>
 
 <form method=post action=am.pl>
 
index a49d18ef55e2c69c033f48cd8c91788054e37361..30f80802e5c67fd5a83d38bb6315621d7e57277c 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 2287eb65cf52ca76a39e4d45a4e1974ecd7f18b0..1a0b03324a6239e1b8ce423a65d155b6d466c37a 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE HTML %]
 [%- USE T8 %]
-<body>
 
 <form method=post action=am.pl>
 
index 2e2010e223374ef79bae40844ccb7c376c85fd3b..5ccb55c25d0769f607fba8ddb2127d4354a3bb39 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 358f18f51fc606ed07aa264519b5050bb2bed586..0938a45536718addf037a0bbedebfaf860cca930 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 0f3c0135c802aa0c8e8070706ed09ef45b11e394..863b1a19271c691f8b18cb32f18857d074c7bfde 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 3d24b51779c391d451bd95a18c1d835a284c0f75..b5d43bc1176d15af3a52d1d2eed9866f2cac1bdc 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 d4e0e0f74feb618bd291c0664a9d64884e764725..65a9a735f7c454ebb300b92f68131175fd51f59d 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 3eccf69a27cca3f2d477c23a45b0c5375ddb7e12..6c2ebe1a37940ee28c168edbf3d60dfd5373b4aa 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 4c76eb66eaedc443e4fbb7235cf4a1bf5a212345..0a237d41e1e02b57396b5c29e0cff49a15da6ea5 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 20bcf372c2cba1d2bbd2a2ab82df47c5a5ade634..dc2f2f543e4614dac3a33a82c3e2cdf54b67b227 100644 (file)
@@ -9,5 +9,3 @@
 
  </form>
 
-</body>
-</html>
index 466ab345662113c165621529d8c28983f9c3ae77..8ac37eca60211c60603615fdb97f6282342d5b79 100644 (file)
@@ -66,5 +66,3 @@ function set_duedate() {
 </script>
 
 
-</body>
-</html>
index fb2907900d2f8518dc0d13aa3e4546c9bd0f5920..0bb447b31980fd3845722474d5c6798570153227 100644 (file)
@@ -1,6 +1,5 @@
 [%- USE T8 %]
 [%- USE L %]
-<body>
 
  <form method=post name="search" action=[% script %]>
 
    <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 f05c8a274ef2df0a436a83895ac298e79d544f23..ad631f3f364c2610ea70d1138087ff8be0d13c71 100644 (file)
@@ -9,5 +9,3 @@
 
  </form>
 
-</body>
-</html>
index 0e65ea9c6f372dd6dbbc45d5023891d6150b2534..7fa799f5fcf30a29c7c8b7b0e629e50ad186c5f8 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) %]
index 89cb50c9c965e7aa89ad674e2d3b5ac0af662c27..07f2fc1f18c33e4dee0801e1dd30b151b66f9c37 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 f3fb66e7bf13e9fd69d046ad2e0ee228124441fa..ffd0b865477b5def10b736ad6791fb36b8b4e1d8 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 737a49edf2995dfad1aaa301a93b6234a4ae5a01..90eecd09922e36db5bcb477204c5969336d02060 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 b8ea3f64dcc39051ba4f7d89c61674eff27e3a7a..b3d53eaa4fef6b1392e5a3b5d89d56cbfc9fe7de 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 bf732d44eed0f4bd1fb7fbf6f72474a6fe826839..e044a7ad35e13ba9e9d5c7703913865e2391f2d0 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 e9df400604a9afd61db9505a87b8c26d98b8691c..5e42d08b34456f54bc46e925d004dff4164ca758 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 b12468231fab3784e7a8c25be68816f177787bff..ef4febeb9b2c8d5f29cc291baeab4d30802692f7 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 eaa86fdd694edd0431329f9458afe43b79fc5574..0b6778be796bf9e8604742504c710bf33d37a39c 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 cc163ef1423952be2cf573e616c115b7bfe82144..6fd976762552908126c04e6d9114ad922fa23e7f 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 01d5726bc0897b4ac4b2607db6ca657f5282595c..590b1d3e7240c7dc0636c22cabd1621d3965616f 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 80bfed7190e50d8f792a51ff9d0949c4c1e64b84..c3f3a99f9941a12aad74361b6f9638811b5d4b9a 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 3189dce997f2a24b94e73fd86dbd5609e436df14..82cd1807e0f65e8471b9f0055ab6fd494b13635f 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 cc8074d1a274848c07692c8159c1ed2b3a52ce50..fe5ccd2a3edab89a83fac10d94578abaa24c7d63 100644 (file)
   //-->
 </script>
 
-</body>
-</html>
index a0abdc275bc5eb447fe06a21622e76323de91a31..89c2f4599864ca502f68c66e2b002a18f61d58da 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 91976467bd93827b6b25ec6980e6f703a70f150c..e67510586d8bfb1f7fdaf76f766acff48ca0f456 100644 (file)
@@ -11,5 +11,3 @@
 <input class=submit type=submit name=action value="[% 'Post' | $T8 %]">
  </form>
 
-</body>
-</html>
index c513eca9b9f348bfc3716bcb3fbf7776e8e3ffdb..4d24a8a239b2c477d8be1dfb0575c95e8757387c 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 4d6618bd613ab61578ced5ee294791938d2d74cc..c8e67219db93cf6e9b349fa858415e0663d8bf9e 100644 (file)
@@ -2,7 +2,6 @@
 [%- USE LxERP %]
 [%- USE L %]
 [%- USE T8 %]
-<body>
 
  <div class="listtop">[% FORM.title %]</div>
 
     });
     -->
  </script>
-</body>
-</html>
index cab0f8e11b8a40b31b454a4f2527e2b576c6e613..791aacf00b1e8aa2c734477a2f5576a18bfb9b6e 100644 (file)
@@ -53,5 +53,3 @@
 
     -->
  </script>
-</body>
-</html>
index 8530b1e1421550e0b31166dc12f4902710a1fb26..43f64b0e243a659db341e9892289e1a41bc2e236 100644 (file)
@@ -1,7 +1,6 @@
 [%- USE T8 %]
 [% USE HTML %][% USE LxERP %]
 [% USE L %]
-<body>
 
  <h1>[% title %]</h1>
 
index eeea49ab286e874bc5c2c82f2110796c8c94823b..41302471e2dd154505f62367109388364038f1b4 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) %]">
   <input type="submit" class="submit" name="action" value="[% 'Continue' | $T8 %]">
  </form>
 
-</body>
-</html>
index 0f7c127144362666dc7b31c640bb37831e39e17b..f7d291be586037684cdbaa930e85ec1c9b333785 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 49c0f77e918d2ba5fa117cae42e1a01d37ba1f21..5b79f9728a31e682e4da43d257faccdfeeea45d9 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 8b389484a71b900608e3135740da707894839bd7..9c69bf1d927d812cec59c412ce99548a507bdeeb 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 89f81a1c8f9ab71ee7f582d28ec04fad3bdf0dc7..b1ffef87cd1914ac6176a1d4acdae54c87e79575 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 03cc368fda8290002055ede8664eece0b75c1d00..d6ea25035c778a25941f10dc3ae92ae637a03b02 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 f9dba7052e0739d01f2cb8ba3d29948dedaea41c..d5e3b53d68ba3a781f60b950f5106090319ce8e1 100644 (file)
@@ -8,5 +8,3 @@
  <p><input type="submit" value="[% 'Continue' | $T8 %]"></p>
 </form>
 
-</body>
-</html>
index 09d840b6eb43ba5864546f7404fb7dc72800dc80..285fb83e902f5e1e14ef21cc5e87a4ccd4a48986 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
+[%- USE HTML %]
 
  <table width="100%">
   <tr>
index d009ea0c349f03609ed31980d03dc01862ffa3ff..81eb941bc6b49ce15cdcb49c280cdc6a572429e4 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 7433aa95a59bc83e006add58ee18d2030eee6fa9..5406f63624ed406a7725f1e81584d92c2d01876d 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 9cd35923c66ccd781624d779875e52782ced2230..252463e04f813c9b27dcdc095b24fdb892becf16 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 cc7d34b443e42bfcb7ed84e894795a14c26c0b8f..a37e94239510bf7b0f163af711e027b92e14560f 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 848fa898ea252a699692744f29760b35cccbbe88..ef415027f0f18480371b789f89f7669858212316 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 f7ab5d591d43c0fae8d321444d002f1256aaabe6..6e1bedc15a5211633f0ae5d611a26add4793fa3a 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 8110594446e5b198ac9fbe6160393b801614ba80..b3a525008f0df33ca359aeb599d7e0a56925ef33 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 57bfc939f00b631e302212e01e9b212ed82c2fb1..27457f310b9c9421739190dae90340e7aa8e7eec 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 f9ffbba10a27521309c1e559885ce54b148d6e80..6aee3510f051fb0206d8216b17a23694ee0be1d4 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 13aae21f351f53a2fa3c5621ed2e1cab5e3f777a..87af688ba2ddd0471b29665ccf97f9484af698f0 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 aaf04ac4edd1f4bf103819d104fb49ca64015936..ed75369a99bc62ace20a2398e5bcfa40b87dc11d 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 da8d94752b8fd3b076c005888a3a8336993bec2a..c58651e429935bd36b1dc8575c8ddb66228ce452 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 b539ad938ec70b32a9a8aa782f8c4bb960713ac4..3dabbfa3b61dd4655b036c2ad173807b4bb8a270 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 5d3bfdf8b42c1ad907c834bb80801105bafc3a9c..18737886c54bc359850bf54fc516ce48c92ee3f0 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 1b96ed91e43b03cf13f9b4561a684e50f8001c3f..e2d558d4c3e588b45cea1a722b96b1a59efb2a5b 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 2f05d15b6aa6e085156b7b60f25997f847c94df1..ee85ec0a78109ee708180141ed3ad338480c689d 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 99e2dfbe6acb467a9bc84ee6bc5e6961324ec0a4..ce7579b8c201fc4f42b2b1af3578ab627ab3f049 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 4beb3d63decd8c6b38a57b8104fae5e7d6a3933d..72f954d8da8fb173d3864d34476019b8e1d3c488 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 d1668652f83246acd03d83259f609dc62f183675..0a91a41a77ed15c6f333b23789a560f035fade2a 100644 (file)
@@ -1 +1 @@
-<body onload="window.close()"></body></html>
+<script type='text/javascript'>$(function(){ window.close() })</script>
index 2c807150e81c80dc6edd838056a70a61a8fbf122..999f5a516a77bfdf0910c6c9c29d5741480bc2ec 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 e8186333b5bd1cf6c81aff326608056688359d9b..a0683115a772ff69973826131c06cbb539c2f2b3 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 576bfdff752862e9de7ca7641d36661b14b2965b..3b9fcee00a4810597b47212d8527f4aa734e3480 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 73dd750ae5d57db4e21f79703dbeb2b3f0560b91..97e9e426456620fd4852e35ba6d78ab98ae8a011 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 f3cdbcdb4a9f1f0f77426158e46130fb3db1c9c2..49ccd3c6e187e6e0fd438befb5850bfdf78fb739 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 9aec0ca977863d7ebf6f88b3531f41c3523a729e..e528c78faacec688678c4cf114d0a3b36aecad33 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%">
@@ -72,5 +71,3 @@
 <input name="action" class="submit" type="submit" value="[% 'Continue' | $T8 %]">
 </form>
 
-</body>
-</html>
index 7778152b693a233b51157395a08e10e6e726faf6..47defefeb2bf673243ce3cc782e30c1918a1e9ff 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 7c6deb91cdd7b68cff7dabe68e6241543e425181..f99471409017cb33e8cc2c346464bca041fe5aa8 100644 (file)
@@ -1,4 +1,4 @@
-[%- USE LxERP %][% USE HTML %]<body>
+[%-- USE LxERP %][%- USE HTML %]
 
  <h1 class="message_error">[%- LxERP.t8('Error!') %]</h1>
 
@@ -20,5 +20,3 @@
   </table>
  </div>
 
-</body>
-</html>
index a6f6bd7547c79973a7b0aaec66f71e52bc40ae20..c0f70a0cda5f89725f61db28000f4b2f62e2f710 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 3d6fbe08fe45499cf99d3579387e18b9e0fa07eb..82b6f747e3d92cd4106b9fb408ce5ba968a92dd5 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 ac4aa4a21f327d64b0d73914ab4604fd7b7c6ac1..3bca0a880642ae6ce1b2cf3152c16ec095399839 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 20858c1ad5eb919de2c95263a56f4a3736478339..9f8957eb9424914d1c1b640aa887f71edaab0502 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 324c4738ad67436e5102de2cdde655273d9e8e6f..f08104146258faf4b08d700cec3e223d57331410 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 35258df75f980d79030e23c7de82fe6acf436359..e34bed9ce638b65d10401ba29deccfe77b6868b4 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 72b50cde11e567b9afdc4e35ae17d02c0560158c..1b4b9d0647f932cb21d986d4644da0ba60169b1c 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 345886acba899c3c1f205956b0bb56c48c96d778..60d01ad0337be72f982df8ea14eec14f8bafa878 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 c6acd8446b6c45ab05fba28621d330f824def5fb..c5658df8dbf9905ac3b6d5108ef9c8dc37c48926 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 48ad9952c8a8cdd07c366c573a2a2dec455e2f58..72b78939bcb30e5f0034e3cb58e17730eddcdb8c 100644 (file)
@@ -48,5 +48,3 @@
 
   </form>
 
-</body>
-</html>
index e6ba49e19f968d4bab8b0a6d7fe1d70b6b77f2ba..448b8a33f3c48f1377bb90a5c87bdd6c4c8294f8 100644 (file)
@@ -2,8 +2,6 @@
 [%- USE LxERP %]
 [%- USE T8 %]
 [%- USE L %]
-<body onLoad="focus()">
-
 <script type="text/javascript">
   <!--
   function setTaxkey(row) {
index 9f7c45e64ca56e275410750a4dd838f48a04a4b3..3f1fd404d03760053ff7b04de5a35393ec491100 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 eb625257cf91016ae86cde51f173966dba5b8199..7f8ea040f0c9e0a5f9d123ebbc47d796f91f8d98 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 cc28548fd8a8c9439dab3b867746201fd917ffe3..910c91a4cdc12996abf4ea4b18387694f0a95f6a 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 9022e6d96f39e3b06becb4f83a760fb8ed987c7f..7fd6908734ef98408910d1c15f1f45b2bdb1ebf7 100644 (file)
@@ -95,5 +95,3 @@
   -->
 </script>
 
-</body>
-</html>
index 1ed3b365a607d06be484bae230cec1bb3b89f37b..29fbb7aa8322357b472b86e8a082402a1140ec7a 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>
 
index 947f7d0645545d5cf0a501eae0c98a4424f61d00..59fd2f6cdca8d8d1a13f7bdb22d778cbcb695741 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 c00b22a9f131b89a1104da2082b94de96539288d..ffdf29bc25bdb743eca58c7464845c2a7ddce18f 100644 (file)
@@ -2,7 +2,6 @@
 [%- USE HTML %]
 [%- USE LxERP %]
 [%- USE L %]
-<body>
 
  <form method="post" action="ic.pl">
 
   </p>
  </form>
 
-</body>
-</html>
index a8ce6481d512d89f9933728f346e438ad97d2f07..e6eeb9843a8fa88b12013da9687e09c0eeb77313 100644 (file)
@@ -1,7 +1,6 @@
 [%- USE T8 %]
 [%- USE HTML %]
 [%- USE LxERP %]
-<body>
 
  <form method="post" action="ic.pl">
 
   </p>
  </form>
 
-</body>
-</html>
index f57ef775078975f5401ba477a732ea1305aaeaf9..803e93ea79614d0fd6163facb5b12475412833db 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 318a5ebcdbdc64ca010e570d3e50284b0cf9724d..10f0ce2cc4edb9fe4c94a95faf9a5588e635ec46 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 c82f1ab81a4576d91e29b778bcc5a597edb35da7..2f255f78826accce820552dd14d046938f73c80b 100644 (file)
 
 </form>
 
-</body>
 
-</html>
index ee186c0b10cfb19240b465b3e98acd1cc0dedf22..d8c026e4a57acedeea2a5800c39830a11f2d37f4 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>
 [% IF creditwarning != '' %]
        alert('[% 'Credit Limit exceeded!!!' | $T8 %]');
 [% ELSE %]
-       focus();
 [% END %]
-       setupDateFormat('[% dateformat %]', '[% 'Falsches Datumsformat!' | $T8 %]');
-       setupPoints('[% numberformat %]', '[% 'wrongformat' | $T8 %]');
      });
      function set_duedate() {
        $.ajax({
index e0ef583748cfdd5166aff4615f155cdc6cf39ab7..6cbcd4ef1db7c0fbe133914807380387473e9f5b 100644 (file)
 <input type="hidden" name="gldate" value="[% gldate %]">
 </form>
 
-</body>
 
-</html>
index 433d3b14e612c335d7664b75f82da60bcb6816b5..4178a219a3f931b3bda194bae414a6456bacfaef 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>
 [% 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..22bb2a2
--- /dev/null
@@ -0,0 +1 @@
+function fokus(){ [% IF focus %]$('[% focus %]').focus()[% ELSE %][% fokus %].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 6f0ff8bf0fcbb33bccc4222caf37b9c1019d6f14..92dc8d24271708b3ff3592889a66038d5cee435e 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 a15da6be7d3b204c4f20d0691b66135714caf31e..a92c7c3ac944c1f5902034e2130ad0b6322b59f2 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 c756e5c62a99b848dbedf463d4e14f9c7e2a449f..556cd014d1b40a7398819f8f7fb09b81bcd2e1cd 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 e477a42f7bc4f782fb4164a224db42e203f964e2..f65b6a25e71a665a2feeeaf742df2f3e5c9b9c72 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 877cc18a6bad44f991d3c488a68c403f378b7ba7..08776e7609d4cccfa2dc8f941f07850017b9e30f 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 862d7def2805b95dbf1ce172a816fdf5b4ab323f..26760fedd88429654f3896d6cfda1d3162d9bc68 100644 (file)
@@ -1,6 +1,5 @@
 [%- 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>]
  <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 d5526754137b3ef56c287bec06f79394ed04700a..630667f0c209d2af4a9bc99a4f7247c72ae2bf40 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>
 
@@ -25,7 +24,7 @@ window.onload=clockon
     [<a href="JavaScript:top.main_window.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 cfe50a3e575a08ab69a8cbfd6692ab6975591fcf..b3f064a5c0d04211d20caa77254d9fbf0f50c05e 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>
 
@@ -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 b0b72f40b6d339b779bb789038acb65a9a159a64..a24b637db68980952d703ba53a2fb07fcba0788d 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 35a5135ff0209bcb4cd44b5e69cf32497898996e..06cf9b4c2fc87dc67a0aa955cc577475037d33c6 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 5f63afc51f8c7254a1275ef28510576b257662b9..6ef6c0e56198bad3f9420c8c04d0f83c40644528 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 ff458688682f858a878ad7c476daa2b1a66e8c85..839fb45fd5bf6896b207f6b64f8a31167e5b39d6 100644 (file)
@@ -1,7 +1,6 @@
 [% USE HTML %]
 [% USE LxERP %]
 [% USE L %]
-<body>
 
  <div class="listtop">[% title %]</div>
 
     -->
  </script>
 
-</body>
-</html>
index 6a8e64fcd4b2299dba471fc781dda02b68876b44..ddf4a53d2b544310958e51035116ee016379f65f 100644 (file)
 [% END %]
 
 </form>
-
-
-    <script type="text/javascript">
-     <!--
-       $('document').ready(function(){
-         setupDateFormat('[% dateformat %]', '[% 'Falsches Datumsformat!' | $T8 %]');
-         setupPoints('[% numberformat %]', '[% 'wrongformat' | $T8 %]');
-       });
-     //-->
-    </script>
-</body>
-</html>
index 76190766ff77508646d867c004704865a2b77967..eed285c72af4a552bbfeb41d23f120abfd7138d1 100644 (file)
@@ -2,7 +2,6 @@
 [%- USE HTML %]
 [%- USE LxERP %]
 [%- USE L %]
-<body onLoad="[% onload %]">
 
   <form method="post" name="oe" action="[% script %]">
 
index 6b8a184642acea50b26c956009cfd72a2281a734..bea5c67477a14aaed262f92592fc809647869ae0 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 115f07757c9d1a2bffc69a547c44fbce5ab7fe26..576979d629a9344f3eee563a68551a14ddff2087 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 81818fec05ce8ef135bcb3b44dabdabce7806b52..8d1b33e19ebf497ca4f930c5ad654ef46c8b022f 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 9282beb9555818e6444291d5d0a5da9d3410d83d..82db67ccb3e711022d132a11574179591626ae2f 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 040ed56fa74806db69c58e7279a89791e4e4243d..b4298656229665a7264a442a74636bb40af3fecc 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 fd1ffd927073bb9c40485143eec62307286e4605..3213be203501f5ddf84d0611906da652dd348ad1 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 99ea2334e5cb68f9e8777c9333281a0d0acc1eff..d0f1fcea3d8d42358a10102efc2e72945e874b6f 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 c66bb493211b3b377806f70da33e3b11b1c5d4d3..c833fdcc3ff6eda057256b8db3b41cf467aa2275 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 fbf1e5dc3e3c5c974ddd9b4da4539474f5db23f1..ed75005d938c6b703848735ca4dec6122acb0c8a 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 c205a1b3fe5c6045d3d032e158e2149ad760f2ed..b1586eb5cc2634b7ad069df7526ac2ff724ec61d 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 6ea5be4a8021f0f16a6d5583bc3caf74b3ae3d4d..714d66ebd8be4ec3b9d75a24bc097dec4f4dfd31 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 bd7921687b15fde7a193cb4dd08151bc7008c028..dec347e8ebf567d35f41e728a35925d605ab6a43 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 25c74c3395f9dde16599b5c9679c18c53ce8740b..f2718a1a7065c6b07f72ffbf1d94f30c10efe18c 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 376ff6f5215df9e5fae48a6847506d7e01957203..940b3065c1b7a6a47cbc512397b14d195a021152 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 b292f85a5fb08adf9b71cc7247784d8be7b8b84d..642442a45f1d5da6935123db0261630e42fd86e1 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 0d49f2821028bb7bff4d01dc249711351b5305d2..45a1fcea50efe536bd5c6854918e9196daed10d6 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 332c5ef12a55042b725da6acf30717337a57bd00..71908655ccd74f14479a35b38d3d30f872670be8 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 8956ed7ffc1830762fcdbfce114873364c3a127a..59a98b7b80dbc55c2c843f7d79333b9311c56750 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 1fd8d45b3ca66f17272d132b2c3aba851c84f0df..e6e93240adf0cbfc9348340cb7dea4173961e829 100644 (file)
@@ -1,8 +1,6 @@
 [%- USE T8 %]
 [%- USE HTML %]
 [%- USE LxERP %]
-<body bgcolor="#ffffff">
-
 <h2 align="center">
 [% company %]
 <br>[% address %]
index 6d44c8fed592344f8d4ed7655eb639896f4c31b5..387769ec52ee91433dd1731ddc548d793e53b5b1 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 269e44c9aadff80cd8a4372b53760e916124aed4..54e47f7f4be541a9f2d04c5827df900b875577f8 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[% USE HTML %]<body>
+[%- USE HTML %]
 
  <script type="text/javascript">
   <!--
   </form>
  [% END %]
 
-</body>
index d99d45897d25e80d51e2953954be1fa2f21bf877..cf755d6b7fbbd138841c212ad95d638525deea46 100644 (file)
@@ -74,7 +74,6 @@
   </tr>
 [%- END %]
 
-<body onLoad="[% onload %]">
 <h1>[% title %]</h1>
 
 <form method=post action='[% script %]'>
 
 </form>
 
-</body>
-</html>
index 4ff5b501069ede06ef80c882eab09def03e470f1..1a56a14a1ab52c59dd2ff66270b3d88e616bd7f0 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 56d36d042df8acd6a8c912760f5594de2df537c8..41a8ff0e15f8992c063789a6ad35bd34259fa873 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 a2dc8c0f3bf42ffb132f9508c001f535a63ec627..c20436fd7fabc6e1d288c67d558d58902a1b7bbd 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 6740ba1f316c5019af4b5714f0e9d1a12989fa6c..773cdea73bd6566f3e0a560183c89b97aef52b55 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 3af74c98010cd2449af0f3b7001e3309e044762b..1ab516e6f429d56c02cc85bef8c92d9eb92bd701 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 063b4eec42a4e5a244548fdbe72497ce23ff66cc..9f76291246641e2acf1b53c2c8e0f079953d4883 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 74060f5ba35221396fc503ef2e3bb22d254183a4..613f12dd73378645576f7e457884e539e6203bdf 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 2b1c279a028a495093a7078859c74bafc44f4003..293ffd26ae9b20e0a5d639c80af65578d2260b57 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 8d6a137dff607d0456f2a0d9f28e6be43801005f..04566d2753bb61ee8bcf574f7b5d90556c14a75f 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 0d1a74ac37fc656cbade934a0b1e24b1deefa456..d5b31525a5ccfa2a68b12c7dae702d1f4bab2d75 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 9f4f79dc776e298bc36ee732c5b4995abb2ba17f..48a2e3eb0799b51150e8ee66d2b6c0d05dee0196 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 e5ee4900c2bb634b684c40c2567ee4bd32945061..53946be96835f2da125487f38241e78c28c05f70 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 a397e13fed8c1c3363b6a14935d2275a0ab48a16..5db479d911d246df6da98afa2cb9ec48e31dfc1a 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 e1d2281d678cc7e7d7e0796a66eff3846ea2d2f5..95a4b6141bbbe04e9a2c3c7ff62647af77467771 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 bae47709344d34ee72d8d122b82301b5cefc4f72..36740581e2145713e714dd53aa7a41509c1a3d51 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 f156cb7e482318d46f0c1701211afc9093def93e..837023ed334d53387405a38fa07337f1e16f13dc 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 9215374e991f925d059a4e22de1c982e8cc2f6c7..77a5070be5459c3eefef09db350a6d88b8708395 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 6ef7eda857d9f7a4ce3b4584242c697d75c05dbd..e026dc61448d8402e4e1c34d2c67f530bd2f4679 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 254e8549c75f8ae09422cfc1b48f6c36c5828236..29ffe751c1cab7e8cedbefba94e1768834d9edb0 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 3999e8cc64ed829e58e981231ffa75ee312972fb..394450c76d91763082b63bd9ccc832de28df3b0d 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 fef9940a4b4ce30112c41a717bb72f0758e809b8..bdff7961d8dbe30e2ce0d19649c90fd7e9ee4094 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>
+