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>
This commit is contained in:
Gehad elrobey 2014-08-08 17:18:09 +03:00 committed by Dirk Hohndel
parent a8bca85169
commit a16c2db78d
3 changed files with 28 additions and 6 deletions

View file

@ -129,7 +129,6 @@ input[type=checkbox]{
font-weight:bold;
}
#controller{
min-width:200px;
padding:10px;
@ -159,8 +158,14 @@ input[type=checkbox]{
}
.statscell{
min-width:100px;
min-width:120px;
height: 25px;
margin:0px;
text-align:center;
}
.stats_row{
background-color:rgba(125,125,125,0.3);
}
#stats_header{

View file

@ -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;

View file

@ -147,7 +147,7 @@ input[type=checkbox]{
width:90%;
margin:0% 5% 0% 5%;
margin-bottom:50px;
background-color: rgba(88,121,139,0.3);
background-color: rgba(253, 195, 141,0.3);
box-shadow: 10px 10px 5px #888888;
}
@ -156,9 +156,18 @@ input[type=checkbox]{
overflow-y:hidden;
}
.statscell{
border-style:solid;
padding-right:100px;
min-width:120px;
height: 25px;
margin:0px;
text-align:center;
}
.stats_row{
background-color:rgba(125,125,125,0.3);
}
#stats_header{
background-color:#EFC15F;
}
button,#no_dives_selector{