Revert "Fix workflow action buttons in awaiting review dashboard panel"

This reverts commit b3846a63fc.

It's a partial revert as the changes to DropdownController itself is
still useful, since it allows us to target the 'shown' event on the more
specific element instead of the document.
pull/12160/head
Sage Abdullah 2024-06-27 12:40:11 +01:00 zatwierdzone przez Thibaud Colas
rodzic 1dd45f1cb8
commit d0bdb3f769
1 zmienionych plików z 1 dodań i 7 usunięć

Wyświetl plik

@ -91,12 +91,6 @@
<script src="{% versioned_static 'wagtailadmin/js/workflow-action.js' %}"></script>
<script>
document.querySelectorAll('[data-controller="w-dropdown"]').forEach((e) => {
e.addEventListener(
'w-dropdown:shown',
() => ActivateWorkflowActionsForDashboard('{{ csrf_token|escapejs }}'),
{ once: true },
);
});
document.addEventListener('DOMContentLoaded', () => ActivateWorkflowActionsForDashboard('{{ csrf_token|escapejs }}'));
</script>
{% endif %}