Revision 8202e4b9
Von Sven Schöling vor etwa 12 Jahren hinzugefügt
SL/Layout/None.pm | ||
---|---|---|
30 | 30 |
} |
31 | 31 |
|
32 | 32 |
sub _setup_focus { |
33 |
if ($::request->{layout}->focus || $::form->{fokus}) {
|
|
33 |
if ($::request->{layout}->focus) { |
|
34 | 34 |
return $::form->parse_html_template('layout/focus_setup', { |
35 | 35 |
focus => $::request->{layout}->focus, |
36 |
fokus => $::form->{fokus}, |
|
37 | 36 |
}) |
38 | 37 |
} else { |
39 | 38 |
return (); |
js/common.js | ||
---|---|---|
166 | 166 |
}); |
167 | 167 |
// legacy. sone forms install these |
168 | 168 |
if (typeof fokus == 'function') { fokus(); return; } |
169 |
if (focus_by_name('fokus')) return; |
|
170 | 169 |
if (focus_by_name('cursor_fokus')) return; |
171 | 170 |
set_cursor_to_first_element(); |
172 | 171 |
}); |
templates/webpages/layout/focus_setup.html | ||
---|---|---|
1 |
function fokus(){ [% IF focus %]$('[% focus %]').focus()[% ELSE %][% fokus %].focus()[% END %] } |
|
1 |
function fokus(){ [% IF focus %]$('[% focus %]').focus()[% END %] } |
Auch abrufbar als: Unified diff
Unterstützung für $::form->{fokus} entfernt, weil zu anfällig.
behebt #2028