summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex AUVOLAT <alexis211@gmail.com>2013-10-20 21:12:57 +0200
committerAlex AUVOLAT <alexis211@gmail.com>2013-10-20 21:12:57 +0200
commitda36af8bcdaf2344fdb9019d1c17f44ff90316c4 (patch)
tree860b3d1a3574e344a75288d63f2180522209ad59
parent32802edf1a4753822b03bc148f23079f5ea89f66 (diff)
downloadBits-da36af8bcdaf2344fdb9019d1c17f44ff90316c4.tar.gz
Bits-da36af8bcdaf2344fdb9019d1c17f44ff90316c4.zip
Added a small thing to list studies.
-rw-r--r--design/style.css11
-rw-r--r--js/liststudy.js12
2 files changed, 22 insertions, 1 deletions
diff --git a/design/style.css b/design/style.css
index 5e26d29..99903d1 100644
--- a/design/style.css
+++ b/design/style.css
@@ -243,6 +243,17 @@ hr {
border-bottom: 1px dashed #AAA;
}
+li .info {
+ display: inline-block;
+ width: 50px;
+ color: #444;
+}
+
+li p {
+ margin-top: 4px;
+ margin-bottom: 4px;
+}
+
/* CARDS */
diff --git a/js/liststudy.js b/js/liststudy.js
index f01f656..2d340c9 100644
--- a/js/liststudy.js
+++ b/js/liststudy.js
@@ -72,7 +72,8 @@ function show_contents_table() {
var html = '<table><tr><th class="invisible_td"></th>';
for (var i = 0; i < batch_data.columns.length; i++) {
var c = batch_data.columns[i];
- html += '<th>' + c + ' - <a class="tool_link" href="#" onclick="ch(' + i + ')" id="chsl' + i + '">hide</a></th>';
+ html += '<th>' + c + ' <a class="tool_link" href="#" onclick="ch(' + i + ')" id="chsl' + i + '">hide</a>' +
+ (i != 0 ? ' <a class="tool_link" href="#" onclick="lcol(' + i + ')">list</a>' : '') + '</th>' ;
}
html += '<th>win</th><th>fail</th><th>score</th></tr>';
for (var i = 0; i < items.length; i++) {
@@ -111,6 +112,15 @@ function cs(col) {
$("chsl"+col).onclick = function() { ch(col); };
}
+function lcol(col) {
+ html = '<p><a href="#" onclick="show_contents_table()">Show complete table</a></p><ul>';
+ for (var i = 0; i < items.length; i++) {
+ html += '<li><p><span class="info">' + items[i].info[0] + '</span>' + items[i].info[col] + '</p></li>';
+ }
+ html += '</ul>';
+ $("items").innerHTML = html;
+}
+
function show_reviews_table() {
// eventually, will also show a graph of progress. or maybee not.
if (reviews_data.length == 0) {