diff --git a/iFakeLocation/Resources/main.html b/iFakeLocation/Resources/main.html index 1c3a878..79cc320 100644 --- a/iFakeLocation/Resources/main.html +++ b/iFakeLocation/Resources/main.html @@ -42,7 +42,7 @@

iFakeLocation

Click and drag to move the map. Use the mouse wheel or +/- buttons to zoom. Double-click anywhere (or drag the existing marker) to manually select a location.

-
+
@@ -321,6 +321,16 @@ // Handle search button $('#search').click(function() { + searchLocation(); + }); + + // Handle Enter Key in search field + document.getElementById('locationSearch').addEventListener('submit', function(e) { + e.preventDefault(); //to prevent form submission + searchLocation(); + }); + + function searchLocation(){ if (!$('#query').val()) return; $('#search').attr('disabled', true); @@ -336,7 +346,7 @@ $('#set-location').removeAttr('disabled'); } }); - }); + } // Disable double-click zooming map.doubleClickZoom.disable(); @@ -357,4 +367,4 @@ }); - \ No newline at end of file +