diff --git a/core/save-html.c b/core/save-html.c
index 4c9b428cb..5902a8a71 100644
--- a/core/save-html.c
+++ b/core/save-html.c
@@ -355,6 +355,10 @@ void write_one_dive(struct membuffer *b, struct dive *dive, const char *photos_d
put_HTML_coordinates(b, dive);
put_format(b, "\"rating\":%d,", dive->rating);
put_format(b, "\"visibility\":%d,", dive->visibility);
+ put_format(b, "\"current\":%d,", dive->current);
+ put_format(b, "\"wavesize\":%d,", dive->wavesize);
+ put_format(b, "\"surge\":%d,", dive->surge);
+ put_format(b, "\"chill\":%d,", dive->chill);
put_format(b, "\"dive_duration\":\"%u:%02u min\",",
FRACTION(dive->duration.seconds, 60));
put_string(b, "\"temperature\":{");
@@ -512,8 +516,13 @@ void export_translation(const char *file_name)
write_attribute(b, "Advanced_Search", translate("gettextFromC", "Advanced search"), ", ");
//Dive expanded view
+
write_attribute(b, "Rating", translate("gettextFromC", "Rating"), ", ");
+ write_attribute(b, "WaveSize", translate("gettextFromC", "WaveSize"), ", ");
write_attribute(b, "Visibility", translate("gettextFromC", "Visibility"), ", ");
+ write_attribute(b, "Current", translate("gettextFromC", "Current"), ", ");
+ write_attribute(b, "Surge", translate("gettextFromC", "Surge"), ", ");
+ write_attribute(b, "Chill", translate("gettextFromC", "Chill"), ", ");
write_attribute(b, "Duration", translate("gettextFromC", "Duration"), ", ");
write_attribute(b, "DiveMaster", translate("gettextFromC", "Divemaster"), ", ");
write_attribute(b, "Buddy", translate("gettextFromC", "Buddy"), ", ");
diff --git a/theme/list_lib.js b/theme/list_lib.js
index 143bfd492..05ac98d2a 100644
--- a/theme/list_lib.js
+++ b/theme/list_lib.js
@@ -224,11 +224,10 @@ function getExpanded(dive)
var res = '
' + translate.Date + ': | ' + dive.date +
' | ' + translate.Time + ': | ' + dive.time +
' | ' + translate.Location + ': | ' + '' + dive.location + '' + getDiveCoor(dive) +
- ' |
' + translate.Rating + ': | ' + putRating(dive.rating) +
- ' | ' + translate.Visibility + ': | ' + putRating(dive.visibility) +
' |
' +
'' + translate.Air_Temp + ': | ' + dive.temperature.air +
' | ' + translate.Water_Temp + ': | ' + dive.temperature.water +
+ ' | ' + translate.Rating + ': | ' + putRating(dive.rating) +
' |
' + translate.Max_Depth + ': | ' + put_depth_unit(dive.maxdepth) + " " + depth_unit + ' |
' + translate.Duration + ': | ' + dive.dive_duration +
' |
' + translate.DiveMaster + ': | ' + dive.divemaster +
' |
' + translate.Buddy + ': | ' + dive.buddy +
@@ -964,13 +963,23 @@ function getDiveCoor(dive)
*/
function get_dive_HTML(dive)
{
- var res = '' + translate.Dive_information + '' + translate.Date + ': | ' + dive.date +
+ var table1 = '' + translate.Dive_information + '' + translate.Date + ': | ' + dive.date +
' | ' + translate.Time + ': | ' + dive.time +
' | ' + translate.Location + ': | ' + '' + dive.location + ' | ' + getDiveCoor(dive) +
- '
' + translate.Rating + ': | ' + putRating(dive.rating) +
- ' | ' + translate.Visibility + ': | ' + putRating(dive.visibility) +
- ' | ' +
- '' + translate.Air_Temp + ': | ' + dive.temperature.air +
+ ' | ';
+ var table2 = '' + translate.Rating + ': | ' + putRating(dive.rating) + ' | ';
+ if (dive.wavesize > 0)
+ table2 += ' ' + translate.WaveSize + ': | ' + putRating(dive.wavesize) + ' | ';
+ if (dive.visibility > 0)
+ table2 += ' ' + translate.Visibility + ': | ' + putRating(dive.visibility) + ' | ';
+ if (dive.current > 0)
+ table2 += ' ' + translate.Current + ': | ' + putRating(dive.current) + ' | ';
+ if (dive.surge > 0)
+ table2 += ' ' + translate.Surge + ': | ' + putRating(dive.surge) + ' | ';
+ if (dive.chill > 0)
+ table2 += ' ' + translate.Chill + ': | ' + putRating(dive.chill) + ' | ';
+ table2 += ' ';
+ var table3 = '' + translate.Air_Temp + ': | ' + dive.temperature.air +
' | ' + translate.Water_Temp + ': | ' + dive.temperature.water +
' |
' + translate.Max_Depth + ': | ' + put_depth_unit(dive.maxdepth) + " " + depth_unit + ' | ' + translate.Duration + ': | ' + dive.dive_duration +
' | ' + translate.DiveMaster + ': | ' + dive.divemaster +
@@ -978,7 +987,7 @@ function get_dive_HTML(dive)
' | ' + translate.Suit + ': | ' + dive.suit +
' | ' + translate.Tags + ': | ' + putTags(dive.tags) +
' | '+ put_divecomputer_details(dive.divecomputers) +'' + translate.Notes + ': ' + dive.notes + ' ';
- return res;
+ return table1 + table2 + table3;
};
function put_divecomputer_details(dc)
|
|