X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FForm.pm;h=32675d8cee051282af9e4650d01c41229771f3f9;hb=2c6997eca202daacb743c80d1d65c6faed61ad35;hp=70a559d3537e1abcea2ed9425caa01ac4f291e7f;hpb=2d75060f8f44f7be4e65a07cd04b3f1735d9fed7;p=kivitendo-erp.git diff --git a/SL/Form.pm b/SL/Form.pm index 70a559d35..32675d8ce 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -460,6 +460,19 @@ 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"; + } 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; @@ -471,6 +484,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 +500,11 @@ 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 ui-lightness/jquery-ui-1.8.12.custom); + push @header, map { qq|| } push @header, map { $_->show_javascript } @{ $self->{AJAX} || [] }; push @header, "" if $self->{fokus}; push @header, sprintf "", @@ -531,9 +540,7 @@ sub header { EOT print " $_\n" for @header; print < -