<commit_before>{% extends "base.html" %}
{% load i18n %}
{% load staticfiles %}

<!--
        Title
-->
{% block title %}{% trans "Exercises" %}{% endblock %}



{% block header %}
<script>
$( document ).on( "pageinit", "#myPage", function() {
$( "#exercise_search_form" ).on( "listviewbeforefilter", function ( e, data ) {
    var $ul = $( this ),
        $input = $( data.input ),
        value = $input.val(),
        html = "";
    $ul.html( "" );
    if ( value && value.length > 2 ) {
        $ul.html( "<li><div class='ui-loader'><span class='ui-icon ui-icon-loading'></span></div></li>" );
        $ul.listview( "refresh" );
        $.ajax({
            url: "{% url 'wger.exercises.views.exercises.search' %}",
            dataType: "json",
            data: {
                q: $input.val()
            }
        })
        .then( function ( response ) {
            $.each( response, function ( i, val ) {
                html += '<li><a href="/exercise/' + val.id + '/view/">' + val.name + '</a></li>';
            });
            $ul.html( html );
            $ul.listview( "refresh" );
            $ul.trigger( "updatelayout");
            });
        }
    });
});
</script>
{% endblock %}


<!--
        Main Content
-->
{% block content %}


<div data-role="collapsible-set" data-theme="c" data-content-theme="c"><commit_msg>Remove JS for exercise search, this is done with a filtered listview<commit_after>{% extends "base.html" %}
{% load i18n %}
{% load staticfiles %}

<!--
        Title
-->
{% block title %}{% trans "Exercises" %}{% endblock %}


<!--
        Main Content
-->
{% block content %}

<div data-role="collapsible-set" data-theme="c" data-content-theme="c">
{'fraction_non_alphanumeric': 0.2132309509746013, 'fraction_numerical': 0.0029533372711163615, 'mean_word_length': 2.1025641025641026, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6123280', 'n_tokens_mistral': 571, 'n_tokens_neox': 535, 'n_words': 118}