Add shortcut to event page for opening PDF with Ctrl+P

Closes #457. You can still use browser default print if you are so
inclined (however it looks trash). This is a quick way to export the
PDF.
This commit is contained in:
Joe Banks
2025-03-16 20:05:03 +00:00
parent 25593f3e6c
commit 87dd32da6c

View File

@@ -3,6 +3,19 @@
{% load markdown_tags %}
{% load static %}
{% block js %}
{{ block.super }}
<script>
$(document).keydown(function(e) {
if (e.ctrlKey && e.keyCode == 80) {
window.open("{% url 'event_print' object.pk %}", '_blank');
return false;
}
});
</script>
{% endblock %}
{% block content %}
<div class="row my-3 py-3">
{% if not request.is_ajax %}