summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/liststudy.js17
-rw-r--r--tpl/study/list.php8
2 files changed, 18 insertions, 7 deletions
diff --git a/js/liststudy.js b/js/liststudy.js
index ab6eede..f01f656 100644
--- a/js/liststudy.js
+++ b/js/liststudy.js
@@ -22,9 +22,12 @@ function process_items() {
var d = batch_data.items[i];
item_idx[d[0]] = items.length;
items.push(
- {"info": d,
- "win": 0, "fail": 0, "score": 0, "marker": ""}
- );
+ {
+ "info": d,
+ "win": 0, "fail": 0,
+ "score": 0, "marker": "",
+ }
+ );
}
// Calculate total wins and losses
@@ -118,10 +121,14 @@ function show_reviews_table() {
var color = '';
if (reviews_data[i].score == 100)
color = '#00aa00';
+ else if (reviews_data[i].score >= 90)
+ color = '#22EE22';
else if (reviews_data[i].score >= 80)
color = '#55FF55';
- else if (reviews_data[i].score >= 50)
- color = '#FFFF00';
+ else if (reviews_data[i].score >= 60)
+ color = '#eeee00';
+ else if (reviews_data[i].score >= 40)
+ color = '#FFAA22';
else
color = '#FF7777';
html += '<tr><td>' + reviews_data[i].date + '</td><td style="background-color: ' + color + '">' + reviews_data[i].score + '/100</td></tr>';
diff --git a/tpl/study/list.php b/tpl/study/list.php
index 8d240fb..3bb16dd 100644
--- a/tpl/study/list.php
+++ b/tpl/study/list.php
@@ -14,10 +14,14 @@ foreach ($batches as $batch) {
if ($batch['lr_date']) {
if ($batch['lr_score'] == 100)
$color = "#00AA00";
+ else if ($batch['lr_score'] >= 90)
+ $color = "#22EE22";
else if ($batch['lr_score'] >= 80)
$color = "#55FF55";
- else if ($batch['lr_score'] >= 50)
- $color = "#FFFF00";
+ else if ($batch['lr_score'] >= 60)
+ $color = "#EEEE00";
+ else if ($batch['lr_score'] >= 40)
+ $color = "#FFAA22";
else
$color = "#FF7777";