[Jifty-commit] r3681 - jifty/trunk/share/plugins/Jifty/Plugin/GoogleMap/web/static/js

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Thu Jul 12 16:50:34 EDT 2007


Author: clkao
Date: Thu Jul 12 16:50:34 2007
New Revision: 3681

Modified:
   jifty/trunk/share/plugins/Jifty/Plugin/GoogleMap/web/static/js/google_map.js

Log:
* Make enter key submit in the address search popup.
* Fix the close link in ambigious address popup.


Modified: jifty/trunk/share/plugins/Jifty/Plugin/GoogleMap/web/static/js/google_map.js
==============================================================================
--- jifty/trunk/share/plugins/Jifty/Plugin/GoogleMap/web/static/js/google_map.js	(original)
+++ jifty/trunk/share/plugins/Jifty/Plugin/GoogleMap/web/static/js/google_map.js	Thu Jul 12 16:50:34 2007
@@ -100,6 +100,15 @@
       var field= document.createElement('input');
       field.setAttribute('type', 'text');
       field.style.width = '150px';
+      // port to yui event
+      field.onkeypress = function(e) {
+	  var event = e || window.event;
+	  if ((event.charCode || event.keyCode) == 13) {
+	      this.nextSibling.onclick();
+	      event.returnValue = false;
+	      return false;
+	  }
+      };
       element.appendChild(field);
       var submit= document.createElement('input');
       submit.id = 'blahblah';


More information about the Jifty-commit mailing list