From 01b3bcb99ddc65a3d4504abf3d12f7dff632c05e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Fri, 2 Mar 2012 16:31:56 +0100 Subject: [PATCH] Stylesheets umorganisiert. Doku in css/README.stylesheets --- SL/Dispatcher.pm | 4 +- SL/Form.pm | 30 +- css/Mobile/csshover.htc | 1 + css/Mobile/dhtmlsuite | 1 + css/Mobile/frame_header | 1 + css/Mobile/jquery.autocomplete.css | 1 + css/Mobile/jquery.multiselect2side.css | 1 + css/Mobile/list_accounts.css | 1 + css/{Mobile.css => Mobile/main.css} | 0 css/Mobile/menuv3.css | 1 + css/Mobile/menuv4.css | 1 + css/Mobile/tabcontent.css | 1 + css/Mobile/ui-lightness | 1 + css/README.stylesheets | 16 + css/Win2000/csshover.htc | 1 + css/Win2000/dhtmlsuite | 1 + css/Win2000/frame_header | 1 + css/Win2000/jquery.autocomplete.css | 1 + css/Win2000/jquery.multiselect2side.css | 1 + css/Win2000/list_accounts.css | 1 + css/{Win2000.css => Win2000/main.css} | 0 css/Win2000/menuv3.css | 1 + css/Win2000/menuv4.css | 1 + css/Win2000/tabcontent.css | 1 + css/Win2000/ui-lightness | 1 + css/frame_header/header.css | 26 -- css/{ => lx-office-erp}/csshover.htc | 0 .../dhtmlsuite/menu-bar.css | 6 +- .../dhtmlsuite/menu-item.css | 22 +- css/lx-office-erp/frame_header/header.css | 45 +++ .../jquery.autocomplete.css | 0 .../jquery.multiselect2side.css | 8 +- css/{ => lx-office-erp}/list_accounts.css | 4 +- .../main.css} | 57 +++- css/lx-office-erp/menu.css | 293 ++++++++++++++++++ css/lx-office-erp/tabcontent.css | 87 ++++++ .../ui-bg_diagonals-thick_18_b81900_40x40.png | Bin .../ui-bg_diagonals-thick_20_666666_40x40.png | Bin .../images/ui-bg_flat_10_000000_40x100.png | Bin .../images/ui-bg_glass_100_f6f6f6_1x400.png | Bin .../images/ui-bg_glass_100_fdf5ce_1x400.png | Bin .../images/ui-bg_glass_65_ffffff_1x400.png | Bin .../ui-bg_gloss-wave_35_f6a828_500x100.png | Bin .../ui-bg_highlight-soft_100_eeeeee_1x100.png | Bin .../ui-bg_highlight-soft_75_ffe45c_1x100.png | Bin .../images/ui-icons_222222_256x240.png | Bin .../images/ui-icons_228ef1_256x240.png | Bin .../images/ui-icons_ef8c08_256x240.png | Bin .../images/ui-icons_ffd27a_256x240.png | Bin .../images/ui-icons_ffffff_256x240.png | Bin .../ui-lightness/jquery-ui-1.8.12.custom.css | 0 css/menuv3.css | 131 -------- css/menuv4.css | 140 --------- css/mn_hauptmenu.png | Bin 177 -> 0 bytes css/px_3.gif | Bin 148 -> 0 bytes css/tabcontent.css | 176 ----------- templates/webpages/menu/header.html | 43 ++- templates/webpages/menu/menunew.html | 10 +- templates/webpages/menu/menuv3.html | 2 +- templates/webpages/menu/menuv4.html | 2 +- 60 files changed, 568 insertions(+), 554 deletions(-) create mode 120000 css/Mobile/csshover.htc create mode 120000 css/Mobile/dhtmlsuite create mode 120000 css/Mobile/frame_header create mode 120000 css/Mobile/jquery.autocomplete.css create mode 120000 css/Mobile/jquery.multiselect2side.css create mode 120000 css/Mobile/list_accounts.css rename css/{Mobile.css => Mobile/main.css} (100%) create mode 120000 css/Mobile/menuv3.css create mode 120000 css/Mobile/menuv4.css create mode 120000 css/Mobile/tabcontent.css create mode 120000 css/Mobile/ui-lightness create mode 100644 css/README.stylesheets create mode 120000 css/Win2000/csshover.htc create mode 120000 css/Win2000/dhtmlsuite create mode 120000 css/Win2000/frame_header create mode 120000 css/Win2000/jquery.autocomplete.css create mode 120000 css/Win2000/jquery.multiselect2side.css create mode 120000 css/Win2000/list_accounts.css rename css/{Win2000.css => Win2000/main.css} (100%) create mode 120000 css/Win2000/menuv3.css create mode 120000 css/Win2000/menuv4.css create mode 120000 css/Win2000/tabcontent.css create mode 120000 css/Win2000/ui-lightness delete mode 100644 css/frame_header/header.css rename css/{ => lx-office-erp}/csshover.htc (100%) rename css/{ => lx-office-erp}/dhtmlsuite/menu-bar.css (76%) rename css/{ => lx-office-erp}/dhtmlsuite/menu-item.css (91%) create mode 100644 css/lx-office-erp/frame_header/header.css rename css/{ => lx-office-erp}/jquery.autocomplete.css (100%) rename css/{ => lx-office-erp}/jquery.multiselect2side.css (89%) rename css/{ => lx-office-erp}/list_accounts.css (94%) rename css/{lx-office-erp.css => lx-office-erp/main.css} (89%) create mode 100644 css/lx-office-erp/menu.css create mode 100644 css/lx-office-erp/tabcontent.css rename css/{ => lx-office-erp}/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png (100%) rename css/{ => lx-office-erp}/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png (100%) rename css/{ => lx-office-erp}/ui-lightness/images/ui-bg_flat_10_000000_40x100.png (100%) rename css/{ => lx-office-erp}/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png (100%) rename css/{ => lx-office-erp}/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png (100%) rename css/{ => lx-office-erp}/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png (100%) rename css/{ => lx-office-erp}/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png (100%) rename css/{ => lx-office-erp}/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png (100%) rename css/{ => lx-office-erp}/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png (100%) rename css/{ => lx-office-erp}/ui-lightness/images/ui-icons_222222_256x240.png (100%) rename css/{ => lx-office-erp}/ui-lightness/images/ui-icons_228ef1_256x240.png (100%) rename css/{ => lx-office-erp}/ui-lightness/images/ui-icons_ef8c08_256x240.png (100%) rename css/{ => lx-office-erp}/ui-lightness/images/ui-icons_ffd27a_256x240.png (100%) rename css/{ => lx-office-erp}/ui-lightness/images/ui-icons_ffffff_256x240.png (100%) rename css/{ => lx-office-erp}/ui-lightness/jquery-ui-1.8.12.custom.css (100%) delete mode 100644 css/menuv3.css delete mode 100644 css/menuv4.css delete mode 100755 css/mn_hauptmenu.png delete mode 100644 css/px_3.gif delete mode 100644 css/tabcontent.css diff --git a/SL/Dispatcher.pm b/SL/Dispatcher.pm index dbb476d6c..30a4b819c 100644 --- a/SL/Dispatcher.pm +++ b/SL/Dispatcher.pm @@ -68,7 +68,6 @@ 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'); $::myconfig{countrycode} = $::lx_office_conf{system}->{language}; - $::form->{stylesheet} = 'css/lx-office-erp.css'; $::form->header; print $::form->parse_html_template($template); @@ -221,7 +220,7 @@ sub handle_request { if ($action) { $::instance_conf->init; - map { $::form->{$_} = $::myconfig{$_} } qw(stylesheet charset) + map { $::form->{$_} = $::myconfig{$_} } qw(charset) unless $action eq 'save' && $::form->{type} eq 'preferences'; $::form->set_standard_title; @@ -374,7 +373,6 @@ sub _check_for_old_config_files { return unless @old_files; $::form->{title} = $::locale->text('Old configuration files'); - $::form->{stylesheet} = 'lx-office-erp.css'; $::form->header; print $::form->parse_html_template('login/old_configuration_files', { FILES => \@old_files }); diff --git a/SL/Form.pm b/SL/Form.pm index 6c3b297db..7eab5c294 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -460,6 +460,17 @@ sub use_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 + $css_path = "$css_path/$user_style" if -d "$css_path/$user_style"; + } + $::myconfig{css_path} = $css_path; # needed for menunew, FIXME: don't do this here + + return $css_path; +} + sub header { $::lxdebug->enter_sub; @@ -471,6 +482,8 @@ sub header { $::lxdebug->leave_sub and return if !$ENV{HTTP_USER_AGENT} || $self->{header}++; + my $css_path = $self->get_stylesheet_for_user; + $self->{favicon} ||= "favicon.ico"; $self->{titlebar} = "$self->{title} - $self->{titlebar}" if $self->{title}; @@ -485,17 +498,10 @@ sub header { push @header, "" if $self->{landscape}; push @header, "" if -f $self->{favicon}; - push @header, '', - '', - '', - '', - '', - '', - '', - '', - '', - ''; - push @header, $self->{javascript} if $self->{javascript}; + push @header, map { qq|| } + qw(jquery common jscalendar/calendar jscalendar/lang/calendar-de jscalendar/calendar-setup part_selection jquery-ui jqModal switchmenuframe); + push @header, map { qq|| } + qw(main menu tabcontent list_accounts jquery.autocomplete jquery.multiselect2side frame_header/header); push @header, map { $_->show_javascript } @{ $self->{AJAX} || [] }; push @header, "" if $self->{fokus}; push @header, sprintf "", @@ -531,9 +537,7 @@ sub header { EOT print " $_\n" for @header; print < - - - - + +
[% UNLESS is_links %] -
+ [%- END %] [% IF is_fastcgi && LXCONFIG.debug.show_debug_menu %] - + + Debug: + [FCGI Reload] + [[% IF LXDEBUG.level_by_name('request_timer') %]Timing[% ELSE %]Timing[% END %]] + [[% IF LXDEBUG.level_by_name('trace') %]Trace[% ELSE %]Trace[% END %]] + [[% IF LXDEBUG.level_by_name('query') %]Query[% ELSE %]Query[% END %]] + [[% IF LXDEBUG.level_by_name('warn') %]Warnings[% ELSE %]Warnings[% END %]] + [%- END %] - - -
+ [[% 'Menu' | $T8 %]] [[% 'New Win/Tab' | $T8 %]] [[% 'Print' | $T8 %]] [[% 'Back' | $T8 %]] [[% 'Fwd' | $T8 %]] - - Debug: - [FCGI Reload] - [[% IF LXDEBUG.level_by_name('request_timer') %]Timing[% ELSE %]Timing[% END %]] - [[% IF LXDEBUG.level_by_name('trace') %]Trace[% ELSE %]Trace[% END %]] - [[% IF LXDEBUG.level_by_name('query') %]Query[% ELSE %]Query[% END %]] - [[% IF LXDEBUG.level_by_name('warn') %]Warnings[% ELSE %]Warnings[% END %]] - - [% 'User' | $T8 %]: - [% MYCONFIG.login %] - [[% 'Logout' | $T8 %]] - [% now.to_lxoffice %] - - [% now.hms %] -
+ + [% 'User' | $T8 %]: + [% MYCONFIG.login %] + [[% 'Logout' | $T8 %]] + [% now.to_lxoffice %] - + [% now.hms %] + + diff --git a/templates/webpages/menu/menunew.html b/templates/webpages/menu/menunew.html index 164533990..452c43a2e 100644 --- a/templates/webpages/menu/menunew.html +++ b/templates/webpages/menu/menunew.html @@ -1,5 +1,5 @@ [%- USE T8 %] -[% USE HTML %] +[% USE HTML %]