From: Sven Schöling Date: Tue, 16 Oct 2012 11:13:22 +0000 (+0200) Subject: layout schnipsel für javascript initialisierung ins layout verschoben X-Git-Tag: release-3.0.0beta1~129 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=aee7eda02b6bf9c5661e729e933e15fb506b41cc;p=kivitendo-erp.git layout schnipsel für javascript initialisierung ins layout verschoben --- diff --git a/SL/Layout/None.pm b/SL/Layout/None.pm index 57b996669..1c990ac93 100644 --- a/SL/Layout/None.pm +++ b/SL/Layout/None.pm @@ -10,12 +10,12 @@ sub javascripts_inline { sub _setup_formats { - $::form->parse_html_template('generic/javascript_setup') + $::form->parse_html_template('layout/javascript_setup') } sub _setup_focus { if ($::request->{layout}->focus || $::form->{fokus}) { - return $::form->parse_html_template('generic/focus_setup', { + return $::form->parse_html_template('layout/focus_setup', { focus => $::request->{layout}->focus, fokus => $::form->{fokus}, }) diff --git a/templates/webpages/generic/focus_setup.html b/templates/webpages/generic/focus_setup.html deleted file mode 100644 index 22bb2a280..000000000 --- a/templates/webpages/generic/focus_setup.html +++ /dev/null @@ -1 +0,0 @@ -function fokus(){ [% IF focus %]$('[% focus %]').focus()[% ELSE %][% fokus %].focus()[% END %] } diff --git a/templates/webpages/generic/javascript_setup.html b/templates/webpages/generic/javascript_setup.html deleted file mode 100644 index 49ecb0a3c..000000000 --- a/templates/webpages/generic/javascript_setup.html +++ /dev/null @@ -1,5 +0,0 @@ -[%- USE T8 %] -$(function() { - setupPoints('[% myconfig.numberformat %]', '[% 'wrongformat' | $T8 %]'); - setupDateFormat('[% myconfig.dateformat %]', '[% 'Falsches Datumsformat!' | $T8 %]'); -}) diff --git a/templates/webpages/layout/focus_setup.html b/templates/webpages/layout/focus_setup.html new file mode 100644 index 000000000..22bb2a280 --- /dev/null +++ b/templates/webpages/layout/focus_setup.html @@ -0,0 +1 @@ +function fokus(){ [% IF focus %]$('[% focus %]').focus()[% ELSE %][% fokus %].focus()[% END %] } diff --git a/templates/webpages/layout/javascript_setup.html b/templates/webpages/layout/javascript_setup.html new file mode 100644 index 000000000..49ecb0a3c --- /dev/null +++ b/templates/webpages/layout/javascript_setup.html @@ -0,0 +1,5 @@ +[%- USE T8 %] +$(function() { + setupPoints('[% myconfig.numberformat %]', '[% 'wrongformat' | $T8 %]'); + setupDateFormat('[% myconfig.dateformat %]', '[% 'Falsches Datumsformat!' | $T8 %]'); +})