Moving forward.
[wolnelektury.git] / src / wolnelektury / templates / admin / long_filter.html
1 {% load i18n %}
2 <h3>{% blocktranslate with filter_title=title %} By {{ filter_title }} {% endblocktranslate %}</h3>
3 <script>
4  function longFilter(f) {
5      $ = django.jQuery;
6      let v = f.value;
7      ul = $(f).next();
8      $('li', ul).each(function(i, e) {
9          $(this).css('display', ($(e).text().search(v) != -1) ? 'block' : 'none');
10      });
11  }
12 </script>
13 <input style="margin: 0 15px" onkeyup="longFilter(this)">
14 <ul class="longfilter" style="word-wrap: anywhere; max-height:400px; overflow:hidden;">
15   {% for choice in choices %}
16     <li{% if choice.selected %} class="selected"{% endif %}>
17       <a href="{{ choice.query_string|iriencode }}" title="{{ choice.display }}">{{ choice.display }}</a></li>
18   {% endfor %}
19 </ul>