Skip to content
Snippets Groups Projects
Commit 8cabb3a4 authored by Benjamin Hättasch's avatar Benjamin Hättasch
Browse files

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
parent 91cfb559
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
{% load static %} {% load static %}
{% load tags_AKPlan %} {% load tags_AKPlan %}
{% block title %}{% trans "Scheduling for" %} {{ event }}{% endblock %} {% block title %}{% trans "Scheduling for" %} {{event}}{% endblock %}
{% block extrahead %} {% block extrahead %}
{{ block.super }} {{ block.super }}
...@@ -174,6 +174,10 @@ ...@@ -174,6 +174,10 @@
} }
}); });
} }
$('.unscheduled-slot').each(function() {
$(this).tooltip({title: $(this).first().attr('data-details'), trigger: 'hover'});
});
}); });
</script> </script>
{% endblock extrahead %} {% endblock extrahead %}
...@@ -181,13 +185,13 @@ ...@@ -181,13 +185,13 @@
{% block content %} {% block content %}
<div class="row" style="margin-bottom: 50px;"> <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 id="planCalendar"></div>
</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 %} {% for slot in slots_unscheduled %}
<div class="unscheduled-slot badge badge-primary" style='background-color: {{ slot.ak.category.color }}' <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 }} ({{ slot.duration }} h)<br>{{ slot.ak.owners_list }}
</div> </div>
{% endfor %} {% endfor %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment