{% extends "base.html" %} {% block scripts %} {{ passing_scripts|safe }} {% endblock %} {% block scriptsready %} {{ passing_scriptsready|safe }} $.fn.datepicker.defaults.format = 'dd/mm/yyyy'; $('.input-daterange input').each(function() { $(this).datepicker(); }); {% for field in fields %} {% if field.1 == "text" %} $('#{{ field.0 }}').keyup(function(e) { {% if allow_prompt_ajax_search %} get_object_list(); {% else %} if (e.keyCode == 13) { get_object_list(); }; {% endif %} }); {% endif %} {% if field.1 == "number" %} $('#{{ field.0 }}_gt, #{{ field.0 }}_lt').keyup(function(e) { {% if allow_prompt_ajax_search %} get_object_list(); {% else %} if (e.keyCode == 13) { get_object_list(); }; {% endif %} }); {% endif %} {% endfor %} $('#submit_ajax_query').click(function() { get_object_list(); }); {% endblock %} {% block content %}