mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +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 markdown_tags %}
|
||||||
{% load static %}
|
{% 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 %}
|
{% block content %}
|
||||||
<div class="row my-3 py-3">
|
<div class="row my-3 py-3">
|
||||||
{% if not request.is_ajax %}
|
{% if not request.is_ajax %}
|
||||||
|
|||||||
Reference in New Issue
Block a user