]> git.openstreetmap.org Git - rails.git/commitdiff
Changed directions close button to Bootstrap
authorAnton Khorev <tony29@yandex.ru>
Wed, 27 Jul 2022 17:54:47 +0000 (20:54 +0300)
committerAnton Khorev <tony29@yandex.ru>
Wed, 27 Jul 2022 17:54:47 +0000 (20:54 +0300)
app/assets/javascripts/index/directions.js
app/views/layouts/_search.html.erb

index 5040e7f3ef0d404b449f9fe28895fbf40bbc480e..ad780d4f40dffa74d6f7ecd5346120a66764b4fb 100644 (file)
@@ -157,7 +157,7 @@ OSM.Directions = function (map) {
     }));
   });
 
-  $(".directions_form .close").on("click", function (e) {
+  $(".directions_form .btn-close").on("click", function (e) {
     e.preventDefault();
     var route_from = endpoints[0].value;
     if (route_from) {
@@ -254,9 +254,9 @@ OSM.Directions = function (map) {
         map.fitBounds(polyline.getBounds().pad(0.05));
       }
 
-      var html = "<h2><a class=\"geolink\" href=\"#\">" +
-        "<span class=\"icon close\"></span></a>" + I18n.t("javascripts.directions.directions") +
-        "</h2><p>" +
+      var html = "<a class=\"geolink\" href=\"#\"><button type='button' class='btn-close float-end mt-1'></button></a>" +
+        "<h2>" + I18n.t("javascripts.directions.directions") + "</h2>" +
+        "<p>" +
         I18n.t("javascripts.directions.distance") + ": " + formatDistance(route.distance) + ". " +
         I18n.t("javascripts.directions.time") + ": " + formatTime(route.time) + ".";
       if (typeof route.ascend !== "undefined" && typeof route.descend !== "undefined") {
index c2501b95bf34762c1701c2fb3bea2422fe152237..24e25076f4494fdffb8fdde8f4d1f1c654078a06 100644 (file)
@@ -19,7 +19,7 @@
   </form>
 
   <form method="GET" action="<%= directions_path %>" class="directions_form pb-3">
-    <div class="clearfix px-3 py-3"><span class="icon close"></span></div>
+    <div class="clearfix px-3 py-3"><button type="button" class="btn-close float-end"></button></div>
 
     <div class="row gx-2 m-1">
       <div class="col-1">