projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9a8ec1f
)
Optionales Fokus-Setzen via CSS-Klasse "initial_focus"
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Tue, 18 Jun 2013 10:01:07 +0000
(12:01 +0200)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Tue, 18 Jun 2013 10:01:07 +0000
(12:01 +0200)
js/common.js
patch
|
blob
|
history
diff --git
a/js/common.js
b/js/common.js
index
8e3e5a1
..
71f1d31
100644
(file)
--- a/
js/common.js
+++ b/
js/common.js
@@
-192,6
+192,11
@@
$(document).ready(function () {
$('input').focus(function(){
if (focussable(this)) window.focused_element = this;
});
+
+ var initial_focus = $(".initial_focus").filter(':visible')[0];
+ if (initial_focus)
+ $(initial_focus).focus();
+
// legacy. sone forms install these
if (typeof fokus == 'function') { fokus(); return; }
if (focus_by_name('cursor_fokus')) return;