From a277d38842b2e1fcf04f8c1ad78275c147a5e9ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=A4ttasch?= <benjamin.haettasch@fachschaft.informatik.tu-darmstadt.de> Date: Sun, 17 Jan 2021 23:05:44 +0100 Subject: [PATCH] Fix fullcalendar issues by switching import order Move background event color to scheduling init code instead of every single background event --- AKPlan/templates/AKPlan/load_fullcalendar.html | 2 +- AKScheduling/api.py | 1 - AKScheduling/templates/admin/AKScheduling/scheduling.html | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/AKPlan/templates/AKPlan/load_fullcalendar.html b/AKPlan/templates/AKPlan/load_fullcalendar.html index 30fc76b8..6c2a93c8 100644 --- a/AKPlan/templates/AKPlan/load_fullcalendar.html +++ b/AKPlan/templates/AKPlan/load_fullcalendar.html @@ -2,8 +2,8 @@ {% load i18n %} {% get_current_language as LANGUAGE_CODE %} -<script src='{% static 'AKPlan/vendor/fullcalendar-scheduler/main.js' %}'></script> <link href='{% static 'AKPlan/vendor/fullcalendar-scheduler/main.css' %}' rel='stylesheet'/> +<script src='{% static 'AKPlan/vendor/fullcalendar-scheduler/main.js' %}'></script> {% with 'AKPlan/vendor/fullcalendar-scheduler/locales/'|add:LANGUAGE_CODE|add:'.js' as locale_file %} {% if LANGUAGE_CODE != "en" %} diff --git a/AKScheduling/api.py b/AKScheduling/api.py index 687704a8..27b4252e 100644 --- a/AKScheduling/api.py +++ b/AKScheduling/api.py @@ -72,7 +72,6 @@ class RoomAvailabilitiesView(LoginRequiredMixin, EventSlugMixin, ListView): "resourceId": a.room.id, "start": timezone.localtime(a.start, self.event.timezone).strftime("%Y-%m-%d %H:%M:%S"), "end": timezone.localtime(a.end, self.event.timezone).strftime("%Y-%m-%d %H:%M:%S"), - "backgroundColor": "#28B62C", "display": 'background', "groupId": 'roomAvailable', } for a in context["availabilities"]], diff --git a/AKScheduling/templates/admin/AKScheduling/scheduling.html b/AKScheduling/templates/admin/AKScheduling/scheduling.html index 75dc0c3c..7dcac838 100644 --- a/AKScheduling/templates/admin/AKScheduling/scheduling.html +++ b/AKScheduling/templates/admin/AKScheduling/scheduling.html @@ -127,7 +127,6 @@ eventChange: updateEvent, eventReceive: updateEvent, editable: true, - dropable: true, drop: function (info) { info.draggedEl.parentNode.removeChild(info.draggedEl); }, @@ -135,6 +134,7 @@ nowIndicator: true, eventTextColor: '#fff', eventColor: '#127ba3', + eventBackgroundColor: '#28B62C', datesAboveResources: true, resourceAreaHeaderContent: '{% trans "Room" %}', resources: '{% url "model:scheduling-resources-list" event_slug=event.slug %}', -- GitLab