]> git.openstreetmap.org Git - rails.git/commitdiff
Tweak highlighting of geolocation errors
authorTom Hughes <tom@compton.nu>
Mon, 2 Apr 2018 14:24:03 +0000 (15:24 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 2 Apr 2018 14:24:03 +0000 (15:24 +0100)
app/assets/javascripts/index/directions.js
app/assets/stylesheets/common.scss

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;
         }
 
index 462cc50a71c5a55e10f47c414e1d13cee93ace93..0a5d9164e211e3ef5db259c8e0dcb78054919637 100644 (file)
@@ -938,8 +938,8 @@ header .search_forms,
     border-radius: 0 2px 2px 0;
   }
 
-  input.highlight_error {
-    background-color: rgba(255, 0, 0, 0.5);
+  input.error {
+    background-color: rgba($red, 0.4);
   }
 
   select {