From d00390d46d83b07fe03c815df3af2cd2371c02a8 Mon Sep 17 00:00:00 2001 From: Gehad elrobey Date: Sat, 23 Aug 2014 22:22:24 +0300 Subject: HTML: Save divecomputer data to the HTML exports Save divecomputers data to the JSON files. and show them in the HTML dive detailed view. Fixes #711 Signed-off-by: Gehad elrobey Signed-off-by: Dirk Hohndel --- theme/list_lib.js | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'theme/list_lib.js') diff --git a/theme/list_lib.js b/theme/list_lib.js index c66be6414..d3f9f8cac 100644 --- a/theme/list_lib.js +++ b/theme/list_lib.js @@ -941,10 +941,29 @@ function get_dive_HTML(dive) '

' + translate.Buddy + ':

' + dive.buddy + '' + translate.Suit + ': ' + dive.suit + '' + translate.Tags + ': ' + putTags(dive.tags) + - '

' + translate.Notes + ':

' + dive.notes + '
'; + ''+ put_divecomputer_details(dive.divecomputers) +'

' + translate.Notes + ':

' + dive.notes + '
'; return res; }; +function put_divecomputer_details(dc) +{ + if (dc.length <= 0) + return; + + var res = ''; + res += '

Divecomputer:

'; + for (var i =0; i < dc.length; i++) { + res += ''; + res += ''; + if (dc[i].deviceid) + res += ''; + if (dc[i].diveid) + res += ''; + res += '
Model : ' + dc[i].model + '
Device ID : ' + dc[i].deviceid + '
Dive ID : ' + dc[i].diveid + '

'; + } + return res; +} + /** *Return HTML dive status data */ -- cgit v1.2.3-70-g09d2