mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Reverse html trip list rendering order
In the HTML export, the list of trips emitted into lib.js is in chronological order, the dives are shown reverse chronological order. This leads to a weird experience of the earliest trip being on top and the dives within it having the most recent dive on top. Invert the processing order in the javascript layer so that the last trip is rendered first. Signed-off-by: Monty Taylor <mordred@inaugust.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ce4e0d3276
commit
8603a7d826
1 changed files with 1 additions and 1 deletions
|
@ -772,7 +772,7 @@ function showtrips()
|
|||
{
|
||||
var divelist = document.getElementById('diveslist');
|
||||
divelist.innerHTML = "";
|
||||
for (var i = 0; i < trips.length; i++) {
|
||||
for (var i = trips.length - 1; i >= 0; i--) {
|
||||
divelist.innerHTML += '<ul id="trip_' + i + '" class="trips" onclick="toggle_trip_expansion(' + i + ')">' +
|
||||
trips[i].name + ' ( ' + trips[i].dives.length + ' dives)' + '</ul>' + '<div id="trip_dive_list_' + i + '"></div>';
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue