From 66e526c2d5ed93fdb6b514a4927ba15ba71fb7bb Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Wed, 27 Jul 2022 20:54:47 +0300 Subject: [PATCH] Changed directions close button to Bootstrap --- app/assets/javascripts/index/directions.js | 8 ++++---- app/views/layouts/_search.html.erb | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/index/directions.js b/app/assets/javascripts/index/directions.js index 5040e7f3e..ad780d4f4 100644 --- a/app/assets/javascripts/index/directions.js +++ b/app/assets/javascripts/index/directions.js @@ -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 = "

" + - "" + I18n.t("javascripts.directions.directions") + - "

" + + var html = "" + + "

" + I18n.t("javascripts.directions.directions") + "

" + + "

" + 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") { diff --git a/app/views/layouts/_search.html.erb b/app/views/layouts/_search.html.erb index c2501b95b..24e25076f 100644 --- a/app/views/layouts/_search.html.erb +++ b/app/views/layouts/_search.html.erb @@ -19,7 +19,7 @@

-
+
-- 2.45.1