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: Folder select widget did not render correctly with standard Django admin styles #1467

Merged
merged 16 commits into from
May 17, 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
7 changes: 7 additions & 0 deletions filer/private/sass/components/_drag-and-drop.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ form .form-row {
display: none;
}
}
.filer-widget + .related-widget-wrapper-link,
.filer-widget + * + .related-widget-wrapper-link {
display: none;
}
.related-widget-wrapper:has(.filer-widget,.filer-dropzone) {
width: 100%;
}
.filer-dropzone {
@include clearfix;
position: relative;
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.

Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
{% if filer_admin_context.pick_folder and item.file_type == 'Folder' %}
<a class="insertlink insertlinkButton"
href="#" onclick="opener.dismissRelatedFolderLookupPopup(window, '{{ subfolder.pk|safe }}', '{{ subfolder.pretty_logical_path }}'); return false;" >
<span class="fa fa-arrow-left filer-icon cms-icon-select"></span>
<span class="fa fa-arrow-left filer-icon filer-icon-select"></span>
</a>
{% elif action_form and item.pk and not is_popup %}
<input type="checkbox" class="action-select" value="folder-{{ item.pk|safe }}" name="_selected_action">
Expand Down
8 changes: 4 additions & 4 deletions filer/templates/admin/filer/widgets/admin_folder.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
{% spaceless %}
<div class="filer-dropzone filer-dropzone-folder">
<span class="filerFile">
<a href="{{ lookup_url }}" class="related-lookup{% if object %} hidden{% endif %}" id="{{ lookup_name }}" title="{% trans 'Lookup' %}">
<span class="fa fa-search cms-icon cms-icon-search"></span>&nbsp;
{% trans "Choose Folder" %}
</a>
<img src="{% static "filer/icons/folder.svg" %}" class="thumbnail_img{% if not object %} hidden{% endif %}"/>
<span id="{{ span_id }}" style="margin-left: 15px;">
<span class="description_text">
Expand All @@ -11,10 +15,6 @@
{% endif %}
</span>
</span>
<a href="{{ lookup_url }}" class="related-lookup{% if object %} hidden{% endif %}" id="{{ lookup_name }}" title="{% trans 'Lookup' %}">
<span class="fa fa-search cms-icon cms-icon-search"></span>&nbsp;
{% trans "Choose Folder" %}
</a>
<a class="filerClearer {% if not object %}hidden{% endif %}" id="{{ clear_id }}" title="{% translate 'Clear' %}" href="#">
<span class="fa fa-close filer-icon filer-icon-remove-selection"></span>
</a>
Expand Down
Loading