Ticket #15935: patch_hide_admin_filter.diff

File patch_hide_admin_filter.diff, 1.4 KB (added by jjconti, 13 years ago)

issue patch

  • django/contrib/admin/templates/admin/change_list.html

     
    2727(function($) {
    2828    $(document).ready(function($) {
    2929        $("tr input.action-select").actions();
     30
     31        $('#display-filter').click(function(event) {
     32            $('#changelist').addClass('filtered');
     33            $('#changelist-filter').show('slow');
     34            $('#display-filter').hide('slow');
     35        });
     36        $('#change-title').click(function(event) {
     37            $('#changelist').removeClass('filtered');
     38            $('#changelist-filter').hide('slow');
     39            $('#display-filter').show('slow');
     40        });
     41
    3042    });
    3143})(django.jQuery);
    3244</script>
     
    8092
    8193      {% block filters %}
    8294        {% if cl.has_filters %}
     95        <h2 id="display-filter" style="display:none">
     96            {% trans 'Filter' %}:
     97            {% for spec in cl.filter_specs %} {{ spec.title }}{{ spec.choices }}{% endfor %}
     98        </h2>
    8399          <div id="changelist-filter">
    84             <h2>{% trans 'Filter' %}</h2>
     100            <h2 id="change-title">{% trans 'Filter' %}</h2>
    85101            {% for spec in cl.filter_specs %}{% admin_list_filter cl spec %}{% endfor %}
    86102          </div>
    87103        {% endif %}
Back to Top