diff options
author | Alexander Kabui | 2023-03-09 01:51:22 +0300 |
---|---|---|
committer | GitHub | 2023-03-09 01:51:22 +0300 |
commit | bc0db302025353cdb01a424a99a04ebacd4a4392 (patch) | |
tree | 22d46449e1d601d8ffa262d726c5101e67c3a5a5 /wqflask | |
parent | 638ee60bc2930ebe3b73814dab6aa3b124211345 (diff) | |
parent | 3a29c373f9bd5b4cadb3445b836404613fc788c5 (diff) | |
download | genenetwork2-bc0db302025353cdb01a424a99a04ebacd4a4392.tar.gz |
Merge pull request #771 from genenetwork/chores/ui-enhancements
Chores/UI enhancements
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/templates/base.html | 10 | ||||
-rwxr-xr-x | wqflask/wqflask/templates/index_page.html | 10 |
2 files changed, 15 insertions, 5 deletions
diff --git a/wqflask/wqflask/templates/base.html b/wqflask/wqflask/templates/base.html index 4b1237f5..116d9b7c 100644 --- a/wqflask/wqflask/templates/base.html +++ b/wqflask/wqflask/templates/base.html @@ -139,7 +139,7 @@ <div class="container-fluid" style="width: 100%; min-width: 650px; position: relative; background-color: #d5d5d5; height: 84px;"> - <form method="get" action="/gsearch" id="searchform"> + <form method="get" action="/gsearch" id="minisearchform"> <div class="row" style="width: 100%; position: absolute; bottom: 0; top: 30px;"> <!-- @@ -275,6 +275,7 @@ + $(document).ready(function() { @@ -291,10 +292,13 @@ $(document).ready(function() { } $("#term").val(term); + $("#term").keyup(function(event) { if (event.keyCode === 13) { - event.preventDefault(); - $('#searchform').attr('action', "/gsearch").submit(); + if ($("#term").val().trim()!="") { + $( "#minisearchform")[0].submit(); + } + } }); diff --git a/wqflask/wqflask/templates/index_page.html b/wqflask/wqflask/templates/index_page.html index 0e120d69..e6ef667a 100755 --- a/wqflask/wqflask/templates/index_page.html +++ b/wqflask/wqflask/templates/index_page.html @@ -117,7 +117,7 @@ <label for="or_search" class="col-xs-1 control-label" style="padding-left: 0px; padding-right: 0px; width: 65px !important;">Get Any:</label> <div class="col-xs-10 controls" style="padding-left: 20px;"> <div class="col-8 autocomplete"> - <textarea id="myInput" onkeydown="pressed(event)" name="search_terms_or" rows="1" class="form-control search-query" style="resize: vertical; max-width: 550px; width: 450px !important;" id="or_search"></textarea> + <textarea id="myInput" onkeyup="pressed(event)" name="search_terms_or" rows="1" class="form-control search-query" style="resize: vertical; max-width: 550px; width: 450px !important;" id="or_search"></textarea> </div> </div> </div> @@ -130,6 +130,9 @@ Enter terms, genes, ID numbers in the <b>Search</b> field.<br> Use <b>*</b> or <b>?</b> wildcards (Cyp*a?, synap*).<br> Use <b>quotes</b> for terms such as <i>"tyrosine kinase"</i>. + + + <div><strong><a style="text-decoration: none;" href="https://issues.genenetwork.org/topics/xapian-search-queries" target=”_blank” >see more hints</a></strong></div> </div> </div> </div> @@ -326,8 +329,11 @@ $(document).on('submit', '#searchform', function(event){ if( event.target.value.trim() != "" ) { saveBeforeSubmit(event.target.value.trim()) - document.forms[1].submit(); + //document.forms[1].submit(); + $( "#searchform" )[0].submit(); + } + } } |