From 348d92dd4eef97a607e2ad87eda20e63804c4f89 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Tue, 8 Oct 2019 18:55:38 +0200 Subject: [PATCH] =?utf8?q?Controller::send=5Ffile:=20rendern=20bei=20ajax?= =?utf8?q?=20abschalten=20k=C3=B6nnen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Damit kann man weitere client_js-Kommandos absetzen. --- SL/Controller/Base.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SL/Controller/Base.pm b/SL/Controller/Base.pm index b8f53e96a..f9db85aaf 100644 --- a/SL/Controller/Base.pm +++ b/SL/Controller/Base.pm @@ -159,7 +159,8 @@ sub send_file { if ($::request->is_ajax || $params{ajax}) { my $octets = ref $file_name_or_content ? $file_name_or_content : \ do { local $/ = undef; <$file> }; - $self->js->save_file(MIME::Base64::encode_base64($$octets), $content_type, $size, $attachment_name)->render; + $self->js->save_file(MIME::Base64::encode_base64($$octets), $content_type, $size, $attachment_name); + $self->js->render unless $params{js_no_render}; } else { print $::form->create_http_response(content_type => $content_type, content_disposition => 'attachment; filename="' . $attachment_name . '"', -- 2.20.1