diff --git a/anatomy/static/js/anatomy.js b/anatomy/static/js/anatomy.js index 057dea51..e009692b 100644 --- a/anatomy/static/js/anatomy.js +++ b/anatomy/static/js/anatomy.js @@ -12,6 +12,14 @@ window.control_pressed = false; $(document).ready(function () { + document.body.addEventListener("htmx:responseError", function(e) { + error = e.detail.xhr.response; + e = document.getElementById("htmx-error"); + e.innerHTML = error; + e.classList.remove("hidden"); + }); + + $("table thead th input").click((e) => { let status = e.currentTarget.checked; $("table tbody input").prop("checked", status); diff --git a/templates/base.html b/templates/base.html index 24833aef..b95f716b 100644 --- a/templates/base.html +++ b/templates/base.html @@ -123,6 +123,7 @@ {% endblock %}
+
{% block content %} {% endblock %}