X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=SL%2FForm.pm;h=32675d8cee051282af9e4650d01c41229771f3f9;hb=17f2de0a4b8f2fea0b5140d16d345e8ea180c077;hp=2647a2bcaadf3cacd05c1d987f9da1bbbceb01d7;hpb=fc731b563a7d858dd274eb1f93788611b2e37177;p=kivitendo-erp.git
diff --git a/SL/Form.pm b/SL/Form.pm
index 2647a2bca..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 <
-