mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-26 03:14:19 +00:00
Add search functionality to public corpora page
This commit is contained in:
parent
f056a15ba8
commit
65c907a990
@ -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 @@
|
|||||||
{% 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 %}
|
||||||
|
Loading…
Reference in New Issue
Block a user