diff options
author | Alexander_Kabui | 2023-03-09 01:47:02 +0300 |
---|---|---|
committer | Alexander_Kabui | 2023-03-09 01:47:02 +0300 |
commit | 3a29c373f9bd5b4cadb3445b836404613fc788c5 (patch) | |
tree | 22d46449e1d601d8ffa262d726c5101e67c3a5a5 | |
parent | 6e387396b455ed176b3a1ecfd7f079204081f74f (diff) | |
download | genenetwork2-3a29c373f9bd5b4cadb3445b836404613fc788c5.tar.gz |
fix miniform search id
-rw-r--r-- | wqflask/wqflask/templates/base.html | 10 |
1 files changed, 7 insertions, 3 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(); + } + } }); |