projects
/
textcart.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2293840
)
Fixed unneeded page reload on enter key in input fields.
author
Janusz Dobrowolski
<janusz@frontaccounting.eu>
Sun, 21 Sep 2008 14:47:45 +0000
(14:47 +0000)
committer
Janusz Dobrowolski
<janusz@frontaccounting.eu>
Sun, 21 Sep 2008 14:47:45 +0000
(14:47 +0000)
js/inserts.js
patch
|
blob
|
history
diff --git
a/js/inserts.js
b/js/inserts.js
index 27329ea3e8a0fedd6299f6a326fbb5f9b0d2f730..1eb860eb6b8795a859027ee7dfc6221e05aa6adb 100644
(file)
--- a/
js/inserts.js
+++ b/
js/inserts.js
@@
-161,6
+161,18
@@
var inserts = {
}
if (e.className == 'combo' || e.className == 'combo2') {
_set_combo_input(e);
+ }
+ else
+ if(e.type == 'text' ) { //&& e.className != 'combo2') {
+ e.onkeydown = function(ev) {
+ ev = ev||window.event;
+ key = ev.keyCode||ev.which;
+ if(key == 13) {
+ if(e.className == 'searchbox') e.onblur();
+ return false;
+ }
+ return true;
+ }
}
},
'input.combo2,input[aspect="fallback"]':