summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Rick Walsh <rickmwalsh@gmail.com>2014-05-25 15:15:56 +1200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-24 21:10:57 -0700
commitb27e56da0a425073666b9ffc725bfae43a813575 (patch)
tree848acc78c60f974947aa8eca8f43ac1f2a13ab65
parent81c84d02edfa2d91153c8d52e16aa2db442c5264 (diff)
downloadsubsurface-b27e56da0a425073666b9ffc725bfae43a813575.tar.gz
Add location and max depth to world map export
From fdf157bb4db042e63f215607b284663f606bd98c Mon Sep 17 00:00:00 2001 From: Rick Walsh <rickmwalsh@gmail.com> 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 <rickmwalsh@gmail.com> From fdf157bb4db042e63f215607b284663f606bd98c Mon Sep 17 00:00:00 2001 From: Rick Walsh <rickmwalsh@gmail.com> 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 <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--worldmap-save.c14
1 files changed, 8 insertions, 6 deletions
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, "<p>date=%04u-%02u-%02u</p>", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday);
- put_format(b, "<p>time=%02u:%02u:%02u</p>", tm.tm_hour, tm.tm_min, tm.tm_sec);
+ put_format(b, "<p>Date: %04u-%02u-%02u</p>", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday);
+ put_format(b, "<p>Time: %02u:%02u:%02u</p>", tm.tm_hour, tm.tm_min, tm.tm_sec);
}
void put_HTML_temp(struct membuffer *b, struct dive *dive)
{
- put_temperature(b, dive->airtemp, "<p>Air Temp: ", " C\\'</p>");
- put_temperature(b, dive->watertemp, "<p>Water Temp: ", " C\\'</p>");
+ put_temperature(b, dive->airtemp, "<p>Air Temp: ", "°C</p>");
+ put_temperature(b, dive->watertemp, "<p>Water Temp: ", "°C</p>");
}
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, "<p>Notes : %s </p>", notes);
+ put_format(b, "<p>Notes: %s </p>", 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: '<div id=\"content\">'+'<div id=\"siteNotice\">'+'</div>'+'<div id=\"bodyContent\">");
+ put_format(b, "<p><b>%s</b></p>", dive->location);
put_HTML_date(b, dive);
- put_duration(b, dive->duration, "<p>duration=", " min</p>");
+ put_duration(b, dive->duration, "<p>Duration: ", " min</p>");
+ put_depth(b, dive->maxdepth, "<p>Max Depth: ", " m</p>");
put_HTML_temp(b, dive);
put_HTML_notes(b, dive);
put_string(b, "</p>'+'</div>'+'</div>'});\ninfowindows.push(tempinfowindow);\n");