aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2015-10-20 14:38:42 -0500
committerzsloan2015-10-20 14:38:42 -0500
commit4ce6d8c6203e62102dd1694f123cf70dc780edab (patch)
tree5062f4384ceba550c49d427d5b428dd91f41190f
parent0310301b30c59eca45235cd1bd1ff8e15923950a (diff)
parent25d91ca2264a1ef0a7a41c0e71c0a1138e764065 (diff)
downloadgenenetwork2-4ce6d8c6203e62102dd1694f123cf70dc780edab.tar.gz
Merge pull request #121 from sn3twork/master
Fixes bug #98. Enhancement
-rwxr-xr-xwqflask/wqflask/templates/index_page.html9
1 files changed, 6 insertions, 3 deletions
diff --git a/wqflask/wqflask/templates/index_page.html b/wqflask/wqflask/templates/index_page.html
index 6c630344..8b66a5b0 100755
--- a/wqflask/wqflask/templates/index_page.html
+++ b/wqflask/wqflask/templates/index_page.html
@@ -270,10 +270,13 @@
function pressed(e) {
// Has the enter key been pressed?
if ( (window.event ? event.keyCode : e.which) == 13) {
- // If it has been so, manually submit the <form>
- document.forms[1].submit();
+ // If enter key has been pressed and the search fields are non-empty
+ // manually submit the <form>
+ if( event.target.value != "" ) {
+ document.forms[1].submit();
+ }
}
}
</script>
-{% endblock %} \ No newline at end of file
+{% endblock %}