Ticket #15935: patch_hide_admin_filter.diff
File patch_hide_admin_filter.diff, 1.4 KB (added by , 14 years ago) |
---|
-
django/contrib/admin/templates/admin/change_list.html
27 27 (function($) { 28 28 $(document).ready(function($) { 29 29 $("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 30 42 }); 31 43 })(django.jQuery); 32 44 </script> … … 80 92 81 93 {% block filters %} 82 94 {% 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> 83 99 <div id="changelist-filter"> 84 <h2 >{% trans 'Filter' %}</h2>100 <h2 id="change-title">{% trans 'Filter' %}</h2> 85 101 {% for spec in cl.filter_specs %}{% admin_list_filter cl spec %}{% endfor %} 86 102 </div> 87 103 {% endif %}