projects
/
infodrom
/
hallinta
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2106a1f
)
Set focus to first element and clear form after saving
author
Joey Schulze
<joey@infodrom.org>
Tue, 26 Apr 2011 16:41:23 +0000
(18:41 +0200)
committer
Joey Schulze
<joey@infodrom.org>
Tue, 26 Apr 2011 16:41:23 +0000
(18:41 +0200)
lib/functions.js
patch
|
blob
|
history
diff --git
a/lib/functions.js
b/lib/functions.js
index
543d692
..
efe6a35
100644
(file)
--- a/
lib/functions.js
+++ b/
lib/functions.js
@@
-192,6
+192,7
@@
function form_init()
if (!form) return;
form_clear(form);
+ Form.focusFirstElement(form);
}
function select_update(id, options, empty)
@@
-218,6
+219,13
@@
function save_callback(data)
if (typeof post_save == 'function')
post_save();
+
+ var form = document.getElementById('form_edit');
+
+ if (!form) return;
+
+ form_clear(form);
+ Form.focusFirstElement(form);
}
function delete_callback(data)