From 5473be178a37427d173043a3ed198920a1b2deb2 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 13 Sep 2023 11:30:50 +0100 Subject: [PATCH] Refactor the directions table to use bootstrap table styling This allows us to remove some custom CSS --- app/assets/javascripts/index/directions.js | 7 ++++--- app/assets/stylesheets/common.scss | 5 ----- 2 files changed, 4 insertions(+), 8 deletions(-) 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; -- 2.39.5