From 8cabb3a440b0c1cead0bb3c2501c2cd5551e446d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=A4ttasch?= <benjamin.haettasch@fachschaft.informatik.tu-darmstadt.de> Date: Thu, 5 Nov 2020 00:14:29 +0100 Subject: [PATCH] Show tooltips with AK details for unscheduled AK Slots, too Also adapt width of column for unscheduled AK Slots to make sure there is enough space for detail tooltips --- .../templates/admin/AKScheduling/scheduling.html | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/AKScheduling/templates/admin/AKScheduling/scheduling.html b/AKScheduling/templates/admin/AKScheduling/scheduling.html index 99b3ddde..8a2039bf 100644 --- a/AKScheduling/templates/admin/AKScheduling/scheduling.html +++ b/AKScheduling/templates/admin/AKScheduling/scheduling.html @@ -7,7 +7,7 @@ {% load static %} {% load tags_AKPlan %} -{% block title %}{% trans "Scheduling for" %} {{ event }}{% endblock %} +{% block title %}{% trans "Scheduling for" %} {{event}}{% endblock %} {% block extrahead %} {{ block.super }} @@ -174,6 +174,10 @@ } }); } + + $('.unscheduled-slot').each(function() { + $(this).tooltip({title: $(this).first().attr('data-details'), trigger: 'hover'}); + }); }); </script> {% endblock extrahead %} @@ -181,13 +185,13 @@ {% block content %} <div class="row" style="margin-bottom: 50px;"> - <div class="col-md-10 col-lg-11"> + <div class="col-md-10 col-lg-10"> <div id="planCalendar"></div> </div> - <div class="col-md-2 col-lg-1" id="unscheduled-slots"> + <div class="col-md-2 col-lg-2" id="unscheduled-slots"> {% for slot in slots_unscheduled %} <div class="unscheduled-slot badge badge-primary" style='background-color: {{ slot.ak.category.color }}' - data-event='{ "title": "{{ slot.ak.short_name }}", "duration": {"hours": "{{ slot.duration|unlocalize }}"}, "description": "{{ slot.ak.name }}", "slotID": "{{ slot.pk }}"}'>{{ slot.ak.short_name }} + data-event='{ "title": "{{ slot.ak.short_name }}", "duration": {"hours": "{{ slot.duration|unlocalize }}"}, "description": "{{ slot.ak.name }}", "slotID": "{{ slot.pk }}"}' data-details="{{ slot.ak.details }}">{{ slot.ak.short_name }} ({{ slot.duration }} h)<br>{{ slot.ak.owners_list }} </div> {% endfor %} -- GitLab