Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision d7f06042

Von Moritz Bunkus vor mehr als 17 Jahren hinzugefügt

  • ID d7f060429e809653d45e93e86b3c5c8d7129e0a9
  • Vorgänger 47916a37
  • Nachfolger fb4d2ffa

Lx-Office verlangt inzwischen an sehr vielen Stellen, dass Javascript zwingend angeschaltet ist, weil es ansonsten schlicht nicht mehr funktioniert. Deswegen sind Abfragen auf die Verwendung des Javascript-Kalenders reine Platzverschwendung und blähen den Code unnötig auf.

Unterschiede anzeigen:

SL/Form.pm
508 508
    $additional_params->{"myconfig_jsc_dateformat"} = $jsc_dateformat;
509 509
  }
510 510

  
511
  $additional_params->{"conf_jscalendar"} = $main::jscalendar;
512 511
  $additional_params->{"conf_lizenzen"} = $main::lizenzen;
513 512
  $additional_params->{"conf_latex_templates"} = $main::latex;
514 513
  $additional_params->{"conf_opendocument_templates"} = $main::opendocument_templates;
bin/mozilla/ap.pl
455 455
  }
456 456

  
457 457
  # use JavaScript Calendar or not
458
  $form->{jsscript} = $jscalendar;
458
  $form->{jsscript} = 1;
459 459
  $jsscript = "";
460 460
  if ($form->{jsscript}) {
461 461

  
......
1204 1204
  $form->{title} = $locale->text('AP Transactions');
1205 1205

  
1206 1206
  # use JavaScript Calendar or not
1207
  $form->{jsscript} = $jscalendar;
1207
  $form->{jsscript} = 1;
1208 1208
  $jsscript = "";
1209 1209
  if ($form->{jsscript}) {
1210 1210

  
bin/mozilla/ar.pl
471 471
  $form->{fokus} = "arledger.customer";
472 472

  
473 473
  # use JavaScript Calendar or not
474
  $form->{jsscript} = $jscalendar;
474
  $form->{jsscript} = 1;
475 475
  $jsscript = "";
476 476
  if ($form->{jsscript}) {
477 477

  
......
1224 1224
  $form->{javascript} .= qq|<script type="text/javascript" src="js/common.js"></script>|;
1225 1225
  
1226 1226
  # use JavaScript Calendar or not
1227
  $form->{jsscript} = $jscalendar;
1227
  $form->{jsscript} = 1;
1228 1228
  $jsscript = "";
1229 1229
  if ($form->{jsscript}) {
1230 1230

  
bin/mozilla/bp.pl
155 155
  }
156 156

  
157 157
  # use JavaScript Calendar or not
158
  $form->{jsscript} = $jscalendar;
158
  $form->{jsscript} = 1;
159 159
  $jsscript = "";
160 160
  if ($form->{jsscript}) {
161 161

  
bin/mozilla/cp.pl
178 178
	    </tr>
179 179
| if $form->{selectdepartment};
180 180

  
181
  $form->{jsscript} = $jscalendar;
181
  $form->{jsscript} = 1;
182 182
  $jsscript = "";
183 183
  if ($form->{jsscript}) {
184 184

  
bin/mozilla/dn.pl
262 262
  $form->{nextsub} = "show_dunning";
263 263

  
264 264
  # use JavaScript Calendar or not
265
  $form->{jsscript} = $jscalendar;
265
  $form->{jsscript} = 1;
266 266
  $jsscript = "";
267 267
  if ($form->{jsscript}) {
268 268

  
bin/mozilla/gl.pl
241 241
                         '-labels' => \%project_labels));
242 242

  
243 243
  # use JavaScript Calendar or not
244
  $form->{jsscript} = $jscalendar;
244
  $form->{jsscript} = 1;
245 245
  $jsscript = "";
246 246
  if ($form->{jsscript}) {
247 247

  
bin/mozilla/ic.pl
80 80
  # $locale->text('Services')
81 81

  
82 82
  # use JavaScript Calendar or not
83
  $form->{jsscript} = $jscalendar;
83
  $form->{jsscript} = 1;
84 84
  $jsscript = "";
85 85
  if ($form->{jsscript}) {
86 86

  
......
404 404
  IC->get_pricegroups(\%myconfig, \%$form);
405 405

  
406 406
  # use JavaScript Calendar or not
407
#   $form->{jsscript} = $jscalendar;
407
#   $form->{jsscript} = 1;
408 408
#   $jsscript = "";
409 409
#   if ($form->{jsscript}) {
410 410
# 
......
2455 2455
  # type=submit $locale->text('Edit Service')
2456 2456
  # type=submit $locale->text('Edit Assembly')
2457 2457
  # use JavaScript Calendar or not
2458
  $form->{jsscript} = $jscalendar;
2458
  $form->{jsscript} = 1;
2459 2459
  $jsscript = "";
2460 2460
  if ($form->{jsscript}) {
2461 2461

  
bin/mozilla/ir.pl
78 78
  $lxdebug->enter_sub();
79 79

  
80 80
  # create links
81
  $form->{webdav} = $webdav;
82

  
83
  # set jscalendar
84
  $form->{jscalendar} = $jscalendar;
81
  $form->{webdav}   = $webdav;
82
  $form->{jsscript} = 1;
85 83

  
86 84
  $form->create_links("AP", \%myconfig, "vendor");
87 85

  
......
403 401
  $n = ($form->{creditremaining} =~ /-/) ? "0" : "1";
404 402

  
405 403
  # use JavaScript Calendar or not
406
  $form->{jsscript} = $form->{jscalendar};
404
  $form->{jsscript} = 1;
407 405
  $jsscript = "";
408
  if ($form->{jsscript}) {
409

  
410
    # with JavaScript Calendar
411
    $button1 = qq|
412
       <td><input name=invdate id=invdate size=11 title="$myconfig{dateformat}" value="$form->{invdate}" onBlur=\"check_right_date_format(this)\">
413
        <input type=button name=invdate id="trigger1" value=|
414
      . $locale->text('button') . qq|></td>
415
       |;
416
    $button2 = qq|
417
       <td width="13"><input name=duedate id=duedate size=11 title="$myconfig{dateformat}" value="$form->{duedate}"  onBlur=\"check_right_date_format(this)\">
418
        <input type=button name=duedate id="trigger2" value=|
419
      . $locale->text('button') . qq|></td></td>
406

  
407
  $button1 = qq|
408
     <td><input name=invdate id=invdate size=11 title="$myconfig{dateformat}" value="$form->{invdate}" onBlur=\"check_right_date_format(this)\">
409
      <input type=button name=invdate id="trigger1" value=|
410
    . $locale->text('button') . qq|></td>
420 411
     |;
412
  $button2 = qq|
413
     <td width="13"><input name=duedate id=duedate size=11 title="$myconfig{dateformat}" value="$form->{duedate}"  onBlur=\"check_right_date_format(this)\">
414
      <input type=button name=duedate id="trigger2" value=|
415
    . $locale->text('button') . qq|></td></td>
416
   |;
421 417

  
422
    #write Trigger
423
    $jsscript =
424
      Form->write_trigger(\%myconfig, "2", "invdate", "BL", "trigger1",
425
                          "duedate", "BL", "trigger2");
426
  } else {
427

  
428
    # without JavaScript Calendar
429
    $button1 =
430
      qq|<td><input name=invdate size=11 title="$myconfig{dateformat}" value="$form->{invdate}"  onBlur=\"check_right_date_format(this)\"></td>|;
431
    $button2 =
432
      qq|<td width="13"><input name=duedate size=11 title="$myconfig{dateformat}" value="$form->{duedate}" onBlur=\"check_right_date_format(this)\"></td>|;
433
  }
418
  #write Trigger
419
  $jsscript =
420
    Form->write_trigger(\%myconfig, "2", "invdate", "BL", "trigger1",
421
                        "duedate", "BL", "trigger2");
434 422

  
435 423
  $form->{"javascript"} .= qq|<script type="text/javascript" src="js/show_form_details.js"></script>|;
436 424
  $form->{"javascript"} .= qq|<script type="text/javascript" src="js/common.js"></script>|;
......
720 708
    print $webdav_list;
721 709
  }
722 710
  print qq|
723
<input type=hidden name=jscalendar value=$form->{jscalendar}>
724
|;
725
  print qq|
726 711
  <tr>
727 712
    <td colspan=$colspan>
728 713
      <table width=100%>
bin/mozilla/is.pl
567 567
  $form->{fokus} = "invoice.customer";
568 568

  
569 569
  # use JavaScript Calendar or not
570
  $form->{jsscript} = $jscalendar;
570
  $form->{jsscript} = 1;
571 571
  $jsscript = "";
572 572
  if ($form->{type} eq "credit_note") {
573
    if ($form->{jsscript}) {
574
  
575
      # with JavaScript Calendar
576
      $button1 = qq|
577
        <td><input name="invdate" id="invdate" size="11" title="$myconfig{dateformat}" value="$form->{invdate}" onBlur=\"check_right_date_format(this)\">
578
         <input type="button" name="invdate" id="trigger1" value="|
579
        . $locale->text('button') . qq|"></td>|;
580
       
581
      #write Trigger
582
      $jsscript =
583
        Form->write_trigger(\%myconfig,     "1",
584
                            "invdate",      "BL",
585
                            "trigger1");
586
    } else {
587
  
588
      # without JavaScript Calendar
589
      $button1 =
590
        qq|<td><input name="invdate" size="11" title="$myconfig{dateformat}" value="$form->{invdate}" onBlur=\"check_right_date_format(this)\"></td>|;
591
      $button2 =
592
        qq|<td width="13"><input name="duedate" size="11" title="$myconfig{dateformat}" value="$form->{duedate}"></td>|;
593
    }
573
    $button1 = qq|
574
      <td><input name="invdate" id="invdate" size="11" title="$myconfig{dateformat}" value="$form->{invdate}" onBlur=\"check_right_date_format(this)\">
575
       <input type="button" name="invdate" id="trigger1" value="|
576
      . $locale->text('button') . qq|"></td>|;
577

  
578
    #write Trigger
579
    $jsscript =
580
      Form->write_trigger(\%myconfig,     "1",
581
                          "invdate",      "BL",
582
                          "trigger1");
594 583
  } else {
595
    if ($form->{jsscript}) {
596
  
597
      # with JavaScript Calendar
598
      $button1 = qq|
599
        <td><input name="invdate" id="invdate" size="11" title="$myconfig{dateformat}" value="$form->{invdate}" onBlur=\"check_right_date_format(this)\">
600
         <input type="button" name="invdate" id="trigger1" value="|
601
        . $locale->text('button') . qq|"></td>
602
        |;
603
      $button2 = qq|
604
        <td width="13"><input name="duedate" id="duedate" size="11" title="$myconfig{dateformat}" value="$form->{duedate}" onBlur=\"check_right_date_format(this)\">
605
         <input type="button" name="duedate" id="trigger2" value="|
606
        . $locale->text('button') . qq|"></td></td>
607
      |;
608
      $button3 = qq|
609
        <td width="13"><input name="deliverydate" id="deliverydate" size="11" title="$myconfig{dateformat}" value="$form->{deliverydate}" onBlur=\"check_right_date_format(this)\">
610
         <input type="button" name="deliverydate" id="trigger3" value="|
611
        . $locale->text('button') . qq|"></td></td>
584
    $button1 = qq|
585
      <td><input name="invdate" id="invdate" size="11" title="$myconfig{dateformat}" value="$form->{invdate}" onBlur=\"check_right_date_format(this)\">
586
       <input type="button" name="invdate" id="trigger1" value="|
587
      . $locale->text('button') . qq|"></td>
612 588
      |;
613
  
614
      #write Trigger
615
      $jsscript =
616
        Form->write_trigger(\%myconfig,     "3",
617
                            "invdate",      "BL",
618
                            "trigger1",     "duedate",
619
                            "BL",           "trigger2",
620
                            "deliverydate", "BL",
621
                            "trigger3");
622
    } else {
623
  
624
      # without JavaScript Calendar
625
      $button1 =
626
        qq|<td><input name="invdate" size="11" title="$myconfig{dateformat}" value="$form->{invdate}" onBlur=\"check_right_date_format(this)\"></td>|;
627
      $button2 =
628
        qq|<td width="13"><input name=duedate size=11 title="$myconfig{dateformat}" value=$form->{duedate} onBlur=\"check_right_date_format(this)\"></td>|;
629
    }
589
    $button2 = qq|
590
      <td width="13"><input name="duedate" id="duedate" size="11" title="$myconfig{dateformat}" value="$form->{duedate}" onBlur=\"check_right_date_format(this)\">
591
       <input type="button" name="duedate" id="trigger2" value="|
592
      . $locale->text('button') . qq|"></td></td>
593
    |;
594
    $button3 = qq|
595
      <td width="13"><input name="deliverydate" id="deliverydate" size="11" title="$myconfig{dateformat}" value="$form->{deliverydate}" onBlur=\"check_right_date_format(this)\">
596
       <input type="button" name="deliverydate" id="trigger3" value="|
597
      . $locale->text('button') . qq|"></td></td>
598
    |;
599

  
600
    #write Trigger
601
    $jsscript =
602
      Form->write_trigger(\%myconfig,     "3",
603
                          "invdate",      "BL",
604
                          "trigger1",     "duedate",
605
                          "BL",           "trigger2",
606
                          "deliverydate", "BL",
607
                          "trigger3");
630 608
  }
609

  
631 610
  if ($form->{resubmit} && ($form->{format} eq "html")) {
632 611
    $onload =
633 612
      qq|window.open('about:blank','Beleg'); document.invoice.target = 'Beleg';document.invoice.submit()|;
bin/mozilla/oe.pl
162 162
                ($form->{vc} eq 'customer') ? "AR" : "AP");
163 163

  
164 164
  # retrieve order/quotation
165
  $form->{webdav} = $webdav;
166
  # set jscalendar
167
  $form->{jscalendar} = $jscalendar;
165
  $form->{webdav}   = $webdav;
166
  $form->{jsscript} = 1;
168 167

  
169 168
  my $editing = $form->{id};
170 169

  
......
331 330
       shiptophone shiptofax shiptodepartment_1 shiptodepartment_2);
332 331

  
333 332
  # use JavaScript Calendar or not
334
  $form->{jsscript} = $form->{jscalendar};
333
  $form->{jsscript} = 1;
335 334
  $jsscript = "";
336 335

  
337
  if ($form->{jsscript}) {
338

  
339
    # with JavaScript Calendar
340
    $button1 = qq|
341
       <td><input name=transdate id=transdate size=11 title="$myconfig{dateformat}" value="$form->{transdate}" onBlur=\"check_right_date_format(this)\">
342
        <input type=button name=transdate id="trigger1" value=|
343
      . $locale->text('button') . qq|></td>
344
      |;
345
    $button2 = qq|
346
       <td width="13"><input name=reqdate id=reqdate size=11 title="$myconfig{dateformat}" value="$form->{reqdate}" onBlur=\"check_right_date_format(this)\">
347
        <input type=button name=reqdate name=reqdate id="trigger2" value=|
348
      . $locale->text('button') . qq|></td>
349
     |;
350

  
351
    #write Trigger
352
    $jsscript =
353
      Form->write_trigger(\%myconfig, "2", "transdate", "BL", "trigger1",
354
                          "reqdate", "BL", "trigger2");
355

  
356
  } else {
357

  
358
    # without JavaScript Calendar
359
    $button1 = qq|
360
                              <td><input name="transdate" id="transdate" size="11" title="$myconfig{dateformat}" value="$form->{transdate}" onBlur=\"check_right_date_format(this)\"></td>|;
361
    $button2 = qq|
362
                              <td width="13"><input name="reqdate" id="reqdate" size="11" title="$myconfig{dateformat}" value="$form->{reqdate}" onBlur=\"check_right_date_format(this)\"></td>|;
363
  }
336
  $button1 = qq|
337
     <td><input name=transdate id=transdate size=11 title="$myconfig{dateformat}" value="$form->{transdate}" onBlur=\"check_right_date_format(this)\">
338
      <input type=button name=transdate id="trigger1" value=|
339
    . $locale->text('button') . qq|></td>
340
    |;
341
  $button2 = qq|
342
     <td width="13"><input name=reqdate id=reqdate size=11 title="$myconfig{dateformat}" value="$form->{reqdate}" onBlur=\"check_right_date_format(this)\">
343
      <input type=button name=reqdate name=reqdate id="trigger2" value=|
344
    . $locale->text('button') . qq|></td>
345
   |;
346

  
347
  #write Trigger
348
  $jsscript =
349
    Form->write_trigger(\%myconfig, "2", "transdate", "BL", "trigger1",
350
                        "reqdate", "BL", "trigger2");
364 351

  
365 352
  my @tmp;
366 353

  
......
1084 1071

  
1085 1072
    print $webdav_list;
1086 1073
  }
1087
  print qq|
1088
<input type=hidden name=jscalendar value=$form->{jscalendar}>
1089
|;
1074

  
1090 1075
  print qq|
1091 1076
  <tr>
1092 1077
    <td>
......
1413 1398
  }
1414 1399

  
1415 1400
  # use JavaScript Calendar or not
1416
  $form->{jsscript} = $jscalendar;
1401
  $form->{jsscript} = 1;
1417 1402
  $jsscript = "";
1418
  if ($form->{jsscript}) {
1419

  
1420
    # with JavaScript Calendar
1421
    $button1 = qq|
1422
       <td><input name=transdatefrom id=transdatefrom size=11 title="$myconfig{dateformat}" onBlur=\"check_right_date_format(this)\">
1423
       <input type=button name=transdatefrom id="trigger3" value=|
1424
      . $locale->text('button') . qq|></td>
1425
      |;
1426
    $button2 = qq|
1427
       <td><input name=transdateto id=transdateto size=11 title="$myconfig{dateformat}" onBlur=\"check_right_date_format(this)\">
1428
       <input type=button name=transdateto name=transdateto id="trigger4" value=|
1429
      . $locale->text('button') . qq|></td>
1430
     |;
1431

  
1432
    #write Trigger
1433
    $jsscript =
1434
      Form->write_trigger(\%myconfig, "2", "transdatefrom", "BR", "trigger3",
1435
                          "transdateto", "BL", "trigger4");
1436
  } else {
1437 1403

  
1438
    # without JavaScript Calendar
1439
    $button1 = qq|
1440
                              <td><input name=transdatefrom id=transdatefrom size=11 title="$myconfig{dateformat}" onBlur=\"check_right_date_format(this)\"></td>|;
1441
    $button2 = qq|
1442
                              <td><input name=transdateto id=transdateto size=11 title="$myconfig{dateformat}" onBlur=\"check_right_date_format(this)\></td>|;
1443
  }
1404
  $button1 = qq|
1405
     <td><input name=transdatefrom id=transdatefrom size=11 title="$myconfig{dateformat}" onBlur=\"check_right_date_format(this)\">
1406
     <input type=button name=transdatefrom id="trigger3" value=|
1407
    . $locale->text('button') . qq|></td>
1408
    |;
1409
  $button2 = qq|
1410
     <td><input name=transdateto id=transdateto size=11 title="$myconfig{dateformat}" onBlur=\"check_right_date_format(this)\">
1411
     <input type=button name=transdateto name=transdateto id="trigger4" value=|
1412
    . $locale->text('button') . qq|></td>
1413
   |;
1414

  
1415
  #write Trigger
1416
  $jsscript =
1417
    Form->write_trigger(\%myconfig, "2", "transdatefrom", "BR", "trigger3",
1418
                        "transdateto", "BL", "trigger4");
1444 1419

  
1445 1420
  my $vc = $form->{vc} eq "customer" ? "customers" : "vendors";
1446 1421

  
bin/mozilla/rp.pl
147 147
                         '-labels' => \%project_labels));
148 148

  
149 149
  # use JavaScript Calendar or not
150
  $form->{jsscript} = $jscalendar;
150
  $form->{jsscript} = 1;
151 151
  $jsscript = "";
152 152
  if ($form->{report} eq "ustva") {
153 153
    $department = "";
lx-erp.conf
1 1
use Cwd;
2
use vars qw($userspath $spool $memberfile $templates $sendmail $language $sid $latex $eur $webdav $lizenzen $jscalendar $watch_form_variables);
2
use vars qw($userspath $spool $memberfile $templates $sendmail $language $sid $latex $eur $webdav $lizenzen $watch_form_variables);
3 3

  
4 4
# path to user configuration files
5 5
$userspath = "users";
......
39 39
$webdav = 0;
40 40
$lizenzen = 1;
41 41

  
42
# Jscalendar an/aus
43
$jscalendar = 1;
44

  
45 42
## Support fuer OpenDocument-Vorlagen
46 43
# Diese Option legt fest, ob OpenDocument-Vorlagen generell verfuegbar sind.
47 44
$opendocument_templates = 1;

Auch abrufbar als: Unified diff