summaryrefslogtreecommitdiffstats
path: root/theme/list_lib.js
diff options
context:
space:
mode:
authorGravatar Gehad elrobey <gehadelrobey@gmail.com>2014-08-23 22:22:24 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-08-27 07:18:41 -0700
commitd00390d46d83b07fe03c815df3af2cd2371c02a8 (patch)
treee20f6ae54e6a3ec0b290ab5a672736ccea683052 /theme/list_lib.js
parent7fa8fd0e6b8ecbaf00969d6c54c44e897240861d (diff)
downloadsubsurface-d00390d46d83b07fe03c815df3af2cd2371c02a8.tar.gz
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 <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'theme/list_lib.js')
-rw-r--r--theme/list_lib.js21
1 files changed, 20 insertions, 1 deletions
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)
'</td></tr><tr><td class="words"><p>' + translate.Buddy + ': </p></td><td>' + dive.buddy +
'</td></tr><tr><td class="words">' + translate.Suit + ': </td><td>' + dive.suit +
'</td></tr><tr><td class="words">' + translate.Tags + ': </td><td>' + putTags(dive.tags) +
- '</td></tr></table><div style="margin:10px;"><p class="words">' + translate.Notes + ': </p>' + dive.notes + '</div>';
+ '</td></tr></table>'+ put_divecomputer_details(dive.divecomputers) +'<div style="margin:10px;"><p class="words">' + translate.Notes + ': </p>' + dive.notes + '</div>';
return res;
};
+function put_divecomputer_details(dc)
+{
+ if (dc.length <= 0)
+ return;
+
+ var res = '';
+ res += '<p style="margin:10px;" class="words">Divecomputer:</p>';
+ for (var i =0; i < dc.length; i++) {
+ res += '<table>';
+ res += '<tr><td>Model : </td><td>' + dc[i].model + '</td></tr>';
+ if (dc[i].deviceid)
+ res += '<tr><td>Device ID : </td><td>' + dc[i].deviceid + '</td></tr>';
+ if (dc[i].diveid)
+ res += '<tr><td>Dive ID : </td><td>' + dc[i].diveid + '</td></tr>';
+ res += '</table><br>';
+ }
+ return res;
+}
+
/**
*Return HTML dive status data
*/