Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Alignment w/ Django 4.2+ admin style #1453

Merged
merged 14 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions filer/private/sass/components/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ body {
}
}

.filer-widget {
width: 100%;
}

.field-file,
.field-sha1 {
word-wrap: break-word;
Expand Down
2 changes: 1 addition & 1 deletion filer/static/filer/css/admin_filer.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion filer/static/filer/css/maps/admin_filer.css.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion filer/static/filer/js/addons/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if (django.jQuery) {
}

djQuery(function ($) {
var filer_clear = function () {
var filer_clear = function (ev) {
var clearer = $(this);
var container = clearer.closest('.filerFile');
var input = container.find(':input');
Expand All @@ -20,6 +20,7 @@ djQuery(function ($) {
var dropzoneMessage = container.siblings('.dz-message');
var hiddenClass = 'hidden';

ev.preventDefault();
clearer.addClass(hiddenClass);
input.val('');
thumbnail.addClass(hiddenClass);
Expand Down
2 changes: 2 additions & 0 deletions filer/templates/admin/filer/widgets/admin_file.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% load i18n filer_admin_tags static %}

{% spaceless %}
<div class="filer-widget">
<div class="clearfix"></div>

<div class="dz-preview dz-file-preview hidden js-filer-dropzone-template">
Expand Down Expand Up @@ -67,4 +68,5 @@
</script>
</span>
</div>
</div>
{% endspaceless %}
1 change: 1 addition & 0 deletions tests/requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ django-app-helper>=3.3.1
coverage
isort
flake8
packaging
Loading