mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
HTML: move between dives in detailed view.
Move between next/prev dives in detailed view, and be able to go back to the list. Also fix the initial state of the sorting by number. (its already exported in ascending order) Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
d363722c16
commit
818bd9903a
2 changed files with 20 additions and 1 deletions
|
@ -156,6 +156,13 @@ function changeAdvSearch(e){
|
|||
</center>
|
||||
</div>
|
||||
<div id="divePanel">
|
||||
<center>
|
||||
<div id="but">
|
||||
<button onClick="prevDetailedDive()"><-</button>
|
||||
<button onClick="unshowDiveDetails()">Back to List</button>
|
||||
<button onClick="nextDetailedDive()">-></button>
|
||||
</div>
|
||||
</center>
|
||||
<div id="diveprofile">
|
||||
<h2>Dive profile</h2>
|
||||
<canvas id="profileCanvas"></canvas>
|
||||
|
|
|
@ -227,7 +227,7 @@ function putRating(rating){
|
|||
this variables keep the state of
|
||||
each col. sorted asc or des
|
||||
*/
|
||||
var number = true;
|
||||
var number = false;
|
||||
var time = true;
|
||||
var date = true;
|
||||
var air = true;
|
||||
|
@ -813,3 +813,15 @@ function unshowDiveDetails(dive){
|
|||
document.getElementById("diveListPanel").style.display='block';
|
||||
document.getElementById("divePanel").style.display='none';
|
||||
}
|
||||
|
||||
function nextDetailedDive(){
|
||||
if(dive_id<items.length){
|
||||
showDiveDetails(++dive_id);
|
||||
}
|
||||
}
|
||||
|
||||
function prevDetailedDive(){
|
||||
if(dive_id>0){
|
||||
showDiveDetails(--dive_id);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue