aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wqflask/wqflask/templates/base.html7
-rwxr-xr-xwqflask/wqflask/templates/index_page.html34
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>