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

Improve plan (current & wall)

Show full name of AK as tooltip
Scroll to current time
parent 7d1c7a1d
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@
{% if slot.start %}
{
'title': '{{ slot.ak.short_name }}',
'description': '{{ slot.ak.name }}',
'start': '{{ slot.start | timezone:event.timezone | date:"Y-m-d H:i:s" }}',
'end': '{{ slot.end | timezone:event.timezone | date:"Y-m-d H:i:s" }}',
'resourceId': '{{ slot.room.title }}',
......
......@@ -17,7 +17,6 @@
<script src='{% static 'AKPlan/vendor/fullcalendar/timeline/main.js' %}'></script>
<script src='{% static 'AKPlan/vendor/fullcalendar/resource-common/main.js' %}'></script>
<script src='{% static 'AKPlan/vendor/fullcalendar/resource-timeline/main.js' %}'></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
var planEl = document.getElementById('planCalendar');
......@@ -51,6 +50,9 @@
buttonText: '{% trans "Event" %}',
}
},
eventRender: function(info) {
$(info.el).tooltip({title: info.event.extendedProps.description});
},
editable: false,
allDaySlot: false,
nowIndicator: true,
......@@ -64,6 +66,9 @@
});
plan.render();
// Scroll to current time
$('.fc-scroller').scrollLeft($('.fc-now-indicator').position().left);
});
</script>
{% endif %}
......
......@@ -53,7 +53,9 @@
start: '{{ start | timezone:event.timezone | date:"Y-m-d H:i:s" }}',
end: '{{ end | timezone:event.timezone | date:"Y-m-d H:i:s"}}',
},
scrollTime: '{{ start | timezone:event.timezone | date:"H:i:s" }}',
eventRender: function(info) {
$(info.el).tooltip({title: info.event.extendedProps.description});
},
editable: false,
allDaySlot: false,
nowIndicator: true,
......@@ -75,6 +77,9 @@
});
plan.render();
// Scroll to current time
$('.fc-scroller').scrollLeft($('.fc-now-indicator').position().left);
});
</script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment