From b27e56da0a425073666b9ffc725bfae43a813575 Mon Sep 17 00:00:00 2001 From: Rick Walsh Date: Sun, 25 May 2014 15:15:56 +1200 Subject: Add location and max depth to world map export From fdf157bb4db042e63f215607b284663f606bd98c Mon Sep 17 00:00:00 2001 From: Rick Walsh Date: Sun, 25 May 2014 14:57:36 +1200 Subject: [PATCH] Add location and max depth to world map export Adds location name and maximum depth to the exported world map html file. Minor formatting changes to exported text for consistency and clarity. Signed-off-by: Rick Walsh From fdf157bb4db042e63f215607b284663f606bd98c Mon Sep 17 00:00:00 2001 From: Rick Walsh Date: Sun, 25 May 2014 14:57:36 +1200 Subject: [PATCH] Add location and max depth to world map export Adds location name and maximum depth to the exported world map html file. Minor formatting changes to exported text for consistency and clarity. Signed-off-by: Rick Walsh Signed-off-by: Dirk Hohndel --- worldmap-save.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'worldmap-save.c') diff --git a/worldmap-save.c b/worldmap-save.c index 21a0810b1..e7448fd4e 100644 --- a/worldmap-save.c +++ b/worldmap-save.c @@ -17,14 +17,14 @@ void put_HTML_date(struct membuffer *b, struct dive *dive) { struct tm tm; utc_mkdate(dive->when, &tm); - put_format(b, "

date=%04u-%02u-%02u

", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday); - put_format(b, "

time=%02u:%02u:%02u

", tm.tm_hour, tm.tm_min, tm.tm_sec); + put_format(b, "

Date: %04u-%02u-%02u

", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday); + put_format(b, "

Time: %02u:%02u:%02u

", tm.tm_hour, tm.tm_min, tm.tm_sec); } void put_HTML_temp(struct membuffer *b, struct dive *dive) { - put_temperature(b, dive->airtemp, "

Air Temp: ", " C\\'

"); - put_temperature(b, dive->watertemp, "

Water Temp: ", " C\\'

"); + put_temperature(b, dive->airtemp, "

Air Temp: ", "°C

"); + put_temperature(b, dive->watertemp, "

Water Temp: ", "°C

"); } char *replace_char(char *str, char replace, char *replace_by) @@ -78,7 +78,7 @@ void put_HTML_notes(struct membuffer *b, struct dive *dive) { if (dive->notes) { char *notes = quote(dive->notes); - put_format(b, "

Notes : %s

", notes); + put_format(b, "

Notes: %s

", notes); free(notes); } } @@ -99,8 +99,10 @@ void writeMarkers(struct membuffer *b, const bool selected_only) put_degrees(b, dive->latitude, "temp = new google.maps.Marker({position: new google.maps.LatLng(", ""); put_degrees(b, dive->longitude, ",", ")});\n"); put_string(b, "markers.push(temp);\ntempinfowindow = new google.maps.InfoWindow({content: '
'+'
'+'
'+'
"); + put_format(b, "

%s

", dive->location); put_HTML_date(b, dive); - put_duration(b, dive->duration, "

duration=", " min

"); + put_duration(b, dive->duration, "

Duration: ", " min

"); + put_depth(b, dive->maxdepth, "

Max Depth: ", " m

"); put_HTML_temp(b, dive); put_HTML_notes(b, dive); put_string(b, "

'+'
'+'
'});\ninfowindows.push(tempinfowindow);\n"); -- cgit v1.2.3-70-g09d2