Skip to content
Snippets Groups Projects
Commit 65c907a9 authored by Patrick Jentsch's avatar Patrick Jentsch
Browse files

Add search functionality to public corpora page

parent f056a15b
No related branches found
No related tags found
No related merge requests found
...@@ -9,12 +9,10 @@ ...@@ -9,12 +9,10 @@
<h1 id="title"><i class="nopaque-icons" style="font-size: inherit;">I</i>Corpora</h1> <h1 id="title"><i class="nopaque-icons" style="font-size: inherit;">I</i>Corpora</h1>
</div> </div>
<div class="white" style="padding: 0 15px; border-radius: 20px;"> <div class="white" style="padding: 0 15px; border-radius: 20px;">
<form> <div class="input-field">
<div class="input-field"> <i class="material-icons prefix">search</i>
<i class="material-icons prefix">search</i> <input id="public-corpora-search" placeholder="Find public corpora" type="text">
<input id="search" placeholder="Find public corpora" type="text"> </div>
</div>
</form>
</div> </div>
</div> </div>
</div> </div>
...@@ -38,7 +36,9 @@ ...@@ -38,7 +36,9 @@
{% block scripts %} {% block scripts %}
{{ super() }} {{ super() }}
<script> <script>
let publicCorporaSearchElement = document.querySelector('#public-corpora-search');
let corpusList = CorpusList.getInstance(document.querySelector('#corpora .corpus-list .list')); let corpusList = CorpusList.getInstance(document.querySelector('#corpora .corpus-list .list'));
publicCorporaSearchElement.addEventListener('keyup', function() {corpusList.listjs.search(this.value);});
corpusList._init({{ corpora|tojson }}); corpusList._init({{ corpora|tojson }});
</script> </script>
{% endblock scripts %} {% endblock scripts %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment