From: Sven Schöling Date: Tue, 16 Oct 2012 11:37:34 +0000 (+0200) Subject: leerer layout controller X-Git-Tag: release-3.0.0beta1~127 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=2b4d64f05414ddea3b4f2d1062fdb18ebae6acf5;p=kivitendo-erp.git leerer layout controller --- diff --git a/SL/Controller/Layout.pm b/SL/Controller/Layout.pm new file mode 100644 index 000000000..98c012cbc --- /dev/null +++ b/SL/Controller/Layout.pm @@ -0,0 +1,27 @@ +package SL::Controller::Layout; + +use strict; +use parent qw(SL::Controller::Base); + +use JSON (); + +sub action_empty { + my ($self) = @_; + + if ($::form->{format} eq 'json') { + my $layout = { + pre_content => $::request->{layout}->pre_content, + start_content => $::request->{layout}->start_content, + end_content => $::request->{layout}->end_content, + post_content => $::request->{layout}->post_content, + javascripts => [ $::request->{layout}->javascripts ], + javascripts_inline => [ $::request->{layout}->javascripts_inline ], + stylesheets => [ $::request->{layout}->stylesheets ], + stylesheets_inline => [ $::request->{layout}->stylesheets_inline ], + }; + + $self->render(\ JSON::to_json($layout), { type => 'js', raw => 1 }); + } +} + +1;