Move off WinBox to JSFrame

WinBox is nice, but it has this annoying bug that I don't feel like
figuring out how to fix. JSFrame seems to work much better, although
centering the window seems to be a chore. I'll figure it out soon
enough.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2022-06-26 20:52:47 -07:00
parent 356196db26
commit d931f52f01
10 changed files with 127 additions and 130 deletions

View File

@@ -31,19 +31,21 @@
{% block extrahead %}
{{block.super}}
<script src="{% static 'board/jquery.js' %}"></script>
<script src="{% static 'board/winbox.bundle.js' %}"></script>
<script src="{% static 'board/jsframe.min.js' %}"></script>
<script src="{% static 'board/ban_window.js' %}"></script>
{% endblock extrahead %}
{% block footer %}
{{block.super}}
<script>
function onLoad(e) {
window.banWindow = null;
}
$(".ban_link").on("click", (e) => { openBanWindow(e, $(e.target).attr("data-ban-url")); });
$(window).on("load", onLoad);
$(".ban_link").on("click", (e) => {
e.preventDefault();
openBanWindow($(e.target).attr("data-ban-url"));
});
$(window.top).on("load", (e) => {
if (typeof window.top.jsFrame === "undefined") {
window.top.jsFrame = new JSFrame();
}
});
</script>
{% endblock %}