Should fix calendar breaking in production

This commit is contained in:
2021-01-23 17:41:06 +00:00
parent fe38d5cf36
commit 4ca4ea9812

View File

@@ -57,7 +57,8 @@
}, },
success: function(doc) { success: function(doc) {
var events = []; var events = [];
colours = {'Provisional': '#FFE89B', colours = {
'Provisional': '#FFE89B',
'Confirmed': '#3AB54A' , 'Confirmed': '#3AB54A' ,
'Booked': '#3AB54A' , 'Booked': '#3AB54A' ,
'Cancelled': 'grey' , 'Cancelled': 'grey' ,
@@ -149,6 +150,7 @@
alert('Invalid Date'); alert('Invalid Date');
} }
}); });
{% if view and date %}
// Go to the initial settings, if they're valid // Go to the initial settings, if they're valid
view = viewFromUrl['{{view}}']; view = viewFromUrl['{{view}}'];
calendar.changeView(view); calendar.changeView(view);
@@ -158,6 +160,7 @@
} else{ } else{
console.log('Supplied date is invalid - using default') console.log('Supplied date is invalid - using default')
} }
{% endif %}
}); });
</script> </script>
{% endblock %} {% endblock %}