diff options
author | zsloan | 2022-04-28 15:11:30 +0000 |
---|---|---|
committer | zsloan | 2022-05-10 19:39:27 +0000 |
commit | a6c79d92eeecfae7c3d04ec233cd2de5eefc0675 (patch) | |
tree | d27843e0baded250ad07e4696455d3395d2e7b6c /wqflask | |
parent | 67eaa6749d6facae46d0506095eea93cb85e03c3 (diff) | |
download | genenetwork2-a6c79d92eeecfae7c3d04ec233cd2de5eefc0675.tar.gz |
Refactor JS code for exports some
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/static/new/javascript/search_results.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/wqflask/wqflask/static/new/javascript/search_results.js b/wqflask/wqflask/static/new/javascript/search_results.js index fb9f478d..921c6862 100644 --- a/wqflask/wqflask/static/new/javascript/search_results.js +++ b/wqflask/wqflask/static/new/javascript/search_results.js @@ -196,11 +196,11 @@ $(function() { }; submitBnw = function() { - trait_data = submitTraitsToExportOrBnw("trait_table", "submit_bnw") + trait_data = submitTraits("trait_table", "submit_bnw") } exportTraits = function() { - trait_data = submitTraitsToExportOrBnw("trait_table", "export_traits_csv") + trait_data = submitTraits("trait_table", "export_traits_csv") }; exportCollection = function() { @@ -220,7 +220,7 @@ $(function() { table_dict['headers'] = headers; selected_rows = []; - all_rows = []; //ZS: If no rows are checked, export all + all_rows = []; // If no rows are checked, export all table_api = $('#' + table_name).DataTable(); check_cells = table_api.column(0).nodes().to$(); for (let i = 0; i < check_cells.length; i++) { @@ -319,6 +319,7 @@ $(function() { $("#add").click(addToCollection); $("#submit_bnw").click(submitBnw); $("#export_traits").click(exportTraits); + $("#export_collection").click(exportCollection); let naturalAsc = $.fn.dataTableExt.oSort["natural-ci-asc"] let naturalDesc = $.fn.dataTableExt.oSort["natural-ci-desc"] |