fix: put checkbox inside date cell — both Pi and server now share same 6-column layout
This commit is contained in:
@@ -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 ? '<button class="btn btn-sm btn-outline-danger ms-1" type="button" data-delete-trip-id="' + t.id + '" title="Delete"><i class="fas fa-trash fa-fw"></i></button>' : "";
|
||||
var cb = bUrl ? '<td class="text-center" onclick="event.stopPropagation()"><input type="checkbox" class="trip-checkbox form-check-input" value="' + t.id + '"></td>' : "";
|
||||
var chk = bUrl ? '<input type="checkbox" class="trip-checkbox form-check-input me-1" value="' + t.id + '" onclick="event.stopPropagation()">' : '';
|
||||
var idPrefix = showId ? '<span class="text-muted small me-1">#' + t.id + '</span>' : '';
|
||||
row.innerHTML = cb + "<td>" + idPrefix + fT(t.start_datetime) + "</td><td>" + fK(t.distance_km) + "</td><td>" + fD(t.duration_seconds) + "</td><td>" + fS(t.max_speed_kmh) + "</td><td class=\"text-muted small\">" + (t.odo_start_km != null ? t.odo_start_km.toFixed(0) + " \u2192 " + t.odo_end_km.toFixed(0) + " km" : "\u2014") + "</td><td class=\"text-end text-nowrap d-none d-sm-table-cell\">" + db + "</td>";
|
||||
row.innerHTML = "<td>" + chk + idPrefix + fT(t.start_datetime) + "</td><td>" + fK(t.distance_km) + "</td><td>" + fD(t.duration_seconds) + "</td><td>" + fS(t.max_speed_kmh) + "</td><td class=\"text-muted small\">" + (t.odo_start_km != null ? t.odo_start_km.toFixed(0) + " \u2192 " + t.odo_end_km.toFixed(0) + " km" : "\u2014") + "</td><td class=\"text-end text-nowrap d-none d-sm-table-cell\">" + db + "</td>";
|
||||
body.appendChild(row);
|
||||
});
|
||||
body.querySelectorAll("input.trip-checkbox").forEach(function (c) { c.addEventListener("change", upBt); });
|
||||
|
||||
Reference in New Issue
Block a user