Commit 34be5fa5 authored by felix.herrmann's avatar felix.herrmann
Browse files

fix(search): re-add search on enter key pressed event to top search field

parent 77a1a42c
......@@ -302,7 +302,7 @@ var input = document.getElementById("myInput");
* trigger a search, when a search phrase has been typed in and
"enter" has been pressed
*/
$(document).on('keyup','.search-data',function() {
$(document).on('keyup','.search-ui',function() {
// Number 13 is the "Enter" key on the keyboard
if (event.keyCode === 13) {
// Cancel the default action, if needed
......
......@@ -11,7 +11,7 @@
<h2>{% trans "Data Sets" %}</h2>
{# big search field #}
<div class="input-group mb-3 search-field-main">
<input class="form-control search-field-main search-middle search-data"{% if query %}value="{{ query }}"{% else %}placeholder="Search"{% endif %} name="q" aria-label="Search">
<input class="form-control search-field-main search-middle search-data search-ui"{% if query %}value="{{ query }}"{% else %}placeholder="Search"{% endif %} name="q" aria-label="Search">
<div class="input-group-append">
<button class="input-group-text search-button" type="button" ic-include=".search-data" ic-get-from="{% url 'dddatasets:search' %}" ic-target="#content" ic-push-url="true" ic-push-params="q,countries,categories"><span class="i-search-md"></span></button>
</div>
......
......@@ -25,7 +25,7 @@
<h2>{% trans "People on Discuss Data" %}</h2>
{# big search field #}
<div class="input-group mb-3 search-field-main">
<input class="form-control search-field-main search-middle search-data"{% if query %}value="{{ query }}"{% else %}placeholder="Search"{% endif %} name="q" aria-label="Search">
<input class="form-control search-field-main search-middle search-data search-ui"{% if query %}value="{{ query }}"{% else %}placeholder="Search"{% endif %} name="q" aria-label="Search">
<div class="input-group-append">
<button class="input-group-text search-button" type="button" ic-include=".search-data" ic-get-from="{% url 'ddusers:search' %}" ic-target="#content" ic-push-url="true" ic-push-params="q,countries,categories"><span class="i-search-md"></span></button>
</div>
......
......@@ -9,7 +9,7 @@
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<div class="input-group w-25 mx-auto">
<input class="form-control search-top" type="text" {% if query %}value="{{ query }}" {% else %}placeholder="Search"{% endif %} name="q" aria-label="Search">
<input class="form-control search-top search-ui" type="text" {% if query %}value="{{ query }}" {% else %}placeholder="Search"{% endif %} name="q" aria-label="Search">
<div class="input-group-append">
<button class="input-group-text search-button" type="button" ic-include=".search-data" ic-push-url="true" ic-push-params="q,countries,categories" ic-get-from="{% url 'ddusers:search' %}" ic-target="#content"><span class="i-search-md"></span></button>
</div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment