From e8c5bfec9a244cdaaea76504616438df2c8c7812 Mon Sep 17 00:00:00 2001 From: Mathieu Moran Date: Tue, 11 Aug 2026 15:22:05 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20put=20checkbox=20inside=20date=20cell=20?= =?UTF-8?q?=E2=80=94=20both=20Pi=20and=20server=20now=20share=20same=206-c?= =?UTF-8?q?olumn=20layout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/templates/history.html | 1 - static/js/history.js | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/server/templates/history.html b/server/templates/history.html index a963318..f665dbf 100644 --- a/server/templates/history.html +++ b/server/templates/history.html @@ -29,7 +29,6 @@ {{ data_table( "trip-list", [ - {"key": "", "label": "", "sortable": false, "class": "text-center"}, {"key": "started", "label": "Started", "sortable": true}, {"key": "distance", "label": "km", "sortable": true}, {"key": "duration", "label": "Time", "sortable": true}, diff --git a/static/js/history.js b/static/js/history.js index 98199f7..20a1bd7 100644 --- a/static/js/history.js +++ b/static/js/history.js @@ -225,9 +225,9 @@ row.dataset.duration = t.duration_seconds; row.dataset.maxSpeed = t.max_speed_kmh; row.dataset.tripId = t.id; row.style.cursor = "pointer"; var db = del ? '' : ""; - var cb = bUrl ? '' : ""; + var chk = bUrl ? '' : ''; var idPrefix = showId ? '#' + t.id + '' : ''; - row.innerHTML = cb + "" + idPrefix + fT(t.start_datetime) + "" + fK(t.distance_km) + "" + fD(t.duration_seconds) + "" + fS(t.max_speed_kmh) + "" + (t.odo_start_km != null ? t.odo_start_km.toFixed(0) + " \u2192 " + t.odo_end_km.toFixed(0) + " km" : "\u2014") + "" + db + ""; + row.innerHTML = "" + chk + idPrefix + fT(t.start_datetime) + "" + fK(t.distance_km) + "" + fD(t.duration_seconds) + "" + fS(t.max_speed_kmh) + "" + (t.odo_start_km != null ? t.odo_start_km.toFixed(0) + " \u2192 " + t.odo_end_km.toFixed(0) + " km" : "\u2014") + "" + db + ""; body.appendChild(row); }); body.querySelectorAll("input.trip-checkbox").forEach(function (c) { c.addEventListener("change", upBt); });