From a24a13a89f31b04aa3daa9a16d8cfc297be9de75 Mon Sep 17 00:00:00 2001 From: Jochen Weile Date: Thu, 3 May 2018 16:50:17 -0400 Subject: [PATCH] reset form when scoreset changes --- docker/cgi/mavevis.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/docker/cgi/mavevis.js b/docker/cgi/mavevis.js index 981613f..f0af236 100644 --- a/docker/cgi/mavevis.js +++ b/docker/cgi/mavevis.js @@ -72,12 +72,20 @@ $(document).ready(function(){ */ function reset() { - $("#submitButton").prop('disabled', true); - $("#outputpanel").hide(); - $("#molecule").val(""); ssid=null; + resetMost(); + } + + /** + * Resets most of the form back to its initial state, except for the score set + */ + function resetMost() { + + $("#submitButton").prop('disabled', true); + $("#outputpanel").hide(); + $("#uniprot").val(""); uniprot=null; $("#uniprotOptions").hide(); @@ -257,6 +265,8 @@ $(document).ready(function(){ delay: 500, select: function(event, ui) { + resetMost(); + ssid = ui.item.ssid; //if a uniprot ID is available, automatically fill it in if (ui.item.uniprot) {