Move the quote function to membuffer.c and adding wrappers that call
it from both xml and html exporters to get rid of redundancy.
Quote the location, buddy, suit, tags and notes This
prevents js code from crashing.
[Miika Turkia: minor whitespace and code fix]
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Exporting the raw dive list into JSON format for later viewing with html
and js files. Also some worldmap code organizations.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Call the translation functions for text strings when exporting the
worldmap to allow localized exports.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We should use the temperature units preferred by the user when exporting
dive info on Worldmap.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
User supplied text fields must be quoted on worldmap export. Without
quoting the HTML is broken e.g. with location "Angel's Window"
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>
This patch adds the ability to export selected dives only in the worldmap
exporter. After Miika added the export dialog in commit 7dc642860d
("Implementing export dialog") and exporting only selected dives became a
choice while exporting.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
- There needs to be a space between HTML attributes.
- Ampersand must be encoded on URL addresses
- Div element is non-void, so it cannot be self closed
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Never ever use '%f' to write floating point data to a file. The stupid
locale handling creates useless comma-infested output in some locales.
Instead use one of our clever helper functions to do the right thing.
Original patch by Gehad, modified by Linus to be a little more generic.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The exported HTML was missing the UTF-8 encoding, so non ascii
characters weren't displayed correctly, This patch makes the exporter
support all the unicode characters.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The world map exported Javascript sometimes fail because dives with
no coarinates are neglected during exporting which leaves some array
indexes missing and corrupt the javascript.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Replacing the newlines in the string with <br> and changing the
single quote to its HTML number.
Also minor coding style updates to previous commit.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch adds the world map exporter.
- add worldmap-save.c that writes the html to the file
- use Google maps v3 API to put the place marks on the map
- add worldmap-options.h to contain some settings for the JS which will
make it easier for those to be changed
- add save HTML action in the mainwindow user interface
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>