X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/549acfa918c04fa20b3386fece25ce69b3565519..becccea034bc1ca4609c904095f4f86e17e349b4:/app/assets/javascripts/index/directions.js diff --git a/app/assets/javascripts/index/directions.js b/app/assets/javascripts/index/directions.js index 1a3e0d4ec..14be8b358 100644 --- a/app/assets/javascripts/index/directions.js +++ b/app/assets/javascripts/index/directions.js @@ -53,6 +53,10 @@ OSM.Directions = function (map) { } }); + input.on("keydown", function() { + input.css("background-color", "#fff"); + }); + input.on("change", function (e) { awaitingGeocode = true; @@ -86,7 +90,8 @@ OSM.Directions = function (map) { endpoint.awaitingGeocode = false; endpoint.hasGeocode = true; if (json.length === 0) { - alert(I18n.t('javascripts.directions.errors.no_place')); + alert(I18n.t('javascripts.directions.errors.no_place', {place: endpoint.value})); + input.css("background-color", "rgba(255, 0, 0, 0.5)"); return; }