From: Sven Schöling Date: Thu, 9 Jul 2015 14:52:56 +0000 (+0200) Subject: Layout/empty: empty.json und emty.html ermöglichen X-Git-Tag: release-3.3.0beta~31^2~26 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=98e679e3eb9f09d13938df305cad3f47a5862b9f;p=kivitendo-erp.git Layout/empty: empty.json und emty.html ermöglichen --- diff --git a/SL/Controller/Layout.pm b/SL/Controller/Layout.pm index d5d0988f3..e92e861aa 100644 --- a/SL/Controller/Layout.pm +++ b/SL/Controller/Layout.pm @@ -8,7 +8,7 @@ use SL::JSON (); sub action_empty { my ($self) = @_; - if ($::form->{format} eq 'json') { + if ($::form->{format} eq 'json' || $::request->type eq 'json') { my $layout = { pre_content => $::request->{layout}->pre_content, start_content => $::request->{layout}->start_content, @@ -21,6 +21,8 @@ sub action_empty { }; $self->render(\ SL::JSON::to_json($layout), { type => 'json', process => 0 }); + } else { + $self->render(\'', { process => 0 }); } }