diff options
author | Alexander_Kabui | 2023-03-09 06:02:21 +0300 |
---|---|---|
committer | Alexander_Kabui | 2023-03-09 06:02:21 +0300 |
commit | e9374f6d824677501b0f56d2c62c6f4476903d58 (patch) | |
tree | a1447f54cdb04b5f835228b60105192d8fa7c384 /wqflask | |
parent | 52fd2926a09fe62798ecec57bc300532e0384de5 (diff) | |
download | genenetwork2-e9374f6d824677501b0f56d2c62c6f4476903d58.tar.gz |
code cleanupchores/code-refactoring
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/templates/base.html | 7 | ||||
-rwxr-xr-x | wqflask/wqflask/templates/index_page.html | 34 |
2 files changed, 9 insertions, 32 deletions
diff --git a/wqflask/wqflask/templates/base.html b/wqflask/wqflask/templates/base.html index beafba08..db2159e0 100644 --- a/wqflask/wqflask/templates/base.html +++ b/wqflask/wqflask/templates/base.html @@ -271,6 +271,13 @@ <script type="text/javascript"> $(document).ready(function() { + const urlParams = new URLSearchParams(window.location.search) + let term = urlParams.get("terms") + + term = term?term: "cytochrome AND P450" + $("#term").val(term); + + //should web scrap var global_search_hint = [ "cytochrome", diff --git a/wqflask/wqflask/templates/index_page.html b/wqflask/wqflask/templates/index_page.html index e6ef667a..1c136acb 100755 --- a/wqflask/wqflask/templates/index_page.html +++ b/wqflask/wqflask/templates/index_page.html @@ -296,19 +296,12 @@ {% block js %} - - <script src="/static/new/javascript/search_autocomplete.js"></script> <script src="/static/new/javascript/dataset_select_menu_orig.js"></script> <script type="text/javascript"> - - - let form = document.getElementById("searchform") - - + $(document).on('submit', '#searchform', function(event){ - event.preventDefault() let user_search = $("#myInput").val().trim(); if (user_search!=""){ @@ -330,36 +323,13 @@ $(document).on('submit', '#searchform', function(event){ if( event.target.value.trim() != "" ) { saveBeforeSubmit(event.target.value.trim()) //document.forms[1].submit(); - $( "#searchform" )[0].submit(); + $("#searchform")[0].submit(); } } } - let x = document.getElementById("myInput"); - - var hints = [ - "cytochrome", - "cytochrome AND P450", - "cytochrome NEAR P450", - "cytochrome -P450", - "cytochrome NOT P450", - "species:human", - "group:BXD", - "Hs:chr4:9930021 species:mouse", - "Hs:chr4:9130000..9980000 species:mouse", - "mean:5..7", - "mean:7..", - "Hs:chr4:9930021", - "Hs:chr4:9930021 species:mouse", - "Hs:chr4:9130000..9980000 species:mouse", - "bx*", - "*", - ] - - autocomplete(document.getElementById("myInput"), hints); - </script> <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='javascript-twitter-post-fetcher/js/twitterFetcher_min.js') }}"></script> |