Skip to content

Commit

Permalink
feat(templates): Add event handler in pages with HTMX
Browse files Browse the repository at this point in the history
  • Loading branch information
ERosendo committed May 2, 2023
1 parent 2a19d24 commit 807fae2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions bc/subscription/templates/add-case.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@
<script src="{% static "js/htmx.min.js" %}"></script>
{% endif %}
<script src="{% static "js/loading-states.js" %}"></script>
{% if debug %}
<script>
if (typeof window.htmx !== "undefined") {
htmx.on("htmx:afterSettle", function(detail) {
if (
typeof window.djdt !== "undefined"
&& detail.target instanceof HTMLBodyElement
) {
djdt.show_toolbar();
}
});
}
</script>
{% endif %}
{% endblock %}

{% block title %}Add a new case{% endblock %}
Expand Down

0 comments on commit 807fae2

Please sign in to comment.