diff options
Diffstat (limited to 'gn2/wqflask/templates/gnqa.html')
-rw-r--r-- | gn2/wqflask/templates/gnqa.html | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/gn2/wqflask/templates/gnqa.html b/gn2/wqflask/templates/gnqa.html index bed2627d..46cc1e90 100644 --- a/gn2/wqflask/templates/gnqa.html +++ b/gn2/wqflask/templates/gnqa.html @@ -25,15 +25,30 @@ align-items: center; } + #loader { + display: none; + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + width: 100%; + background: rgba(0,0,0,0.75) url("/static/gif/loader.gif") no-repeat center center; + z-index: 10000; +} + + </style> <div style="height: 100vh;width: 100vw; "> + +<div id="loader"></div> <div id="main-search-controller" style="margin: 20px;width: 100%;height: 100%;"> <div id="gnqna_controller"> <form method="POST" action="/gnqna" id="gnqna_form"> <input id="gnqna_search" style="width:45vw" type="text" autocomplete="off" -required placeholder="Ask a Question or Topic ( Genes) " value='' name="querygnqa"> +required placeholder="Ask a Question or Topic e.g ( Genes) " value='' name="querygnqa"> </form> </div> @@ -51,10 +66,11 @@ required placeholder="Ask a Question or Topic ( Genes) " value='' name="querygnq <script type="text/javascript"> document.addEventListener('DOMContentLoaded', function() { - - $("#gnqna_search").keyup(function(event) { + $("#gnqna_search").keypress(function(event) { if (event.keyCode === 13) { - $('#gnqna_form').attr('action', "/gnqna").submit(); + $('#gnqna_form').submit(); + let spinner = $("#loader") + spinner.show() } }) |