From 72d828bd8e47e2aa16b075fbc6e99d9deb8e4d0a Mon Sep 17 00:00:00 2001
From: zsloan
Date: Fri, 4 Dec 2020 13:41:33 -0600
Subject: Fixed correlation export to export table contents instead of using
the same export as other trait tables (that exports data)
Removed some unused imports
---
wqflask/wqflask/templates/correlation_page.html | 33 ++++++++++++++-----------
1 file changed, 18 insertions(+), 15 deletions(-)
(limited to 'wqflask')
diff --git a/wqflask/wqflask/templates/correlation_page.html b/wqflask/wqflask/templates/correlation_page.html
index aa74abf5..5093ebfa 100644
--- a/wqflask/wqflask/templates/correlation_page.html
+++ b/wqflask/wqflask/templates/correlation_page.html
@@ -80,19 +80,21 @@
-
+
{% if target_dataset.type != "Publish" %}
-
+
+
+
-
+
with r >
@@ -115,7 +117,7 @@
{% endif %}
-
+
Show/Hide Columns:
@@ -174,7 +176,7 @@
-
+
@@ -259,17 +261,14 @@
$(document).ready( function () {
table_conf = {
buttons: [
- {
- extend: 'columnsToggle',
- columns: function( idx, data, node ) {
- if (idx != 0) {
- return true;
- } else {
- return false;
- }
- },
- postfixButtons: [ 'colvisRestore' ]
+ {
+ extend: 'csvHtml5',
+ text: 'Download ',
+ className: 'btn btn-default',
+ exportOptions: {
+ columns: 'th:not(:first-child)'
}
+ }
],
'drawCallback': function( settings ) {
$('#trait_table tr').off().on("click", function(event) {
@@ -544,6 +543,10 @@
trait_table = $('#trait_table').DataTable(table_conf);
+ trait_table.buttons().container().appendTo('#export_options')
+
+ $('.buttons-csv').removeClass('dt-button')
+
trait_table.on( 'order.dt search.dt draw.dt', function () {
trait_table.column(1, {search:'applied', order:'applied'}).nodes().each( function (cell, i) {
cell.innerHTML = i+1;
--
cgit v1.2.3