From: Sven Schöling Date: Fri, 26 Oct 2012 12:26:43 +0000 (+0200) Subject: Unterstützung für $::form->{fokus} entfernt, weil zu anfällig. X-Git-Tag: release-3.0.0beta1~77 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=8202e4b9b95a9b478e50aa74240bf5a705f33d21;p=kivitendo-erp.git Unterstützung für $::form->{fokus} entfernt, weil zu anfällig. behebt #2028 --- diff --git a/SL/Layout/None.pm b/SL/Layout/None.pm index ac7d5fcbe..ff82d8e1c 100644 --- a/SL/Layout/None.pm +++ b/SL/Layout/None.pm @@ -30,10 +30,9 @@ sub _setup_formats { } sub _setup_focus { - if ($::request->{layout}->focus || $::form->{fokus}) { + if ($::request->{layout}->focus) { return $::form->parse_html_template('layout/focus_setup', { focus => $::request->{layout}->focus, - fokus => $::form->{fokus}, }) } else { return (); diff --git a/js/common.js b/js/common.js index 298d5a2cb..cabc6507e 100644 --- a/js/common.js +++ b/js/common.js @@ -166,7 +166,6 @@ $(document).ready(function () { }); // legacy. sone forms install these if (typeof fokus == 'function') { fokus(); return; } - if (focus_by_name('fokus')) return; if (focus_by_name('cursor_fokus')) return; set_cursor_to_first_element(); }); diff --git a/templates/webpages/layout/focus_setup.html b/templates/webpages/layout/focus_setup.html index 22bb2a280..e97fb69dc 100644 --- a/templates/webpages/layout/focus_setup.html +++ b/templates/webpages/layout/focus_setup.html @@ -1 +1 @@ -function fokus(){ [% IF focus %]$('[% focus %]').focus()[% ELSE %][% fokus %].focus()[% END %] } +function fokus(){ [% IF focus %]$('[% focus %]').focus()[% END %] }