diff options
author | Gehad elrobey <gehadelrobey@gmail.com> | 2014-08-08 17:18:09 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-08-11 08:21:10 -0700 |
commit | a16c2db78da6707f15079612740f9bf9b07b5990 (patch) | |
tree | 33637279dc10096787cce0ea838f2c777ff91801 /theme/list_lib.js | |
parent | a8bca851692f93a252692d7275912628ec910acd (diff) | |
download | subsurface-a16c2db78da6707f15079612740f9bf9b07b5990.tar.gz |
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>
Diffstat (limited to 'theme/list_lib.js')
-rw-r--r-- | theme/list_lib.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/theme/list_lib.js b/theme/list_lib.js index 2c915ad6f..089f8bfd0 100644 --- a/theme/list_lib.js +++ b/theme/list_lib.js @@ -690,11 +690,19 @@ function getDiveStats(){ function getStatsRows(){ var res = ""; for(var i = 0; i < divestat.length ; i++) { - res += '<tr><td class="statscell">'+divestat[i].YEAR+'</td><td class="statscell">'+divestat[i].DIVES+'</td><td class="statscell">'+divestat[i].TOTAL_TIME+'</td><td class="statscell">'+divestat[i].AVERAGE_TIME+'</td><td class="statscell">'+divestat[i].SHORTEST_TIME+'</td><td class="statscell">'+divestat[i].LONGEST_TIME+'</td><td class="statscell">'+divestat[i].AVG_DEPTH+'</td><td class="statscell">'+divestat[i].MIN_DEPTH+'</td><td class="statscell">'+divestat[i].MAX_DEPTH+'</td><td class="statscell">'+divestat[i].AVG_SAC+'</td><td class="statscell">'+divestat[i].MIN_SAC+'</td><td class="statscell">'+divestat[i].MAX_SAC+'</td><td class="statscell">'+divestat[i].AVG_TEMP+'</td><td class="statscell">'+divestat[i].MIN_TEMP+'</td><td class="statscell">'+divestat[i].MAX_TEMP+'</td></tr>'; + res += '<tr onmouseout="stats_row_unhighlight(this)" onmouseover="stats_row_highlight(this)" class="stats_row"><td class="statscell">'+divestat[i].YEAR+'</td><td class="statscell">'+divestat[i].DIVES+'</td><td class="statscell">'+divestat[i].TOTAL_TIME+'</td><td class="statscell">'+divestat[i].AVERAGE_TIME+'</td><td class="statscell">'+divestat[i].SHORTEST_TIME+'</td><td class="statscell">'+divestat[i].LONGEST_TIME+'</td><td class="statscell">'+divestat[i].AVG_DEPTH+'</td><td class="statscell">'+divestat[i].MIN_DEPTH+'</td><td class="statscell">'+divestat[i].MAX_DEPTH+'</td><td class="statscell">'+divestat[i].AVG_SAC+'</td><td class="statscell">'+divestat[i].MIN_SAC+'</td><td class="statscell">'+divestat[i].MAX_SAC+'</td><td class="statscell">'+divestat[i].AVG_TEMP+'</td><td class="statscell">'+divestat[i].MIN_TEMP+'</td><td class="statscell">'+divestat[i].MAX_TEMP+'</td></tr>'; } return res; } +function stats_row_highlight(row){ + row.style.backgroundColor = "rgba(125,125,125,0.7)"; +} + +function stats_row_unhighlight(row){ + row.style.backgroundColor = "rgba(125,125,125,0.3)"; +} + //trips var tripsShown; |