From a16c2db78da6707f15079612740f9bf9b07b5990 Mon Sep 17 00:00:00 2001 From: Gehad elrobey Date: Fri, 8 Aug 2014 17:18:09 +0300 Subject: [PATCH] HTML: Enhance Yearly statistics table. Signed-off-by: Gehad elrobey Signed-off-by: Miika Turkia Signed-off-by: Dirk Hohndel --- theme/light.css | 9 +++++++-- theme/list_lib.js | 10 +++++++++- theme/sand.css | 15 ++++++++++++--- 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/theme/light.css b/theme/light.css index a1acbfa65..baa04b62b 100644 --- a/theme/light.css +++ b/theme/light.css @@ -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{ 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 += ''+divestat[i].YEAR+''+divestat[i].DIVES+''+divestat[i].TOTAL_TIME+''+divestat[i].AVERAGE_TIME+''+divestat[i].SHORTEST_TIME+''+divestat[i].LONGEST_TIME+''+divestat[i].AVG_DEPTH+''+divestat[i].MIN_DEPTH+''+divestat[i].MAX_DEPTH+''+divestat[i].AVG_SAC+''+divestat[i].MIN_SAC+''+divestat[i].MAX_SAC+''+divestat[i].AVG_TEMP+''+divestat[i].MIN_TEMP+''+divestat[i].MAX_TEMP+''; + res += ''+divestat[i].YEAR+''+divestat[i].DIVES+''+divestat[i].TOTAL_TIME+''+divestat[i].AVERAGE_TIME+''+divestat[i].SHORTEST_TIME+''+divestat[i].LONGEST_TIME+''+divestat[i].AVG_DEPTH+''+divestat[i].MIN_DEPTH+''+divestat[i].MAX_DEPTH+''+divestat[i].AVG_SAC+''+divestat[i].MIN_SAC+''+divestat[i].MAX_SAC+''+divestat[i].AVG_TEMP+''+divestat[i].MIN_TEMP+''+divestat[i].MAX_TEMP+''; } 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; diff --git a/theme/sand.css b/theme/sand.css index befa861b7..b2f35bbb1 100644 --- a/theme/sand.css +++ b/theme/sand.css @@ -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{