diff options
author | Alex AUVOLAT <alexis211@gmail.com> | 2013-10-20 21:12:57 +0200 |
---|---|---|
committer | Alex AUVOLAT <alexis211@gmail.com> | 2013-10-20 21:12:57 +0200 |
commit | da36af8bcdaf2344fdb9019d1c17f44ff90316c4 (patch) | |
tree | 860b3d1a3574e344a75288d63f2180522209ad59 /js | |
parent | 32802edf1a4753822b03bc148f23079f5ea89f66 (diff) | |
download | Bits-da36af8bcdaf2344fdb9019d1c17f44ff90316c4.tar.gz Bits-da36af8bcdaf2344fdb9019d1c17f44ff90316c4.zip |
Added a small thing to list studies.
Diffstat (limited to 'js')
-rw-r--r-- | js/liststudy.js | 12 |
1 files changed, 11 insertions, 1 deletions
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) { |