summaryrefslogtreecommitdiffstats
path: root/theme/dive_export.html
diff options
context:
space:
mode:
authorGravatar Gehad elrobey <gehadelrobey@gmail.com>2014-08-04 12:36:08 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-08-04 10:03:15 -0700
commite968d91943bbcaf25cd3a1df84fc4d09bc889c94 (patch)
treefca9f4fd360e558058a505902af755526110e356 /theme/dive_export.html
parent5076e431d5388b2d142628cb2c5a18a45e22666a (diff)
downloadsubsurface-e968d91943bbcaf25cd3a1df84fc4d09bc889c94.tar.gz
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>
Diffstat (limited to 'theme/dive_export.html')
-rw-r--r--theme/dive_export.html13
1 files changed, 13 insertions, 0 deletions
diff --git a/theme/dive_export.html b/theme/dive_export.html
index a326e3bf6..524f39a69 100644
--- a/theme/dive_export.html
+++ b/theme/dive_export.html
@@ -35,6 +35,10 @@ function load_scripts()
document.getElementsByTagName("head")[0].appendChild(fileref);
fileref=document.createElement('script');
+ fileref.setAttribute("src", location.pathname + "_files/stat.json");
+ document.getElementsByTagName("head")[0].appendChild(fileref);
+
+ fileref=document.createElement('script');
fileref.setAttribute("src", location.pathname + "_files/settings.json");
document.getElementsByTagName("head")[0].appendChild(fileref);
@@ -116,6 +120,7 @@ window.onload=function(){
sizeofpage=10;
showAllDives();
document.getElementById("divePanel").style.display='none';
+ document.getElementById("diveStat").style.display='none';
document.body.style.visibility='visible';
document.onkeydown = switchDives;
@@ -155,6 +160,7 @@ function changeAdvSearch(e){
<button onClick="expandAll()"> Expand All </button>
<button onClick="collapseAll()"> Collapse All </button>
<button id="trip_button" onclick="toggleTrips();">trips</button>
+ <button id="stats_button" onclick="toggleStats();">Stats</button>
</div>
</div>
<div id="header">
@@ -213,5 +219,12 @@ function changeAdvSearch(e){
</div>
</div>
</div>
+ <div id="diveStat">
+ <center>
+ <button onClick="toggleStats()">Back to List</button>
+ </center>
+ <div id="diveStatsData">
+ </div>
+ </div>
</body>
</html>