Skip to content

Commit

Permalink
fix: Folder select widget did not render correctly with standard Djan…
Browse files Browse the repository at this point in the history
…go admin styles (#1467)

* Fix #1377

* Fix: folder widget css

* Revert "Fix: folder widget css"

This reverts commit 4d5d5d2.

* Disentangle from test changes
  • Loading branch information
fsbraun authored May 17, 2024
1 parent 48fdcb7 commit 46d7851
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
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

0 comments on commit 46d7851

Please sign in to comment.