From ee561795f028a6298d47b3d1df8597c1e088151f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Tue, 7 Jan 2014 16:09:18 +0100 Subject: [PATCH] =?utf8?q?resubmit=20beim=20Drucken=20f=C3=BCr=20Liefersch?= =?utf8?q?eine=20ohne=20speichern=20gefixt=20(Opera/Chromium).?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Behebt #1859. --- bin/mozilla/do.pl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index b722e2081..21e8d3255 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -293,16 +293,16 @@ sub form_header { $form->{oldvcname} = $form->{"old$form->{vc}"}; $form->{oldvcname} =~ s/--.*//; - if ($form->{resubmit}) { - my $dispatch_to_popup = ''; - if ($form->{format} eq "html") { - $dispatch_to_popup .= "window.open('about:blank','Beleg'); document.do.target = 'Beleg';"; - } - # emulate click for resubmitting actions - $dispatch_to_popup .= "document.do.${_}.click(); " for grep { /^action_/ } keys %$form; + my $dispatch_to_popup = ''; + if ($form->{resubmit} && ($form->{format} eq "html")) { + $dispatch_to_popup = "window.open('about:blank','Beleg'); document.do.target = 'Beleg';"; $dispatch_to_popup .= "document.do.submit();"; - $::request->{layout}->add_javascripts_inline("\$(function(){$dispatch_to_popup})"); + } elsif ($form->{resubmit}) { + # emulate click for resubmitting actions + $dispatch_to_popup = "document.do.${_}.click(); " for grep { /^action_/ } keys %$form; } + $::request->{layout}->add_javascripts_inline("\$(function(){$dispatch_to_popup})"); + my $follow_up_vc = $form->{ $form->{vc} eq 'customer' ? 'customer' : 'vendor' }; $follow_up_vc =~ s/--\d*\s*$//; -- 2.20.1