]> git.openstreetmap.org Git - rails.git/commitdiff
Mark valid usecases for alert
authorHolger Jeromin <h.jeromin@beckhoff.com>
Wed, 5 Feb 2025 17:04:57 +0000 (18:04 +0100)
committerHolger Jeromin <h.jeromin@beckhoff.com>
Thu, 6 Feb 2025 07:35:50 +0000 (08:35 +0100)
app/assets/javascripts/edit/id.js.erb
app/assets/javascripts/index.js
app/assets/javascripts/index/directions-endpoint.js

index 3af6fd3dc6339784fd23118b43495e438ed7b4f5..588aa1e86ae2918318518d6acc438771899f88fe 100644 (file)
@@ -2,6 +2,7 @@ $(document).ready(function () {
   const id = $("#id-embed");
 
   if (id.data("configured") === false) {
+    // eslint-disable-next-line no-alert
     alert(I18n.t("site.edit.id_not_configured"));
     return;
   }
index 8ef067740d6025bc6ad0f0f988d69cfcb18f3baa..4555553ee7fb6868950d208a1b0233d2928d73f2 100644 (file)
@@ -255,6 +255,7 @@ $(document).ready(function () {
       fetch(url, { mode: "no-cors", signal: AbortSignal.timeout(5000) })
         .then(callback)
         .catch(function () {
+          // eslint-disable-next-line no-alert
           alert(I18n.t("site.index.remote_failed"));
         });
     }
index 30d499ad731707b404dc1ca3448af2e215cfb7d7..3fdae7c5413560139ada1e4150957d84523da2c5 100644 (file)
@@ -108,6 +108,7 @@ OSM.DirectionsEndpoint = function Endpoint(map, input, iconUrl, dragCallback, ch
       delete endpoint.geocodeRequest;
       if (json.length === 0) {
         input.addClass("is-invalid");
+        // eslint-disable-next-line no-alert
         alert(I18n.t("javascripts.directions.errors.no_place", { place: endpoint.value }));
         return;
       }