From c8e54437a97285b8e9095ea5c1d40cd4682c7024 Mon Sep 17 00:00:00 2001 From: Daniel Grams Date: Wed, 20 Jan 2021 15:44:20 +0100 Subject: [PATCH] Add print button to widget event list page #69 --- project/static/site.js | 5 +++++ project/templates/widget/event_date/list.html | 2 ++ 2 files changed, 7 insertions(+) diff --git a/project/static/site.js b/project/static/site.js index 86f7a98..72f3e9c 100644 --- a/project/static/site.js +++ b/project/static/site.js @@ -189,6 +189,11 @@ $( function() { $("#location").val(""); }); + $(".btn-print").click(function () { + window.print(); + return false; + }); + $("#geolocation_btn").click(function () { if ("geolocation" in navigator){ navigator.geolocation.getCurrentPosition(function(position){ diff --git a/project/templates/widget/event_date/list.html b/project/templates/widget/event_date/list.html index fed0f57..9ed6443 100644 --- a/project/templates/widget/event_date/list.html +++ b/project/templates/widget/event_date/list.html @@ -107,6 +107,8 @@ {{ render_pagination(pagination) }} + + {% endblock %} {% block footer %} {% endblock %} \ No newline at end of file