Revision d7f06042
Von Moritz Bunkus vor mehr als 17 Jahren hinzugefügt
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%> |
Auch abrufbar als: Unified diff
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.