]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/directions.js
Tweak highlighting of geolocation errors
[rails.git] / app / assets / javascripts / index / directions.js
index 7fda7f7f0b118f1e9b6c52e21cb849ca1e4b44f4..1057fa58d5337077a1401ad7bd864cff355daa22 100644 (file)
@@ -54,7 +54,7 @@ OSM.Directions = function (map) {
     });
 
     input.on("keydown", function() {
-      input.removeClass("highlight_error");
+      input.removeClass("error");
     });
 
     input.on("change", function (e) {
@@ -90,8 +90,8 @@ OSM.Directions = function (map) {
         endpoint.awaitingGeocode = false;
         endpoint.hasGeocode = true;
         if (json.length === 0) {
+          input.addClass("error");
           alert(I18n.t('javascripts.directions.errors.no_place', {place: endpoint.value}));
-          input.addClass("highlight_error");
           return;
         }