]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/directions.js
Moved inline styling to stylesheet
[rails.git] / app / assets / javascripts / index / directions.js
index 14be8b3583b87fd30ebbdb0f0b1578e487a98d54..7fda7f7f0b118f1e9b6c52e21cb849ca1e4b44f4 100644 (file)
@@ -54,7 +54,7 @@ OSM.Directions = function (map) {
     });
 
     input.on("keydown", function() {
-      input.css("background-color", "#fff");
+      input.removeClass("highlight_error");
     });
 
     input.on("change", function (e) {
@@ -91,7 +91,7 @@ OSM.Directions = function (map) {
         endpoint.hasGeocode = true;
         if (json.length === 0) {
           alert(I18n.t('javascripts.directions.errors.no_place', {place: endpoint.value}));
-          input.css("background-color", "rgba(255, 0, 0, 0.5)");
+          input.addClass("highlight_error");
           return;
         }