Add sticky-pagination styles. Fix trailing whitespace issue in models.

pull/110/head
Amir Ajorloo 2021-02-03 08:34:49 +03:30
parent 6edd4bb7af
commit 5a22b0b4aa
3 changed files with 11 additions and 7 deletions

View File

@ -302,7 +302,6 @@ class Theme(models.Model):
form_submit_sticky = models.BooleanField(
default=False,
verbose_name=_('sticky submit'))
form_pagination_sticky = models.BooleanField(
default=False,
verbose_name=_('sticky pagination'))

View File

@ -53,7 +53,7 @@ https://github.com/fabiocaccamo/django-admin-interface
{% endblock %}
{% block bodyclass %}admin-interface flat-theme {% get_admin_interface_theme as theme %}{% if theme.name %}{{
theme.name|slugify }}-theme{% endif %}{% if theme.form_submit_sticky %} sticky-submit {% endif %}{% endblock %}
theme.name|slugify }}-theme{% endif %}{% if theme.form_submit_sticky %} sticky-submit {% endif %}{% if theme.form_pagination_sticky %} sticky-pagination {% endif %}{% endblock %}
{% block branding %}
{% get_admin_interface_theme as theme %}

View File

@ -412,11 +412,13 @@ body.admin-interface .paginator a.showall:visited {
max-width: 100%;
}
.admin-interface.sticky-submit.change-form:not(.popup) #main > #nav-sidebar + .content {
.admin-interface.sticky-submit.change-form:not(.popup) #main > #nav-sidebar + .content,
.admin-interface.sticky-pagination.change-list:not(.popup) #main > #nav-sidebar + .content {
padding-bottom: 4rem;
}
.admin-interface.sticky-submit.change-form:not(.popup) #main > #nav-sidebar + .content form fieldset + .submit-row {
.admin-interface.sticky-submit.change-form:not(.popup) #main > #nav-sidebar + .content form fieldset + .submit-row,
.admin-interface.sticky-pagination.change-list:not(.popup) #main > #nav-sidebar + .content form .results + .paginator {
width: 100%;
max-width: calc(100% - 28px);
bottom: 0;
@ -463,7 +465,8 @@ body.admin-interface .paginator a.showall:visited {
max-width: calc(100% - 360px);
}
.admin-interface.sticky-submit.change-form:not(.popup) #main.shifted > #nav-sidebar + .content .submit-row {
.admin-interface.sticky-submit.change-form:not(.popup) #main.shifted > #nav-sidebar + .content form fieldset + .submit-row,
.admin-interface.sticky-pagination.change-list:not(.popup) #main.shifted > #nav-sidebar + .content form .results + .paginator {
max-width: calc(100% - 388px);
right: 0;
bottom: 0;
@ -557,11 +560,13 @@ body.admin-interface .paginator a.showall:visited {
margin-top: 5px;
}
.admin-interface.sticky-submit.change-form:not(.popup) #main > #nav-sidebar + .content {
.admin-interface.sticky-submit.change-form:not(.popup) #main > #nav-sidebar + .content,
.admin-interface.sticky-pagination.change-form:not(.popup) #main > #nav-sidebar + .content {
padding-bottom: 12rem;
}
.admin-interface.sticky-submit.change-form:not(.popup) #main > #nav-sidebar + .content .submit-row {
.admin-interface.sticky-submit.change-form:not(.popup) #main > #nav-sidebar + .content .submit-row,
.admin-interface.sticky-pagination.change-list:not(.popup) #main > #nav-sidebar + .content form .results + .paginator {
max-width: calc(100% - 20px);
}
}