From 1fcc582569177996bad4ddb7e4da24326244f0c2 Mon Sep 17 00:00:00 2001 From: zsloan Date: Fri, 20 Jan 2023 22:03:36 +0000 Subject: Add JS for caching mapping inputs + displaying the link --- wqflask/wqflask/templates/mapping_results.html | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/wqflask/wqflask/templates/mapping_results.html b/wqflask/wqflask/templates/mapping_results.html index 1695abc9..e7bcfc64 100644 --- a/wqflask/wqflask/templates/mapping_results.html +++ b/wqflask/wqflask/templates/mapping_results.html @@ -18,6 +18,7 @@ {% if temp_trait is defined %} {% endif %} + @@ -82,7 +83,9 @@
Download Full Results

- + +
+
@@ -668,6 +671,21 @@ $('#gn1_map_tab').click(function() { $('#gn1_map_options').css("display", "block") }) + + $('.share-results').click(function() { + hash = $('input[name=inputs_hash]').val() + $.ajax({ + method: "POST", + url: "/cache_mapping_inputs", + data: { + inputs_hash: hash + }, + success: function() { + $('input[name=mappingLink]').val(window.location.origin + "/run_mapping?hash=" + hash).show(); + } + }); + }) + {% endblock %} -- cgit v1.2.3