X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FController%2FBase.pm;h=876aac30fdfb5f92f6c847dc95371a036987d5ec;hb=e36b34d301ba80bbb8f9ba2fe33608e153f8f71c;hp=2d86f0f9641a7c780255b68f3b91ea6755e85e02;hpb=942a5b2c128ebf03d181aef47e42b08f7971c0ee;p=kivitendo-erp.git diff --git a/SL/Controller/Base.pm b/SL/Controller/Base.pm index 2d86f0f96..876aac30f 100644 --- a/SL/Controller/Base.pm +++ b/SL/Controller/Base.pm @@ -60,6 +60,9 @@ sub render { my $template = shift; my ($options, %locals) = (@_ && ref($_[0])) ? @_ : ({ }, @_); + # Special handling/shortcut for an instance of SL::ClientJS: + return $self->render(\$template->to_json, { type => 'json' }) if ref($template) eq 'SL::ClientJS'; + # Set defaults for all available options. my %defaults = ( type => 'html',