From 346f71f2624e4035b664bc93d03a835412c29ec0 Mon Sep 17 00:00:00 2001 From: Gehad elrobey Date: Fri, 11 Jul 2014 03:26:21 +0200 Subject: HTML: display dive status in detailed view Add dive status in the detailed dive view. Signed-off-by: Gehad elrobey Signed-off-by: Miika Turkia Signed-off-by: Dirk Hohndel --- theme/list_lib.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'theme') diff --git a/theme/list_lib.js b/theme/list_lib.js index 7135369d0..0a61ed765 100644 --- a/theme/list_lib.js +++ b/theme/list_lib.js @@ -734,7 +734,6 @@ function get_bookmarks_HTML(dive) return result; } - /** *Return HTML main data of a dive */ @@ -756,6 +755,17 @@ function get_dive_HTML(dive) '

Notes:

' + dive.notes + '
'; }; +/** +*Return HTML dive status data +*/ +function get_status_HTML(dive) +{ + return '

Dive Status

Sac: ' + dive.sac + + '     Otu: ' + dive.otu + + '     Cns: ' + dive.cns + + '
'; +}; + function mkelvin_to_C(mkelvin) { return (mkelvin - ZERO_C_IN_MKELVIN) / 1000.0; @@ -937,6 +947,7 @@ function showDiveDetails(dive) document.getElementById("diveinfo").innerHTML = get_dive_HTML(items[dive_id]); document.getElementById("dive_equipments").innerHTML = get_cylinders_HTML(items[dive_id]); document.getElementById("bookmarks").innerHTML = get_bookmarks_HTML(items[dive_id]); + document.getElementById("divestats").innerHTML = get_status_HTML(items[dive_id]); setDiveTitle(items[dive_id]); //hide the list of dives and show the canvas. -- cgit v1.2.3-70-g09d2