mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-16 21:12:13 +00:00
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:
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user