Added list filter sticky option (only for django >= 3.1.2).

This commit is contained in:
Fabio Caccamo
2020-10-15 10:49:26 +02:00
parent 071fe476a6
commit d61ef86dd6
4 changed files with 43 additions and 1 deletions
@@ -282,6 +282,21 @@
color:{{ theme.css_generic_link_hover_color }};
}
/* list-filter sticky */
{% if theme.list_filter_sticky %}
@media (min-width: 768px) {
.admin-interface .module.filtered #changelist-filter {
position: sticky;
top: 40px;
}
/* feature not available for django < 3.1.2 */
.admin-interface .module.filtered #toolbar + #changelist-filter {
position: absolute;
top: 0px;
}
}
{% endif %}
.admin-interface .module.filtered #changelist-filter {
{% if theme.css_module_rounded_corners %}
border-bottom-left-radius: 4px;