Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 3c255f28

Von Sven Schöling vor etwa 12 Jahren hinzugefügt

  • ID 3c255f2892121da44822fd2c391a4ed5b333ff7e
  • Vorgänger 18407da4
  • Nachfolger b16556cc

onload aus do.pl und oe.pl entfernt

Unterschiede anzeigen:

bin/mozilla/do.pl
297 297
  $form->{oldvcname}         =  $form->{"old$form->{vc}"};
298 298
  $form->{oldvcname}         =~ s/--.*//;
299 299

  
300
  $form->{onload} = "";
301 300
  if ($form->{resubmit}) {
301
    my $dispatch_to_popup = '';
302 302
    if ($form->{format} eq "html") {
303
      $form->{onload} = "window.open('about:blank','Beleg'); document.do.target = 'Beleg';";
303
      $dispatch_to_popup .= "window.open('about:blank','Beleg'); document.do.target = 'Beleg';";
304 304
    }
305 305
    # emulate click for resubmitting actions
306
    $form->{onload} .= "document.do.${_}.click(); " for grep { /^action_/ } keys %$form;
307
    $form->{onload} .= "document.do.submit();"
306
    $dispatch_to_popup .= "document.do.${_}.click(); " for grep { /^action_/ } keys %$form;
307
    $dispatch_to_popup .= "document.do.submit();";
308
    $::request->{layout}->add_javascripts_inline("\$(function(){$dispatch_to_popup)");
308 309
  }
309 310

  
310 311
  my $follow_up_vc                =  $form->{ $form->{vc} eq 'customer' ? 'customer' : 'vendor' };
bin/mozilla/oe.pl
402 402
    }
403 403
  }
404 404

  
405
  my $onload = "";
405
  my $dispatch_to_popup = '';
406 406
  if ($form->{resubmit} && ($form->{format} eq "html")) {
407
      $onload  = "window.open('about:blank','Beleg'); document.oe.target = 'Beleg';";
408
      $onload .= "document.do.submit();";
407
      $dispatch_to_popup  = "window.open('about:blank','Beleg'); document.oe.target = 'Beleg';";
408
      $dispatch_to_popup .= "document.do.submit();";
409 409
  } elsif ($form->{resubmit}) {
410 410
    # emulate click for resubmitting actions
411
    $onload  = "document.oe.${_}.click(); " for grep { /^action_/ } keys %$form;
412
    $onload .= "document.oe.submit();";
411
    $dispatch_to_popup  = "document.oe.${_}.click(); " for grep { /^action_/ } keys %$form;
412
    $dispatch_to_popup .= "document.oe.submit();";
413 413
  } elsif ($creditwarning) {
414
    $onload = "alert('$credittext')";
414
    $::request->{layout}->add_javascripts_inline("alert('$credittext')");
415 415
  }
416 416

  
417
  $TMPL_VAR{onload} = $onload;
417
  $::request->{layout}->add_javascripts_inline("\$(function(){$dispatch_to_popup})");
418 418
  $TMPL_VAR{dateformat}          = $myconfig{dateformat};
419 419
  $TMPL_VAR{numberformat}        = $myconfig{numberformat};
420 420

  

Auch abrufbar als: Unified diff