Commit graph

96 commits

Author SHA1 Message Date
Martin Měřinský
dcf2542215 Use abbreviations with dots. 2017-03-11 08:09:07 -08:00
Sander Kleijwegt
a02ea68582 HTML Export: Ignore case when searching for tags
Fixes #934

Signed-off-by: Sander Kleijwegt <sander@myowndomain.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-04 16:29:32 +01:00
Dirk Hohndel
293569cb19 HTML export: before showing the dive list, sort descending by dive number
This way the newest dive gets shown first (which I think makes much more
sense) and the dives are in order as we show them in Subsurface.

I actually think we should toggle trips on by default - but I'm not sure.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-18 22:04:11 -07:00
Dirk Hohndel
f5510892a6 HTML export: cosmetic change to show 20 dives by default
10 just seemed a little... low.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-18 22:03:13 -07:00
Gehad elrobey
d23e71e99a HTML: Fix spelling mistake
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-18 21:31:18 -07:00
Dirk Hohndel
9f5207fc0d HTML exports: minor cosmetic improvements
This brings up the satellite view when clicking on GPS coordinates and
sets a slightly better page title.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17 17:04:16 -07:00
Anton Lundin
b052d63789 Hide the dive-related controls when showing trips
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17 16:38:11 -07:00
Anton Lundin
cfd001702f Make the expand/collapse buttons usefull on trips
There where some issues with trying to access non-existing dom elements
when clicking them when showing trips.

Instead of fixing that issue, this actually makes them do something
useful, expanding and collapsing the trips.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17 16:38:03 -07:00
Anton Lundin
00db47b19e Remove old timing of function
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17 16:37:58 -07:00
Dirk Hohndel
b345db0a64 HTML export: better Google maps link
This way we get an actual place marker

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17 12:38:24 -07:00
Dirk Hohndel
a922e52b8f HTML Exporter: make JS work on Firefox as well
It appears the standard way to figure out what type of element is sending
the event is to use .target instead of .toElement - specifically, Firefox
doesn't understand .toElement and so the expansion of dives by clicking on
them didn't work in Firefox.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17 10:15:08 -07:00
Gehad elrobey
5d09244c0f HTML: fix the unclosed <ul> tag.
The <ul> tag must be closed as defined by the html specs.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17 09:29:39 -07:00
Gehad elrobey
3ff73d0a66 HTML: don't collapse the dive if hyperlink is clicked
fixes the wrong behaviour as dive details must not be closed when
hyperlinks are clicking, So check for Hyperlinks before toggling the
dive.

Fixes #713

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-25 02:34:29 -07:00
Gehad elrobey
e70dbb568d HTML: don't show dive photos if photos are missing
some photos can be missing due to permission issues during exporting.

There are 3 cases:

-All photos are missing, the photo view must disapear.
-Some photos are missing, these photos must not be shown.
-No missing photos, all the photos must be viewed.

at loading try to get all the existing photos by GET. missing photos
must be marked for later removal. After all asynchronous GET requests
are received, remove all missing photos then finally show them all.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-11 11:02:28 -07:00
Gehad elrobey
9e09bc0f52 HTML: Report start cylinder pressure correctly.
Report start cylinder pressure from the samples with empty value.
Must search for the first nonzero value.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-11 11:02:21 -07:00
Gehad elrobey
d922dbbd99 HTML: fix the value of cylinder gas in trimix dives
Value of He must be showed in trimix dives, also fixes the format of the
dive events table. Gas change should be something like O2: 50 - He 0

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-11 11:02:16 -07:00
Gehad elrobey
0995a800d9 HTML: Add Max. depth to dive view.
Add Max. Depth feild to the expanded and main dive views.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-28 12:43:17 +01:00
Gehad elrobey
c97128102d HTML: add Depth and Duration data to the dive list view.
Add the Depth and Duration information to the list view and make dives
sortable by them instead of the water and air temperatures.

Fixes #725

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-06 07:04:06 -08:00
Miika Turkia
194d4b4c00 Variable should be declared before loop
Fixing incorrect variable scope. (I do not really see any functional
differences on Firefox, but better declare the variable before the
loop.)

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-02 07:05:42 -08:00
Gehad elrobey
e3be473a7f Fix inconsistent search result in HTML export
The advanced search drop down menu always showed the user selected
settings, even if this is a customized search (tag, location) that took
place by clicking on the search quick hyperlink.

This is fixed by saving the user default search preferences and changing
them temporarily when quick hyperlinks searching is used.

Fixes #723

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-01 22:03:01 -07:00
Gehad elrobey
540dbe927e HTML: Fix the Javascript library to support multi units.
-make the dive profile dynamic to check user selected units from the
settings file.
-some of the code needs to be refactored and copied to a more
appropriate location.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-20 18:08:49 -07:00
Gehad elrobey
8aa387414c HTML: Cursor is on top of graph tooltip
-change the color of the depth graph slightly to be more readable.
-change the tooltip of the depth graph to NW-corner of the cursor.
-change the opacity of the tooltip for readability.

Fixes #724

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-18 06:31:42 -07:00
Gehad Elrobey
01d0eb5f8b HTML: fix typo in dive counter
adds a missing space to dive counter.

Fixes #722

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-18 06:30:36 -07:00
Tim Wootton
9901169485 Bring save html capitalisation in line
Converted save html to use same capitalisation style as the
rest of the application
Changed references to equipments to equipment.

Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-18 06:25:24 -07:00
Gehad elrobey
3925aed5ea HTML: Changing the files extensions to js
These are actually javascript files containing js objects and not json
files.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-28 07:43:18 -07:00
Gehad elrobey
abfa4f2108 HTML: export valid JSON.
Remove the trailing commas from the exported JSON file as some json
parsers just don't like it. The file 'file.json' is valid acording to
the JSON spesification.

Note: its a javascript file containing a JS variable 'trips' and not a
JSON file. Because loading a pure JSON file from local disk is not
accepted by the web-browsers itself. Actually I think changing the file
extension to .js is now makes more sense.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-28 07:43:14 -07:00
Gehad elrobey
d00390d46d HTML: Save divecomputer data to the HTML exports
Save divecomputers data to the JSON files. and show them in the HTML
dive detailed view.

Fixes #711

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-27 07:18:41 -07:00
Gehad elrobey
d72e02c83e HTML: time unit is in minutes not seconds.
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-08-17 22:58:42 -05:00
Gehad elrobey
4ac018712f HTML: Fix Fake precision value.
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-08-17 22:58:39 -05:00
Gehad elrobey
16515a970f HTML: change empty O2 Value to Air.
-Change column name to 'Gas' as changed in Subsurface.
-Replace '--' with 'Air' to empty tanks.

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-08-17 12:03:24 -06:00
Gehad elrobey
5b9537222e HTML: Make theme colors consistent.
Buttons and fields colors must be consistent in different themes.

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-08-17 12:03:22 -06:00
Gehad elrobey
1494ea9727 HTML: Make SAC, OTU and CNS in uppercase letters.
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-08-17 12:03:19 -06:00
Gehad elrobey
9194a43fd4 HTML: add units to time in dive profile.
Also change the separator to a colon which is more readable.

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-08-17 12:03:17 -06:00
Gehad elrobey
27e400f5e4 HTML: don't show cylinders or weights table if they don't exist
Don't show the table header of cylinders or weights if they are not
available.

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-08-17 12:03:14 -06:00
Miika Turkia
d83c36c36b Fix typo
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-17 12:03:01 -06:00
Gehad elrobey
9015160199 HTML: Add coordinates to the HTML exports
- Export dive coordinates (if exist) to JSON file.
- Add dive coordinates to list view and detailed dive view.
- Add hyperlink that opens the dive location in a new tab viewed in
Google maps.

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-08-14 09:53:05 -06:00
Gehad elrobey
a03e772954 HTML: Sort by number based on the chosen number format.
Sorting by the number must be based on either subsurface number or the
regular indexing as choosed in settings.json

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-08-14 09:53:03 -06:00
Gehad elrobey
63691ed61b HTML: arrow navigation is based on full dive list.
The navigation arrows from the detailed dive view is based on the full
dive list, regardless of 'items_to_show' list.

This can introduce unexpected behaviour if some search results or
explicitly sorted list are shown in the list view. Restoring this
list view from the detailed dive view after some arrow navigation.

Arrow navigation must be separte and don't change the 'start_id'
variable.

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-08-14 09:52:57 -06:00
Gehad elrobey
8bc232b0bd HTML: Scroll page to the top before showing the detailed view.
When looking at the dive list view, clicking on the 'show more details'
retains the view at the current vertical position, meaning that the
graph is somewhere above, outside the page view.

Page must be scrolled to the top before viewing the detailed dive view.

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-08-14 09:52:54 -06:00
Gehad elrobey
fda5ff2af2 HTML: don't update axis on window resize
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-08-14 09:52:51 -06:00
Gehad elrobey
00a86b44ba HTML: Fix sorting water and air temperature values
Parse values by float instead of integer.

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-08-14 09:52:45 -06:00
Miika Turkia
7d9c71c947 Fix typo on HTML export
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-11 08:21:25 -07:00
Gehad elrobey
10beb33ea6 HTML: show translated words dynamically from JSON translation file.
Make HTML exports Multilingual by showing dynamically the HTML words
from JSON files. The needed words are translated using the translation
API in subsurface.

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-08-11 08:21:22 -07:00
Gehad elrobey
a16c2db78d HTML: Enhance Yearly statistics table.
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-08-11 08:21:10 -07:00
Gehad elrobey
a8bca85169 HTML: export dive duration value to the detailed view.
Dive duration value is missing in the dive exports

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-08-11 08:21:06 -07:00
Gehad elrobey
70cfe4f9eb HTML: Search results must be sorted by default.
-Fix search results to be sorted by default.
-Fix two typos.

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-08-11 08:20:59 -07:00
Gehad elrobey
93a15d471c HTML: Make export statistics optional.
Make exporting statistics to the HTML page optional.

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-08-11 08:20:55 -07:00
Miika Turkia
0130f8411b HTML: prevent implicit type conversion
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-04 10:03:20 -07:00
Gehad elrobey
477e37d15c HTML: don't replot the graph if not plotted before.
Prevent plotting the graph when screen is resized before the graph is
plotted for the first time.

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-08-04 10:03:17 -07:00
Gehad elrobey
e968d91943 HTML: add Yearly Statistics view to the HTML export
View JSON data of yearly statistics in HTML exports.

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-08-04 10:03:15 -07:00