From: Bernd Bleßmann Date: Tue, 7 Jan 2014 15:09:18 +0000 (+0100) Subject: resubmit beim Drucken für Lieferscheine ohne speichern gefixt (Opera/Chromium). X-Git-Tag: release-3.1.0beta1~22^2~25^2~5^2~3 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=ee561795f028a6298d47b3d1df8597c1e088151f;p=kivitendo-erp.git resubmit beim Drucken für Lieferscheine ohne speichern gefixt (Opera/Chromium). Behebt #1859. --- 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*$//;