X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FController%2FLayout.pm;h=e92e861aa22cad64489fd43a1bad366435349d46;hb=c39e831b3bceef01a851a0825ce6b19d1ddc3eda;hp=98c012cbccce0c026be419c60b2a5e6019f4a9de;hpb=075bd42af8885aee3c18fe055a2c82b8b43f4cea;p=kivitendo-erp.git diff --git a/SL/Controller/Layout.pm b/SL/Controller/Layout.pm index 98c012cbc..e92e861aa 100644 --- a/SL/Controller/Layout.pm +++ b/SL/Controller/Layout.pm @@ -3,12 +3,12 @@ package SL::Controller::Layout; use strict; use parent qw(SL::Controller::Base); -use JSON (); +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, @@ -20,7 +20,9 @@ sub action_empty { stylesheets_inline => [ $::request->{layout}->stylesheets_inline ], }; - $self->render(\ JSON::to_json($layout), { type => 'js', raw => 1 }); + $self->render(\ SL::JSON::to_json($layout), { type => 'json', process => 0 }); + } else { + $self->render(\'', { process => 0 }); } }