X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/bb868e0b11b25eb000a2c71cc993db86e383e0f3..6616d5e1bab2c5e8db39a1aefe978c57fc7b3a0f:/app/assets/javascripts/index/directions.js diff --git a/app/assets/javascripts/index/directions.js b/app/assets/javascripts/index/directions.js index ad780d4f4..500610e26 100644 --- a/app/assets/javascripts/index/directions.js +++ b/app/assets/javascripts/index/directions.js @@ -254,20 +254,29 @@ OSM.Directions = function (map) { map.fitBounds(polyline.getBounds().pad(0.05)); } - var html = "" + - "

" + 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 = $("
"); + var directionsCloseButton = $("