From 4ca4ea9812f3956dd122309d00a6df926fd73054 Mon Sep 17 00:00:00 2001 From: Arona Jones Date: Sat, 23 Jan 2021 17:41:06 +0000 Subject: [PATCH] Should fix calendar breaking in production --- RIGS/templates/calendar.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/RIGS/templates/calendar.html b/RIGS/templates/calendar.html index 868a7663..b0b46471 100644 --- a/RIGS/templates/calendar.html +++ b/RIGS/templates/calendar.html @@ -57,7 +57,8 @@ }, success: function(doc) { var events = []; - colours = {'Provisional': '#FFE89B', + colours = { + 'Provisional': '#FFE89B', 'Confirmed': '#3AB54A' , 'Booked': '#3AB54A' , 'Cancelled': 'grey' , @@ -149,6 +150,7 @@ alert('Invalid Date'); } }); + {% if view and date %} // Go to the initial settings, if they're valid view = viewFromUrl['{{view}}']; calendar.changeView(view); @@ -158,6 +160,7 @@ } else{ console.log('Supplied date is invalid - using default') } + {% endif %} }); {% endblock %}