0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-21 18:09:02 +01:00

Adopt ZoneController (w-zone) in images/documents add views

This commit is contained in:
ayaan-qadri 2024-11-13 19:40:41 +05:30 committed by LB (Ben Johnston)
parent 31ccda4501
commit cc342bbd1c
2 changed files with 14 additions and 2 deletions

View File

@ -10,7 +10,13 @@
{% endblock %}
{% block main_content %}
<div class="drop-zone w-mt-8">
<div
class="drop-zone w-mt-8"
data-controller="w-zone"
data-action="dragover@document->w-zone#noop:prevent drop@document->w-zone#noop:prevent dragover->w-zone#activate drop->w-zone#deactivate dragleave->w-zone#deactivate dragend->w-zone#deactivate"
data-w-zone-active-class="hovered"
data-w-zone-delay-value="10"
>
<p>{% trans "Drag and drop documents into this area to upload immediately." %}</p>
<p>{{ help_text }}</p>

View File

@ -10,7 +10,13 @@
{% endblock %}
{% block main_content %}
<div class="drop-zone w-mt-8">
<div
class="drop-zone w-mt-8"
data-controller="w-zone"
data-action="dragover@document->w-zone#noop:prevent drop@document->w-zone#noop:prevent dragover->w-zone#activate drop->w-zone#deactivate dragleave->w-zone#deactivate dragend->w-zone#deactivate"
data-w-zone-active-class="hovered"
data-w-zone-delay-value="10"
>
<p>{% trans "Drag and drop images into this area to upload immediately." %}</p>
<p>{{ help_text }}</p>