From 7c3c07a371de310215e416abaef3186436742e31 Mon Sep 17 00:00:00 2001 From: zsloan Date: Tue, 2 Jan 2024 19:21:07 +0000 Subject: Change the way the info button works so that it just submits a form instead of opening a window with JS --- .../static/new/javascript/dataset_select_menu_orig.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'gn2/wqflask/static') diff --git a/gn2/wqflask/static/new/javascript/dataset_select_menu_orig.js b/gn2/wqflask/static/new/javascript/dataset_select_menu_orig.js index 25a703e6..f962cb41 100644 --- a/gn2/wqflask/static/new/javascript/dataset_select_menu_orig.js +++ b/gn2/wqflask/static/new/javascript/dataset_select_menu_orig.js @@ -260,17 +260,17 @@ group_info = function() { $('#group_info').click(group_info); dataset_info = function() { - var dataset, url; accession_id = $('#dataset option:selected').data("id"); if (accession_id != "None") { - url = "https://info.genenetwork.org/infofile/source.php?GN_AccesionId=" + accession_id + $('input[name=accession_id]').val(accession_id); } else { - species = $('#species').val(); - group = $('#group').val(); - url = "https://info.genenetwork.org/species/source.php?SpeciesName=" + species + "&InbredSetName=" + group + $('input[name=accession_id]').val("None"); } - return open_window(url, "_blank"); -}; + + $('#searchform').prop("action", "/db_info"); + $('#searchform').submit(); +} + $('#dataset_info').click(dataset_info); make_default = function() { @@ -328,3 +328,6 @@ check_search_term = function() { }; $("#make_default").click(make_default); +$("#btsearch").click(function() { + $("#searchform").prop("action", "/search") +}); -- cgit v1.2.3