From 8f10a92b0853d137a5f3bc76bf2f2f200c15d8c5 Mon Sep 17 00:00:00 2001 From: Ryan Moore Date: Sun, 17 Mar 2019 03:33:24 -0400 Subject: [PATCH] Use real button --- .gitignore | 2 ++ app/assets/javascripts/pd.js | 32 ++++++++++++++++---------------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index d13cfd8..2a5b76f 100644 --- a/.gitignore +++ b/.gitignore @@ -62,3 +62,5 @@ thing.pdf manuscript app/assets/javascripts/silly.js + +old_vendor_stuff \ No newline at end of file diff --git a/app/assets/javascripts/pd.js b/app/assets/javascripts/pd.js index 564f404..e5f294d 100644 --- a/app/assets/javascripts/pd.js +++ b/app/assets/javascripts/pd.js @@ -463,21 +463,21 @@ global.pd.fn.main = function () { }; // For easier testing, this lets you just click submit and get some test data. - submit_button.addEventListener("click", function () { - // global.pd.fn.handle_data(silly.tree, silly.name_graph); - global.pd.fn.handle_data(silly.weird2, silly.weird2_groups); - }); - - // submit_button.addEventListener("click", function pd_submit_handler() { - // var tree_file = tree_uploader.files[0]; - // - // if (tree_file) { - // tree_reader.readAsText(tree_file); - // } - // else { - // alert("Don't forget a tree file!"); - // } + // submit_button.addEventListener("click", function () { + // global.pd.fn.handle_data(silly.tree, silly.name_graph); + // // global.pd.fn.handle_data(silly.weird2, silly.weird2_groups); // }); + + submit_button.addEventListener("click", function pd_submit_handler() { + var tree_file = tree_uploader.files[0]; + + if (tree_file) { + tree_reader.readAsText(tree_file); + } + else { + alert("Don't forget a tree file!"); + } + }); }; /** @@ -557,7 +557,7 @@ global.pd.fn.handle_data = function (newick_string, group_string) { "Pair Dist Mean" + "Dispersion" + "Disp P Value" + -// "TBL P Value" + + // "TBL P Value" + "" ); @@ -770,7 +770,7 @@ global.pd.fn.make_table_row_data = function (group, stats, pvals) { mean, disp, pval_disp, -// pval_tbl + // pval_tbl ]; };