From: Tom Hughes Date: Wed, 31 Aug 2022 16:44:48 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/pull/3668' X-Git-Tag: live~1611 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/b36df9286a03c0dd034ce0829eb69a9b66f79ea2?hp=f6dd80e87d6c4ef868d0173ac4baa98ceffc30bd Merge remote-tracking branch 'upstream/pull/3668' --- diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index 40f546009..5ba36a455 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -1,5 +1,6 @@ //= require_self //= require leaflet.sidebar +//= require leaflet.sidebar-pane //= require leaflet.locatecontrol/src/L.Control.Locate //= require leaflet.layers //= require leaflet.key diff --git a/app/assets/javascripts/index/browse.js b/app/assets/javascripts/index/browse.js index 8ef859d85..61319f7b4 100644 --- a/app/assets/javascripts/index/browse.js +++ b/app/assets/javascripts/index/browse.js @@ -48,21 +48,20 @@ OSM.initializeBrowse = function (map) { function displayFeatureWarning(count, limit, add, cancel) { $("#browse_status").html( - $("
") - .append( - $("" + - "

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

" + - "

" + + var distanceText = $("

").append( I18n.t("javascripts.directions.distance") + ": " + formatDistance(route.distance) + ". " + - I18n.t("javascripts.directions.time") + ": " + formatTime(route.time) + "."; + I18n.t("javascripts.directions.time") + ": " + formatTime(route.time) + "."); if (typeof route.ascend !== "undefined" && typeof route.descend !== "undefined") { - html += "
" + + distanceText.append( + $("
"), I18n.t("javascripts.directions.ascend") + ": " + Math.round(route.ascend) + "m. " + - I18n.t("javascripts.directions.descend") + ": " + Math.round(route.descend) + "m."; + I18n.t("javascripts.directions.descend") + ": " + Math.round(route.descend) + "m."); } - html += "

"; + + var turnByTurnTable = $("
"); $("#sidebar_content") - .html(html); + .empty() + .append( + $("
").append( + $("
").append( + $("

") + .text(I18n.t("javascripts.directions.directions"))), + $("
").append( + $("").append( + $("

diff --git a/app/views/layouts/_search.html.erb b/app/views/layouts/_search.html.erb index 47e9ad557..9ce1265b4 100644 --- a/app/views/layouts/_search.html.erb +++ b/app/views/layouts/_search.html.erb @@ -19,7 +19,7 @@
-
+