X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/3880d6570d3ee1d0f26e54887defcf49f359b9a9..4a12c839937370488b8b8a40bef376e7cb0a2ce6:/SL/Form.pm?ds=inline diff --git a/SL/Form.pm b/SL/Form.pm index 12a38c819..b25fe6a2d 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -451,11 +451,15 @@ 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} }, @_) - ]; + + if (@_) { + $self->{stylesheet} = + [ grep { -f } + map { m:^css/: ? $_ : "css/$_" } + grep { $_ } + (@{ $self->{stylesheet} }, @_) + ]; + } return @{ $self->{stylesheet} }; } @@ -489,13 +493,10 @@ sub header { $::lxdebug->leave_sub and return if !$ENV{HTTP_USER_AGENT} || $self->{header}++; - my $layout; - $layout = $self->layout unless $params{no_menu}; - my $css_path = $self->get_stylesheet_for_user; $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}) { @@ -504,20 +505,18 @@ sub header { push @header, ""; } - push @header, map { qq|| } $self->use_stylesheet; + push @header, map { qq|| } $self->use_stylesheet, $::request->{layout}->stylesheets; push @header, "" if $self->{landscape}; push @header, "" if -f $self->{favicon}; push @header, map { qq|| } - qw(jquery common jscalendar/calendar jscalendar/lang/calendar-de jscalendar/calendar-setup part_selection jquery-ui jqModal switchmenuframe); + qw(jquery common jscalendar/calendar jscalendar/lang/calendar-de jscalendar/calendar-setup part_selection jquery-ui jquery.cookie jqModal switchmenuframe); push @header, $self->{javascript} if $self->{javascript}; 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 "", - join ' - ', grep $_, $self->{title}, $self->{login}, $::myconfig{dbname}, $self->{version} if $self->{title}; my %doctypes = ( strict => qq||, @@ -551,13 +550,27 @@ EOT EOT - print $layout; - - print "
\n"; + print $::request->{layout}->pre_content; + print $::request->{layout}->start_content; $::lxdebug->leave_sub; } +sub footer { + # TODO: fix abort conditions + + print $::request->{layout}->post_content; + print "\n" for $::request->{layout}->javascripts; + if (my @inline_scripts = $::request->{layout}->javascript_inline) { + print "\n" for @inline_scripts; + } + + print < + +EOL +} + sub ajax_response_header { $main::lxdebug->enter_sub();