aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Kabui2023-03-09 06:05:52 +0300
committerGitHub2023-03-09 06:05:52 +0300
commitd80e752cd5554b18b183c8797fa34d97919104f1 (patch)
treea1447f54cdb04b5f835228b60105192d8fa7c384
parentbc0db302025353cdb01a424a99a04ebacd4a4392 (diff)
parente9374f6d824677501b0f56d2c62c6f4476903d58 (diff)
downloadgenenetwork2-d80e752cd5554b18b183c8797fa34d97919104f1.tar.gz
Merge pull request #772 from genenetwork/chores/code-refactoring
Chores/code refactoring
-rw-r--r--wqflask/wqflask/static/new/javascript/search_autocomplete.js25
-rw-r--r--wqflask/wqflask/templates/base.html498
-rwxr-xr-xwqflask/wqflask/templates/index_page.html34
3 files changed, 273 insertions, 284 deletions
diff --git a/wqflask/wqflask/static/new/javascript/search_autocomplete.js b/wqflask/wqflask/static/new/javascript/search_autocomplete.js
index 04634f9b..10c22c95 100644
--- a/wqflask/wqflask/static/new/javascript/search_autocomplete.js
+++ b/wqflask/wqflask/static/new/javascript/search_autocomplete.js
@@ -1,4 +1,9 @@
//replace with gn search hints
+
+
+
+
+
function autocomplete(inp, arr) {
/*the autocomplete function takes two arguments,
the text field element and an array of possible autocompleted values:*/
@@ -6,6 +11,8 @@
/*execute a function when someone writes in the text field:*/
inp.addEventListener("focus", function(e) {
+
+
var a, b, i, val = this.value;
closeAllLists();
currentFocus = -1;
@@ -15,9 +22,10 @@
this.parentNode.appendChild(a);
let historySearch = retrieveSearchHistory().splice(0, 5)
let text_title = document.createElement("DIV")
- text_title.innerHTML = "<strong>RECENT SEARCH</strong><input type='button' value='close_all'>";
+ text_title.innerHTML = "<strong>RECENT SEARCH</strong><input id='clear_all' type='button' value='clear_all'>";
text_title.setAttribute("class", "recent-search-title")
text_title.setAttribute('disabled', true);
+
a.appendChild(text_title);
for (i = 0; i < historySearch.length; i++) {
b = document.createElement("DIV");
@@ -32,6 +40,12 @@
a.appendChild(b);
}
+ document.getElementById("clear_all").addEventListener("click",(event)=>{
+
+
+ deleteSearchHistory()
+ })
+
});
@@ -136,8 +150,9 @@
}
function retrieveSearchHistory() {
- let results = JSON.parse(localStorage.getItem("gn_search_history"))
- return results ? results : []
+ let results = localStorage.getItem("gn_search_history")
+
+ return results ? JSON.parse(results) : []
}
@@ -151,4 +166,8 @@
localStorage.setItem("gn_search_history", JSON.stringify([...new Set(search)].splice(0,8)))
+ }
+
+ function deleteSearchHistory(){
+ localStorage.setItem("gn_search_history", [])
} \ No newline at end of file
diff --git a/wqflask/wqflask/templates/base.html b/wqflask/wqflask/templates/base.html
index 116d9b7c..db2159e0 100644
--- a/wqflask/wqflask/templates/base.html
+++ b/wqflask/wqflask/templates/base.html
@@ -4,13 +4,11 @@
<head>
<meta charset="utf-8">
-
<title>{% block title %}{% endblock %} GeneNetwork 2</title>
-
<meta name="description" content="">
<meta name="author" content="">
<script type="text/javascript">
- var pageLoadStart = Date.now();
+ var pageLoadStart = Date.now();
</script>
<link rel="icon" type="image/png" sizes="64x64" href="/static/new/images/CITGLogo.png">
<link rel="apple-touch-icon" type="image/png" sizes="64x64" href="/static/new/images/CITGLogo.png">
@@ -18,17 +16,14 @@
<link REL="stylesheet" TYPE="text/css" href="/static/new/css/bootstrap-custom.css" />
<link REL="stylesheet" TYPE="text/css" href="/static/new/css/non-responsive.css" />
<link REL="stylesheet" TYPE="text/css" href="/static/new/css/docs.css" />
- <link rel="stylesheet" type="text/css" href="/static/new/css/colorbox.css" />
+ <link rel="stylesheet" type="text/css" href="/static/new/css/colorbox.css" />
<!--<link rel="stylesheet" type="text/css" href="/static/new/css/main.css" />-->
- <link rel="stylesheet" type="text/css" href="/static/new/css/parsley.css" />
- <link rel="stylesheet" type="text/css" href="/static/new/css/broken_links.css" />
-
-
+ <link rel="stylesheet" type="text/css" href="/static/new/css/parsley.css" />
+ <link rel="stylesheet" type="text/css" href="/static/new/css/broken_links.css" />
+ <link rel="stylesheet" href="/static/new/css/autocomplete.css" />
{% block css %}
{% endblock %}
-
<style>
-
.form-rounded {
border-radius: 1rem;
}
@@ -38,294 +33,299 @@
table.dataTable thead .sorting_desc {
background-image: url({{ url_for("js", filename="DataTables/images/sort_desc_disabled.png") }});
}
+
+
+ .global_search_input{
+ padding:9px 8px;
+ text-decoration: none;
+ border: none;
+
+ border-radius: 5px;
+ }
+
+
+ .global_search_input:focus{
+ outline: none;
+}
</style>
</head>
<body style="width: 100%">
<!-- Navbar ================================================== -->
-
<div class="navbar navbar-inverse navbar-static-top pull-left" role="navigation" style="width: 100%; min-width: 850px; white-space: nowrap;">
- <!--<div class="navbar navbar-default" style="width: 100%; white-space: nowrap;">-->
- <div class="container-fluid" style="width: 100%;">
- <!-- Brand and toggle get grouped for better mobile display -->
- <!---
+ <!--<div class="navbar navbar-default" style="width: 100%; white-space: nowrap;">-->
+ <div class="container-fluid" style="width: 100%;">
+ <!-- Brand and toggle get grouped for better mobile display -->
+ <!---
<div class="navbar-header">
<a class="navbar-brand" href="/">GeneNetwork</a>
</div>
-->
-
- <!-- Collect the nav links, forms, and other content for toggling -->
- <div>
- <ul class="nav navbar-nav">
- <li class="" style="margin-right: 20px;">
- <a href="/" style="font-weight: bold;">GeneNetwork</a>
- </li>
- <li class="">
- <a href="/help" class="dropdow-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Intro <span class="caret"></a>
- <ul class="dropdown-menu">
- <li><a href="/intro">Intro</a></li>
- <li><a href="/submit_trait">Submit Trait</a></li>
- <li><a href="http://genenetwork.org/webqtl/main.py?FormID=batSubmit">Batch Submission</a></li>
- </ul>
- </li>
- <li class="">
- <a href="/help" class="dropdow-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Help <span class="caret"></a>
- <ul class="dropdown-menu">
- <li><a href="{{ url_for('references_blueprint.references') }}">References</a></li>
- <li><a href="/tutorials">Webinars, Tutorials/Primers</a></li>
- <li><a href="{{ url_for('blogs_blueprint.blogs_list') }}">Blogs</a></li>
- <li><a href="{{ url_for('glossary_blueprint.glossary') }}">Glossary of Term</a></li>
- <li><a href="http://gn1.genenetwork.org/faq.html">FAQ</a></li>
- <li><a href="{{ url_for('policies_blueprint.policies') }}">Policies</a></li>
- <li><a href="{{ url_for('links_blueprint.links') }}">Links</a></li>
- <li><a href="{{ url_for('facilities_blueprint.facilities') }}">Facilities</a></li>
- <li><a href="{{ url_for('environments_blueprint.environments') }}">Environments</a></li>
- <li><a href="/news">GN1 News</a></li>
- </ul>
- </li>
- <li class="">
- <a href="/help" class="dropdow-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Tools <span class="caret"></a>
- <ul class="dropdown-menu">
- <li><a href="/snp_browser">Variant Browser</a></li>
- <li><a href="http://bnw.genenetwork.org/sourcecodes/home.php">Bayesian Network Webserver</a></li>
- <li><a href="https://systems-genetics.org/">Systems Genetics PheWAS</a></li>
- <li><a href="http://ucscbrowser.genenetwork.org/">Genome Browser</a></li>
- <li><a href="http://power.genenetwork.org">BXD Power Calculator</a></li>
- <li><a href="{{url_for('jupyter_notebooks.launcher')}}">Jupyter Notebooks</a></li>
- <li><a href="https://files.genenetwork.org/current/">Public Datasets</a></li>
- </ul>
- </li>
- {% if g.user_session %}
- <li class="">
- <a href="/collections/list">Collections
- <span class="badge badge-info">{{ g.user_session.num_collections }}</span>
- </a>
- </li>
- <li class="">
- <a href="/repositories" class="dropdow-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Source Code <span class="caret"></a>
- <ul class="dropdown-menu">
- <li><a href="https://github.com/genenetwork/genenetwork2">GN2 Source Code</a></li>
- <li><a href="https://github.com/genenetwork/genenetwork">GN1 Source Code</a></li>
- <li><a href="https://github.com/genenetwork/sysmaintenance">System Maintenance Code</a></li>
- <li><a href="https://github.com/genenetwork/genenetwork2/blob/testing/doc/API_readme.md">REST API Documentation</a></li>
- </ul>
- </li>
- {% if g.user_session.logged_in %}
- <li class="">
- <a href="/edit_account_settings" class="dropdow-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{% if g.user_session.user_email %}{{ g.user_session.user_email }}{% else %}User Account Settings{% endif %}<span class="caret"></a>
- <ul class="dropdown-menu">
- <li><a id="manage_user" title="User Options" href="/user/manage">User Options</a></li>
- <li><a id="manage_groups" title="Manage Groups" href="/group-management/groups">Manage Groups</a></li>
- </ul>
- </li>
- {% endif %}
- <li class="">
- {% if g.user_session.logged_in or session.get("user_details") %}
- <a id="login_out" title="Signed in as {{ g.user_session.user_name or session['user_details']['name']}}" href="/n/logout">Sign out</a>
- {% else %}
- <a id="login_in" href="/n/login">Sign in</a>
- {% endif %}
- </li>
+ <!-- Collect the nav links, forms, and other content for toggling -->
+ <div>
+ <ul class="nav navbar-nav">
+ <li class="" style="margin-right: 20px;">
+ <a href="/" style="font-weight: bold;">GeneNetwork</a>
+ </li>
+ <li class="">
+ <a href="/help" class="dropdow-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Intro <span class="caret"></a>
+ <ul class="dropdown-menu">
+ <li><a href="/intro">Intro</a></li>
+ <li><a href="/submit_trait">Submit Trait</a></li>
+ <li><a href="http://genenetwork.org/webqtl/main.py?FormID=batSubmit">Batch Submission</a></li>
+ </ul>
+ </li>
+ <li class="">
+ <a href="/help" class="dropdow-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Help <span class="caret"></a>
+ <ul class="dropdown-menu">
+ <li><a href="{{ url_for('references_blueprint.references') }}">References</a></li>
+ <li><a href="/tutorials">Webinars, Tutorials/Primers</a></li>
+ <li><a href="{{ url_for('blogs_blueprint.blogs_list') }}">Blogs</a></li>
+ <li><a href="{{ url_for('glossary_blueprint.glossary') }}">Glossary of Term</a></li>
+ <li><a href="http://gn1.genenetwork.org/faq.html">FAQ</a></li>
+ <li><a href="{{ url_for('policies_blueprint.policies') }}">Policies</a></li>
+ <li><a href="{{ url_for('links_blueprint.links') }}">Links</a></li>
+ <li><a href="{{ url_for('facilities_blueprint.facilities') }}">Facilities</a></li>
+ <li><a href="{{ url_for('environments_blueprint.environments') }}">Environments</a></li>
+ <li><a href="/news">GN1 News</a></li>
+ </ul>
+ </li>
+ <li class="">
+ <a href="/help" class="dropdow-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Tools <span class="caret"></a>
+ <ul class="dropdown-menu">
+ <li><a href="/snp_browser">Variant Browser</a></li>
+ <li><a href="http://bnw.genenetwork.org/sourcecodes/home.php">Bayesian Network Webserver</a></li>
+ <li><a href="https://systems-genetics.org/">Systems Genetics PheWAS</a></li>
+ <li><a href="http://ucscbrowser.genenetwork.org/">Genome Browser</a></li>
+ <li><a href="http://power.genenetwork.org">BXD Power Calculator</a></li>
+ <li><a href="{{url_for('jupyter_notebooks.launcher')}}">Jupyter Notebooks</a></li>
+ <li><a href="https://files.genenetwork.org/current/">Public Datasets</a></li>
+ </ul>
+ </li>
+ {% if g.user_session %}
+ <li class="">
+ <a href="/collections/list">Collections
+ <span class="badge badge-info">{{ g.user_session.num_collections }}</span>
+ </a>
+ </li>
+ <li class="">
+ <a href="/repositories" class="dropdow-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Source Code <span class="caret"></a>
+ <ul class="dropdown-menu">
+ <li><a href="https://github.com/genenetwork/genenetwork2">GN2 Source Code</a></li>
+ <li><a href="https://github.com/genenetwork/genenetwork">GN1 Source Code</a></li>
+ <li><a href="https://github.com/genenetwork/sysmaintenance">System Maintenance Code</a></li>
+ <li><a href="https://github.com/genenetwork/genenetwork2/blob/testing/doc/API_readme.md">REST API Documentation</a></li>
+ </ul>
+ </li>
+ {% if g.user_session.logged_in %}
+ <li class="">
+ <a href="/edit_account_settings" class="dropdow-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{% if g.user_session.user_email %}{{ g.user_session.user_email }}{% else %}User Account Settings{% endif %}<span class="caret"></a>
+ <ul class="dropdown-menu">
+ <li><a id="manage_user" title="User Options" href="/user/manage">User Options</a></li>
+ <li><a id="manage_groups" title="Manage Groups" href="/group-management/groups">Manage Groups</a></li>
+ </ul>
+ </li>
+ {% endif %}
+ <li class="">
+ {% if g.user_session.logged_in or session.get("user_details") %}
+ <a id="login_out" title="Signed in as {{ g.user_session.user_name or session['user_details']['name']}}" href="/n/logout">Sign out</a>
+ {% else %}
+ <a id="login_in" href="/n/login">Sign in</a>
{% endif %}
- <!--
+ </li>
+ {% endif %}
+ <!--
<li style="margin-left: 20px;">
<a href="http://gn2-staging.genenetwork.org" style="font-weight: bold;" >Use Staging Branch</a>
</li>
-->
- </ul>
- </div>
+ </ul>
</div>
+ </div>
</div>
-
- <div class="container-fluid" style="width: 100%; min-width: 650px; position: relative; background-color: #d5d5d5; height: 84px;">
-
- <form method="get" action="/gsearch" id="minisearchform">
- <div class="row" style="width: 100%; position: absolute; bottom: 0; top: 30px;">
-
- <!--
- <button id="btsearch" class="btn btn-primary" style="margin-left: 20px;"><span class="glyphicon glyphicon-search"></span> Search All</button>
-
- use enter key to submit fomr -->
- <select style="width: 160px; margin-top: 15px; margin-left: 10px;" name="type">
- <option value="gene">Genes / Molecules</option>
- <option value="phenotype" {% if type=="phenotype" %}selected{% endif %}>Phenotypes</option>
- </select>
-
- <input id="term" class="form-rounded" style="width: 40vw; margin-top: 15px; margin-left: 10px;" type="text" name="terms" required placeholder="enter you search term here">
+ <div class="container-fluid" style="width: 100%; min-width: 650px; position: relative;background-color: #d5d5d5; height: 100px;">
+ <form method="get" action="/gsearch" id="globalsearchform">
+ <div class="form-group">
+ <div class="col-xs-10 controls">
+ <select name="type">
+ <option value="gene">Genes / Molecules</option>
+ <option value="phenotype" {% if type=="phenotype" %}selected{% endif %}>Phenotypes</option>
+ </select>
+ <div class="col-8 autocomplete" style="margin-left: 30px;margin-right: 10px;">
+ <input autocomplete="off" class="global_search_input" id="term" style="width:45vw;" type="text" required placeholder="enter you search term here" name="terms">
+ </div>
+ <span><a style="text-decoration: none;color: darkblue;" target="_blank" href="https://issues.genenetwork.org/topics/xapian-search-queries"><strong>click for more search hints</strong></a></span>
+ </div>
</div>
</form>
</div>
-
{% block content %}
{% endblock %}
-
<footer class="footer">
- <div class="row" style="margin: 10px; width: 100%; min-width: 1200px;">
- <div class="col-xs-6">
- <p>Web services initiated January, 1994 as
- <a href="http://www.ncbi.nlm.nih.gov/pubmed?term=8043953">
- The Portable Dictionary of the Mouse Genome
- </a>; June 15, 2001 as <a href="https://www.ncbi.nlm.nih.gov/pubmed/15043217">WebQTL</a>; and Jan 5, 2005 as GeneNetwork.
- </p>
- <p>
- This site is currently operated by
- <a href="mailto:rwilliams@uthsc.edu">Rob Williams</a>,
- <a href="https://thebird.nl/">Pjotr Prins</a>,
- <a href="http://www.senresearch.org">Saunak Sen</a>,
- <a href="mailto:zachary.a.sloan@gmail.com">Zachary Sloan</a>,
- <a href="mailto:acenteno@uthsc.edu">Arthur Centeno</a>,
- and <a href="mailto:bonfacemunyoki@gmail.com">Bonface Munyoki</a>.
- </p>
- <p>Design and code by Pjotr Prins, Shelby Solomon, Zach Sloan, Arthur Centeno, Christan Fischer, Bonface Munyoki, Danny Arends, Arun Isaac, Alex Mwangi, Fred Muriithi, Sam Ockman, Lei Yan, Xiaodong Zhou, Christian Fernandez,
- Ning Liu, Rudi Alberts, Elissa Chesler, Sujoy Roy, Evan G. Williams, Alexander G. Williams, Kenneth Manly, Jintao Wang, Robert W. Williams, and
- <!--<a href="http://genenetwork.org/credit.html">colleagues</a>.</p>-->
- <a href="/credits">colleagues</a>.</p>
- <br />
- <p>GeneNetwork support from:</p>
- <ul>
- <li>
- <a href="http://citg.uthsc.edu">
- The UT Center for Integrative and Translational Genomics
- </a>
- </li>
- <li>
- <a href="https://www.nigms.nih.gov/">NIGMS</a>
- Systems Genetics and Precision Medicine Project (R01 GM123489, 2017-2026)
- </li>
- <li>
- <a href="https://www.nsf.gov/awardsearch/showAward?AWD_ID=2118709">NSF</a>
- Panorama: Integrated Rack-Scale Acceleration for Computational Pangenomics
- (PPoSS 2118709, 2021-2016)
- </li>
- <li>
- <a href="https://www.drugabuse.gov/">NIDA</a>
- NIDA Core Center of Excellence in Transcriptomics, Systems Genetics, and the Addictome (P30 DA044223, 2017-2022)
- </li>
- <li>
- <a href="http://www.nia.nih.gov/">NIA</a>
- Translational Systems Genetics of Mitochondria, Metabolism, and Aging (R01AG043930, 2013-2018)
- </li>
- <li>
- <a href="https://www.ohsu.edu/iniastress-consortium">NIAAA</a>
- Integrative Neuroscience Initiative on Alcoholism (U01 AA016662, U01 AA013499, U24 AA013513, U01 AA014425, 2006-2017)
- </li>
- <li>
- <a href="http://www.drugabuse.gov/">NIDA</a>, <a href="http://www.nimh.nih.gov/">NIMH</a>, and <a href="http://www.niaaa.nih.gov/">NIAAA</a>
- (P20-DA 21131, 2001-2012)
- </li>
- <li>
- NCI <a href="http://emice.nci.nih.gov/">MMHCC</a> (U01CA105417), NCRR, <span class="broken_link test" href="http://www.birncommunity.org/">BIRN</span>, (U24 RR021760)
- </li>
- </UL>
- <!--</p>-->
- <p>Published in
+ <div class="row" style="margin: 10px; width: 100%; min-width: 1200px;">
+ <div class="col-xs-6">
+ <p>Web services initiated January, 1994 as
+ <a href="http://www.ncbi.nlm.nih.gov/pubmed?term=8043953">
+ The Portable Dictionary of the Mouse Genome
+ </a>; June 15, 2001 as <a href="https://www.ncbi.nlm.nih.gov/pubmed/15043217">WebQTL</a>; and Jan 5, 2005 as GeneNetwork.
+ </p>
+ <p>
+ This site is currently operated by
+ <a href="mailto:rwilliams@uthsc.edu">Rob Williams</a>,
+ <a href="https://thebird.nl/">Pjotr Prins</a>,
+ <a href="http://www.senresearch.org">Saunak Sen</a>,
+ <a href="mailto:zachary.a.sloan@gmail.com">Zachary Sloan</a>,
+ <a href="mailto:acenteno@uthsc.edu">Arthur Centeno</a>,
+ and <a href="mailto:bonfacemunyoki@gmail.com">Bonface Munyoki</a>.
+ </p>
+ <p>Design and code by Pjotr Prins, Shelby Solomon, Zach Sloan, Arthur Centeno, Christan Fischer, Bonface Munyoki, Danny Arends, Arun Isaac, Alex Mwangi, Fred Muriithi, Sam Ockman, Lei Yan, Xiaodong Zhou, Christian Fernandez,
+ Ning Liu, Rudi Alberts, Elissa Chesler, Sujoy Roy, Evan G. Williams, Alexander G. Williams, Kenneth Manly, Jintao Wang, Robert W. Williams, and
+ <!--<a href="http://genenetwork.org/credit.html">colleagues</a>.</p>-->
+ <a href="/credits">colleagues</a>.</p>
+ <br />
+ <p>GeneNetwork support from:</p>
+ <ul>
+ <li>
+ <a href="http://citg.uthsc.edu">
+ The UT Center for Integrative and Translational Genomics
+ </a>
+ </li>
+ <li>
+ <a href="https://www.nigms.nih.gov/">NIGMS</a>
+ Systems Genetics and Precision Medicine Project (R01 GM123489, 2017-2026)
+ </li>
+ <li>
+ <a href="https://www.nsf.gov/awardsearch/showAward?AWD_ID=2118709">NSF</a>
+ Panorama: Integrated Rack-Scale Acceleration for Computational Pangenomics
+ (PPoSS 2118709, 2021-2016)
+ </li>
+ <li>
+ <a href="https://www.drugabuse.gov/">NIDA</a>
+ NIDA Core Center of Excellence in Transcriptomics, Systems Genetics, and the Addictome (P30 DA044223, 2017-2022)
+ </li>
+ <li>
+ <a href="http://www.nia.nih.gov/">NIA</a>
+ Translational Systems Genetics of Mitochondria, Metabolism, and Aging (R01AG043930, 2013-2018)
+ </li>
+ <li>
+ <a href="https://www.ohsu.edu/iniastress-consortium">NIAAA</a>
+ Integrative Neuroscience Initiative on Alcoholism (U01 AA016662, U01 AA013499, U24 AA013513, U01 AA014425, 2006-2017)
+ </li>
+ <li>
+ <a href="http://www.drugabuse.gov/">NIDA</a>, <a href="http://www.nimh.nih.gov/">NIMH</a>, and <a href="http://www.niaaa.nih.gov/">NIAAA</a>
+ (P20-DA 21131, 2001-2012)
+ </li>
+ <li>
+ NCI <a href="http://emice.nci.nih.gov/">MMHCC</a> (U01CA105417), NCRR, <span class="broken_link test" href="http://www.birncommunity.org/">BIRN</span>, (U24 RR021760)
+ </li>
+ </UL>
+ <!--</p>-->
+ <p>Published in
<a href="http://joss.theoj.org/papers/10.21105/joss.00025"><img src="https://camo.githubusercontent.com/846b750f582ae8f1d0b4f7e8fee78bed705c88ba/687474703a2f2f6a6f73732e7468656f6a2e6f72672f7061706572732f31302e32313130352f6a6f73732e30303032352f7374617475732e737667" alt="JOSS" data-canonical-src="http://joss.theoj.org/papers/10.21105/joss.00025/status.svg" style="max-width:100%;"></a>
- </p>
- <p>
- Development and source code on <a href="https://github.com/genenetwork/">github</a> with <a href="https://issues.genenetwork.org/">issue tracker</a> and <a href="https://github.com/genenetwork/genenetwork2/blob/master/README.md">documentation</a>.
- {% if version: %}
- <p><small>GeneNetwork {{ version }}</small></p>
- {% endif %}
- <p> It took the server {{ g.request_time() }} seconds to process this page.</p>
-
- </div>
- <div class="col-xs-2">
- <a href="http://www.python.org/" target="_blank">
- <img src="/static/new/images/PythonLogo.png" alt="Python Powered" border="0">
- </a>
- <a href="http://www.neuinfo.org" target="_blank">
- <img src="/static/new/images/Nif.png" alt="Registered with Nif" border="0">
- </a>
+ </p>
+ <p>
+ Development and source code on <a href="https://github.com/genenetwork/">github</a> with <a href="https://issues.genenetwork.org/">issue tracker</a> and <a href="https://github.com/genenetwork/genenetwork2/blob/master/README.md">documentation</a>.
+ {% if version: %}
+ <p><small>GeneNetwork {{ version }}</small></p>
+ {% endif %}
+ <p> It took the server {{ g.request_time() }} seconds to process this page.</p>
+ </div>
+ <div class="col-xs-2">
+ <a href="http://www.python.org/" target="_blank">
+ <img src="/static/new/images/PythonLogo.png" alt="Python Powered" border="0">
+ </a>
+ <a href="http://www.neuinfo.org" target="_blank">
+ <img src="/static/new/images/Nif.png" alt="Registered with Nif" border="0">
+ </a>
+ </div>
</div>
- </div>
</footer>
-
<!--http://stackoverflow.com/questions/14045515/how-can-i-reuse-one-bootstrap-modal-div-->
<!-- Modal -->
<div id="utility" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
- <!--<div class="modal-header">-->
- <!-- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>-->
- <!-- <h3 id="myModalLabel">Register</h3>-->
- <!--</div>-->
- <div class="modal-body">
- <p>.</p>
- </div>
- <!--<div class="modal-footer">-->
- <!-- <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>-->
- <!-- <button class="btn btn-primary">Save changes</button>-->
- <!--</div>-->
+ <!--<div class="modal-header">-->
+ <!-- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>-->
+ <!-- <h3 id="myModalLabel">Register</h3>-->
+ <!--</div>-->
+ <div class="modal-body">
+ <p>.</p>
+ </div>
+ <!--<div class="modal-footer">-->
+ <!-- <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>-->
+ <!-- <button class="btn btn-primary">Save changes</button>-->
+ <!--</div>-->
</div>
-
-
<script src="{{ url_for('js', filename='jquery/jquery.min.js') }}" type="text/javascript"></script>
<script src="{{ url_for('js', filename='bootstrap/js/bootstrap.min.js') }}" type="text/javascript"></script>
+ <script src="/static/new/javascript/search_autocomplete.js"></script>
<script>
- //http://stackoverflow.com/questions/11521763/bootstrap-scrollspy-not-working
- var $window = $(window)
- $('.bs-docs-sidenav').affix({
- offset: {
- top: function () { return $window.width() <= 980 ? 290 : 210 }
- , bottom: 270
- }
- })
+ //http://stackoverflow.com/questions/11521763/bootstrap-scrollspy-not-working
+ var $window = $(window)
+ $('.bs-docs-sidenav').affix({
+ offset: {
+ top: function() { return $window.width() <= 980 ? 290 : 210 },
+ bottom: 270
+ }
+ })
</script>
-
-
<script type="text/javascript">
-
-
-
-
-$(document).ready(function() {
-
+ $(document).ready(function() {
const urlParams = new URLSearchParams(window.location.search)
+ let term = urlParams.get("terms")
- let term = "cytochrome NOT P450"
-
- if (urlParams.get("search_terms_or")){
- term = urlParams.get("search_terms_or")
- }
-
- else if (urlParams.get("terms")){
- term = urlParams.get("terms")
- }
-
+ term = term?term: "cytochrome AND P450"
$("#term").val(term);
- $("#term").keyup(function(event) {
- if (event.keyCode === 13) {
- if ($("#term").val().trim()!="") {
- $( "#minisearchform")[0].submit();
- }
-
- }
- });
-
-
-});
-
+ //should web scrap
+ var global_search_hint = [
+ "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("term"), global_search_hint);
+ $("#term").keyup(function(event) {
+ if (event.keyCode === 13) {
+ event.preventDefault();
+ $('#searchform').attr('action', "/gsearch").submit();
+ if ($("#term").val().trim() != "") {
+ saveBeforeSubmit($("#term").val().trim())
+ $("#globalsearchform")[0].submit();
+ }
+
+ }
+ })
+
+ });
</script>
-
<script src="{{ url_for('js', filename='jquery-cookie/jquery.cookie.js') }}" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<!-- <script src="{{ url_for('js', filename='jquery-ui/jquery-ui.min.js') }}" type="text/javascript"></script> -->
-
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='colorbox/jquery.colorbox-min.js') }}"></script>
-
<script language="javascript" type="text/javascript" src="{{ url_for('js', filename='js_alt/parsley.min.js') }}"></script>
-
-
{% block js %}
{% endblock %}
-
<script type="text/javascript">
- document.addEventListener('DOMContentLoaded', function() {
- let timeToLoad = document.createElement("p");
- timeToLoad.innerHTML = "It took your browser " + ((Date.now() - pageLoadStart)/1000) + " second(s) to render this page";
- document.querySelector("footer .row .col-xs-6").appendChild(timeToLoad);
- });
+ document.addEventListener('DOMContentLoaded', function() {
+ let timeToLoad = document.createElement("p");
+ timeToLoad.innerHTML = "It took your browser " + ((Date.now() - pageLoadStart) / 1000) + " second(s) to render this page";
+ document.querySelector("footer .row .col-xs-6").appendChild(timeToLoad);
+ });
</script>
</body>
-</html>
+
+</html> \ No newline at end of file
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>