projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7349bad
)
Hitting enter while in the location field shouldn't submit the form.
author
Michael J. Rubinsky
<mrubinsk@horde.org>
Thu, 15 Apr 2010 21:11:04 +0000
(17:11 -0400)
committer
Michael J. Rubinsky
<mrubinsk@horde.org>
Thu, 15 Apr 2010 21:12:25 +0000
(17:12 -0400)
Catch KEY_RETURN in the keydownHandler, and trigger the geocode action if
we are in the location field of the event form.
kronolith/js/kronolith.js
patch
|
blob
|
history
diff --git
a/kronolith/js/kronolith.js
b/kronolith/js/kronolith.js
index
bc0c36a
..
1ed244e
100644
(file)
--- a/
kronolith/js/kronolith.js
+++ b/
kronolith/js/kronolith.js
@@
-3261,7
+3261,14
@@
KronolithCore = {
keydownHandler: function(e)
{
var kc = e.keyCode || e.charCode,
- form = e.findElement('FORM');
+ form = e.findElement('FORM'), trigger = e.findElement();
+
+ if (trigger.id == 'kronolithEventLocation' && kc == Event.KEY_RETURN) {
+ this.ensureMap();
+ this.geocode($F('kronolithEventLocation'));
+ e.stop();
+ return;
+ }
if (form) {
switch (kc) {