From: Andy Allan Date: Wed, 13 Sep 2023 10:30:50 +0000 (+0100) Subject: Refactor the directions table to use bootstrap table styling X-Git-Tag: live~1005^2~4 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/5473be178a37427d173043a3ed198920a1b2deb2?hp=d45c1435e6649c6af91d5799a5162dfaa661c72b Refactor the directions table to use bootstrap table styling This allows us to remove some custom CSS --- diff --git a/app/assets/javascripts/index/directions.js b/app/assets/javascripts/index/directions.js index 7bd0891a3..c86c8ad02 100644 --- a/app/assets/javascripts/index/directions.js +++ b/app/assets/javascripts/index/directions.js @@ -268,7 +268,8 @@ OSM.Directions = function (map) { I18n.t("javascripts.directions.descend") + ": " + formatHeight(route.descend) + "."); } - var turnByTurnTable = $(""); + var turnByTurnTable = $("
") + .append($("")); var directionsCloseButton = $(""); - row.append(" "); - row.append(" "); + row.append("
" + instruction); + row.append("
" + instruction); row.append("" + dist); row.on("click", function () { diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index b8c874fb8..881ee6e34 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -698,11 +698,6 @@ div.direction { div.direction.i#{$i} { background-position: #{($i)*-20}px 0px; } } -td.instruction, td.distance { - padding-top: $lineheight/5; - padding-bottom: $lineheight/5; - border-bottom: 1px solid $grey; -} td.distance { color: $darkgrey; text-align: right;