]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/directions.js
Refactor the directions table to use bootstrap table styling
[rails.git] / app / assets / javascripts / index / directions.js
index 7bd0891a34e920956f0e80c3ed12a0f59e4bd9f7..c86c8ad02ccde0813d9ae03c6011505bd6933536 100644 (file)
@@ -268,7 +268,8 @@ OSM.Directions = function (map) {
           I18n.t("javascripts.directions.descend") + ": " + formatHeight(route.descend) + ".");
       }
 
-      var turnByTurnTable = $("<table class='mb-3'>");
+      var turnByTurnTable = $("<table class='table table-sm mb-3'>")
+        .append($("<tbody>"));
       var directionsCloseButton = $("<button type='button' class='btn-close'>")
         .attr("aria-label", I18n.t("javascripts.close"));
 
@@ -304,8 +305,8 @@ OSM.Directions = function (map) {
         }
 
         var row = $("<tr class='turn'/>");
-        row.append("<td><div class='direction i" + direction + "'/></td> ");
-        row.append("<td class='instruction'>" + instruction);
+        row.append("<td class='border-0'><div class='direction i" + direction + "'/></td> ");
+        row.append("<td>" + instruction);
         row.append("<td class='distance'>" + dist);
 
         row.on("click", function () {