From d7f060429e809653d45e93e86b3c5c8d7129e0a9 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 11 May 2007 13:59:44 +0000 Subject: [PATCH] =?utf8?q?Lx-Office=20verlangt=20inzwischen=20an=20sehr=20?= =?utf8?q?vielen=20Stellen,=20dass=20Javascript=20zwingend=20angeschaltet?= =?utf8?q?=20ist,=20weil=20es=20ansonsten=20schlicht=20nicht=20mehr=20funk?= =?utf8?q?tioniert.=20Deswegen=20sind=20Abfragen=20auf=20die=20Verwendung?= =?utf8?q?=20des=20Javascript-Kalenders=20reine=20Platzverschwendung=20und?= =?utf8?q?=20bl=C3=A4hen=20den=20Code=20unn=C3=B6tig=20auf.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Form.pm | 1 - bin/mozilla/ap.pl | 4 +- bin/mozilla/ar.pl | 4 +- bin/mozilla/bp.pl | 2 +- bin/mozilla/cp.pl | 2 +- bin/mozilla/dn.pl | 2 +- bin/mozilla/gl.pl | 2 +- bin/mozilla/ic.pl | 6 +-- bin/mozilla/ir.pl | 49 +++++++++--------------- bin/mozilla/is.pl | 91 +++++++++++++++++---------------------------- bin/mozilla/oe.pl | 95 +++++++++++++++++------------------------------ bin/mozilla/rp.pl | 2 +- lx-erp.conf | 5 +-- 13 files changed, 100 insertions(+), 165 deletions(-) diff --git a/SL/Form.pm b/SL/Form.pm index 458667768..a11122c49 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -508,7 +508,6 @@ sub parse_html_template { $additional_params->{"myconfig_jsc_dateformat"} = $jsc_dateformat; } - $additional_params->{"conf_jscalendar"} = $main::jscalendar; $additional_params->{"conf_lizenzen"} = $main::lizenzen; $additional_params->{"conf_latex_templates"} = $main::latex; $additional_params->{"conf_opendocument_templates"} = $main::opendocument_templates; diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index 88c450d35..a3356a74d 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -455,7 +455,7 @@ selectvendor } | } # use JavaScript Calendar or not - $form->{jsscript} = $jscalendar; + $form->{jsscript} = 1; $jsscript = ""; if ($form->{jsscript}) { @@ -1204,7 +1204,7 @@ sub search { $form->{title} = $locale->text('AP Transactions'); # use JavaScript Calendar or not - $form->{jsscript} = $jscalendar; + $form->{jsscript} = 1; $jsscript = ""; if ($form->{jsscript}) { diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index 382e733d3..8119a8ac2 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -471,7 +471,7 @@ selectcustomer}| $form->{fokus} = "arledger.customer"; # use JavaScript Calendar or not - $form->{jsscript} = $jscalendar; + $form->{jsscript} = 1; $jsscript = ""; if ($form->{jsscript}) { @@ -1224,7 +1224,7 @@ sub search { $form->{javascript} .= qq||; # use JavaScript Calendar or not - $form->{jsscript} = $jscalendar; + $form->{jsscript} = 1; $jsscript = ""; if ($form->{jsscript}) { diff --git a/bin/mozilla/bp.pl b/bin/mozilla/bp.pl index e43005660..846aba181 100644 --- a/bin/mozilla/bp.pl +++ b/bin/mozilla/bp.pl @@ -155,7 +155,7 @@ sub search { } # use JavaScript Calendar or not - $form->{jsscript} = $jscalendar; + $form->{jsscript} = 1; $jsscript = ""; if ($form->{jsscript}) { diff --git a/bin/mozilla/cp.pl b/bin/mozilla/cp.pl index c7b85c60a..ee6ab98f3 100644 --- a/bin/mozilla/cp.pl +++ b/bin/mozilla/cp.pl @@ -178,7 +178,7 @@ sub form_header { | if $form->{selectdepartment}; - $form->{jsscript} = $jscalendar; + $form->{jsscript} = 1; $jsscript = ""; if ($form->{jsscript}) { diff --git a/bin/mozilla/dn.pl b/bin/mozilla/dn.pl index 52f6cd55d..c67e37e04 100644 --- a/bin/mozilla/dn.pl +++ b/bin/mozilla/dn.pl @@ -262,7 +262,7 @@ sub search { $form->{nextsub} = "show_dunning"; # use JavaScript Calendar or not - $form->{jsscript} = $jscalendar; + $form->{jsscript} = 1; $jsscript = ""; if ($form->{jsscript}) { diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index e7d965421..d7d7ebf81 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -241,7 +241,7 @@ sub search { '-labels' => \%project_labels)); # use JavaScript Calendar or not - $form->{jsscript} = $jscalendar; + $form->{jsscript} = 1; $jsscript = ""; if ($form->{jsscript}) { diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl index a60baeb70..3765f64a5 100644 --- a/bin/mozilla/ic.pl +++ b/bin/mozilla/ic.pl @@ -80,7 +80,7 @@ sub search { # $locale->text('Services') # use JavaScript Calendar or not - $form->{jsscript} = $jscalendar; + $form->{jsscript} = 1; $jsscript = ""; if ($form->{jsscript}) { @@ -404,7 +404,7 @@ sub search_update_prices { IC->get_pricegroups(\%myconfig, \%$form); # use JavaScript Calendar or not -# $form->{jsscript} = $jscalendar; +# $form->{jsscript} = 1; # $jsscript = ""; # if ($form->{jsscript}) { # @@ -2455,7 +2455,7 @@ sub form_header { # type=submit $locale->text('Edit Service') # type=submit $locale->text('Edit Assembly') # use JavaScript Calendar or not - $form->{jsscript} = $jscalendar; + $form->{jsscript} = 1; $jsscript = ""; if ($form->{jsscript}) { diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index 159dc45e8..136d6790f 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -78,10 +78,8 @@ sub invoice_links { $lxdebug->enter_sub(); # create links - $form->{webdav} = $webdav; - - # set jscalendar - $form->{jscalendar} = $jscalendar; + $form->{webdav} = $webdav; + $form->{jsscript} = 1; $form->create_links("AP", \%myconfig, "vendor"); @@ -403,34 +401,24 @@ sub form_header { $n = ($form->{creditremaining} =~ /-/) ? "0" : "1"; # use JavaScript Calendar or not - $form->{jsscript} = $form->{jscalendar}; + $form->{jsscript} = 1; $jsscript = ""; - if ($form->{jsscript}) { - - # with JavaScript Calendar - $button1 = qq| - - text('button') . qq|> - |; - $button2 = qq| - - text('button') . qq|> + + $button1 = qq| + + text('button') . qq|> |; + $button2 = qq| + + text('button') . qq|> + |; - #write Trigger - $jsscript = - Form->write_trigger(\%myconfig, "2", "invdate", "BL", "trigger1", - "duedate", "BL", "trigger2"); - } else { - - # without JavaScript Calendar - $button1 = - qq||; - $button2 = - qq||; - } + #write Trigger + $jsscript = + Form->write_trigger(\%myconfig, "2", "invdate", "BL", "trigger1", + "duedate", "BL", "trigger2"); $form->{"javascript"} .= qq||; $form->{"javascript"} .= qq||; @@ -720,9 +708,6 @@ sub form_footer { print $webdav_list; } print qq| -{jscalendar}> -|; - print qq| diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index f02e066dd..e2b99cb74 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -567,67 +567,46 @@ sub form_header { $form->{fokus} = "invoice.customer"; # use JavaScript Calendar or not - $form->{jsscript} = $jscalendar; + $form->{jsscript} = 1; $jsscript = ""; if ($form->{type} eq "credit_note") { - if ($form->{jsscript}) { - - # with JavaScript Calendar - $button1 = qq| - |; - - #write Trigger - $jsscript = - Form->write_trigger(\%myconfig, "1", - "invdate", "BL", - "trigger1"); - } else { - - # without JavaScript Calendar - $button1 = - qq||; - $button2 = - qq||; - } + $button1 = qq| + |; + + #write Trigger + $jsscript = + Form->write_trigger(\%myconfig, "1", + "invdate", "BL", + "trigger1"); } else { - if ($form->{jsscript}) { - - # with JavaScript Calendar - $button1 = qq| - - |; - $button2 = qq| - - |; - $button3 = qq| - + $button1 = qq| + |; - - #write Trigger - $jsscript = - Form->write_trigger(\%myconfig, "3", - "invdate", "BL", - "trigger1", "duedate", - "BL", "trigger2", - "deliverydate", "BL", - "trigger3"); - } else { - - # without JavaScript Calendar - $button1 = - qq||; - $button2 = - qq||; - } + $button2 = qq| + + |; + $button3 = qq| + + |; + + #write Trigger + $jsscript = + Form->write_trigger(\%myconfig, "3", + "invdate", "BL", + "trigger1", "duedate", + "BL", "trigger2", + "deliverydate", "BL", + "trigger3"); } + if ($form->{resubmit} && ($form->{format} eq "html")) { $onload = qq|window.open('about:blank','Beleg'); document.invoice.target = 'Beleg';document.invoice.submit()|; diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 5b8275c64..b8d754c5c 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -162,9 +162,8 @@ sub order_links { ($form->{vc} eq 'customer') ? "AR" : "AP"); # retrieve order/quotation - $form->{webdav} = $webdav; - # set jscalendar - $form->{jscalendar} = $jscalendar; + $form->{webdav} = $webdav; + $form->{jsscript} = 1; my $editing = $form->{id}; @@ -331,36 +330,24 @@ sub form_header { shiptophone shiptofax shiptodepartment_1 shiptodepartment_2); # use JavaScript Calendar or not - $form->{jsscript} = $form->{jscalendar}; + $form->{jsscript} = 1; $jsscript = ""; - if ($form->{jsscript}) { - - # with JavaScript Calendar - $button1 = qq| - - |; - $button2 = qq| - - |; - - #write Trigger - $jsscript = - Form->write_trigger(\%myconfig, "2", "transdate", "BL", "trigger1", - "reqdate", "BL", "trigger2"); - - } else { - - # without JavaScript Calendar - $button1 = qq| - |; - $button2 = qq| - |; - } + $button1 = qq| + + |; + $button2 = qq| + + |; + + #write Trigger + $jsscript = + Form->write_trigger(\%myconfig, "2", "transdate", "BL", "trigger1", + "reqdate", "BL", "trigger2"); my @tmp; @@ -1084,9 +1071,7 @@ sub form_footer { print $webdav_list; } - print qq| -{jscalendar}> -|; + print qq| - |; - $button2 = qq| - - |; - - #write Trigger - $jsscript = - Form->write_trigger(\%myconfig, "2", "transdatefrom", "BR", "trigger3", - "transdateto", "BL", "trigger4"); - } else { - # without JavaScript Calendar - $button1 = qq| - |; - $button2 = qq| - |; - } + $button1 = qq| + + |; + $button2 = qq| + + |; + + #write Trigger + $jsscript = + Form->write_trigger(\%myconfig, "2", "transdatefrom", "BR", "trigger3", + "transdateto", "BL", "trigger4"); my $vc = $form->{vc} eq "customer" ? "customers" : "vendors"; diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl index 5a2519475..da1a265ac 100644 --- a/bin/mozilla/rp.pl +++ b/bin/mozilla/rp.pl @@ -147,7 +147,7 @@ sub report { '-labels' => \%project_labels)); # use JavaScript Calendar or not - $form->{jsscript} = $jscalendar; + $form->{jsscript} = 1; $jsscript = ""; if ($form->{report} eq "ustva") { $department = ""; diff --git a/lx-erp.conf b/lx-erp.conf index 0779deee7..db364883d 100644 --- a/lx-erp.conf +++ b/lx-erp.conf @@ -1,5 +1,5 @@ use Cwd; -use vars qw($userspath $spool $memberfile $templates $sendmail $language $sid $latex $eur $webdav $lizenzen $jscalendar $watch_form_variables); +use vars qw($userspath $spool $memberfile $templates $sendmail $language $sid $latex $eur $webdav $lizenzen $watch_form_variables); # path to user configuration files $userspath = "users"; @@ -39,9 +39,6 @@ $ENV{PERL5LIB} .= ":/sw/lib/perl5"; $webdav = 0; $lizenzen = 1; -# Jscalendar an/aus -$jscalendar = 1; - ## Support fuer OpenDocument-Vorlagen # Diese Option legt fest, ob OpenDocument-Vorlagen generell verfuegbar sind. $opendocument_templates = 1; -- 2.20.1
- + - - - + {duedate} onBlur=\"check_right_date_format(this)\"> + + - text('button') . qq|> - text('button') . qq|> + text('button') . qq|> + text('button') . qq|>
@@ -1413,34 +1398,24 @@ sub search { } # use JavaScript Calendar or not - $form->{jsscript} = $jscalendar; + $form->{jsscript} = 1; $jsscript = ""; - if ($form->{jsscript}) { - - # with JavaScript Calendar - $button1 = qq| - - text('button') . qq|> - text('button') . qq|> + text('button') . qq|> + text('button') . qq|>