Commit graph

14 commits

Author SHA1 Message Date
Dirk Hohndel
881da272c4 Small whitespace fixes
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-29 07:30:33 -07:00
Gehad elrobey
a3dbb5865c HTML list exporter
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>
2014-05-29 07:24:17 -07:00
Miika Turkia
54592fdcfa Localize worldmap export
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>
2014-05-25 05:39:39 -07:00
Miika Turkia
ae5c947460 Use user preferred units on worldmap export
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>
2014-05-25 05:39:16 -07:00
Miika Turkia
8f17caeedc Location must be quoted on worldmap export
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>
2014-05-25 05:39:04 -07:00
Rick Walsh
b27e56da0a 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>
2014-05-24 21:10:57 -07:00
Gehad elrobey
19e22e1bb7 Add ability to export only selected dives in worldmap exporter
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>
2014-05-21 22:18:36 +09:00
Miika Turkia
1b6b2b78c8 Fix HTML errors
- 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>
2014-04-06 14:17:09 -07:00
Gehad
cb3436b42e Use helper function to write decimal numbers
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>
2014-04-05 16:10:11 -07:00
Gehad
d6af09b269 Set the world-map HTML charset to UTF-8
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>
2014-04-05 07:46:45 -07:00
Gehad
a6fcd4f99f Javascript exported code throws errors when dives are missing
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>
2014-04-04 08:23:26 -07:00
Dirk Hohndel
9a0e40b456 Random small whitespace cleanups
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-03 12:52:05 -07:00
Gehad
c268b757df Fixing dive notes escape characters in worldmap exporter
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>
2014-04-03 12:12:56 -07:00
Gehad
0cd9d09410 Exporting a World-Map
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>
2014-03-30 15:52:32 -07:00