]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/directions.js
Remove/replace redundant no_place locale translation
[rails.git] / app / assets / javascripts / index / directions.js
index 1a3e0d4ecae558056b2b9867c4ea2ea0fe4b9920..14be8b3583b87fd30ebbdb0f0b1578e487a98d54 100644 (file)
@@ -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;
         }