From dd2702d4950f188b8d522a1f6c9d833ca0c5143c Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 12 Feb 2024 21:55:45 +0000 Subject: [PATCH] . --- anatomy/static/js/anatomy.js | 8 ++++++++ templates/base.html | 1 + 2 files changed, 9 insertions(+) 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 %}