Merge pull request #130 from Simple2B/kostia/fix/Dnd_ui

fix DnD behavior on top collection level
This commit is contained in:
Костя Столярский 2023-06-07 17:09:44 +03:00 committed by GitHub
commit e8fea9ce23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -80,7 +80,12 @@
</div> </div>
</div> </div>
{% else %} {% else %}
<div id="accordion-collapse-body-{{collection.id}}" class="hidden" aria-labelledby="accordion-collapse-heading-{{collection.id}}" > <div id="accordion-collapse-body-{{collection.id}}" class="pl-6 pb-6 {% if not has_permission(collection, Access.U) %}filter{% endif %}"
data-dnd="dnd-sub-collection"
data-book-id="{{book.id}}"
data-entity-type="collection"
data-entity-id="{{collection.id}}"
aria-labelledby="accordion-collapse-heading-{{collection.id}}" >
</div> </div>
{% endif %} {% endif %}
{% endfor %} {% endfor %}

View File

@ -1,6 +1,6 @@
<!-- prettier-ignore --> <!-- prettier-ignore -->
<div <div
class="ml-6 {% if not has_permission(collection, Access.U) %}filter{% endif %}" class="pl-6 pb-1 {% if not has_permission(collection, Access.U) %}filter{% endif %}"
{% if has_permission(collection, Access.U) %}data-dnd="dnd-sub-collection"{% endif %} {% if has_permission(collection, Access.U) %}data-dnd="dnd-sub-collection"{% endif %}
{% if collection %} {% if collection %}
data-entity-type="collection" data-entity-type="collection"
@ -51,7 +51,7 @@
{% include 'book/components/sub_collection_context_menu.html' %} {% include 'book/components/sub_collection_context_menu.html' %}
</div> </div>
<!-- prettier-ignore --> <!-- prettier-ignore -->
<div id="accordion-nested-collapse-body-{{sub_collection.parent.id}}-{{sub_collection.id}}" class="hidden" aria-labelledby="accordion-nested-collapse-heading-{{sub_collection.id}}"> <div id="accordion-nested-collapse-body-{{sub_collection.parent.id}}-{{sub_collection.id}}" class="hidden pl-6 pb-1" aria-labelledby="accordion-nested-collapse-heading-{{sub_collection.id}}">
{% if sub_collection.active_children %} {% if sub_collection.active_children %}
{{recursive_render("book/components/sub_collection_tab_content.html",sub_collection,book)|safe}} {{recursive_render("book/components/sub_collection_tab_content.html",sub_collection,book)|safe}}
{% elif sub_collection.active_sections %} {% elif sub_collection.active_sections %}