Skip to content
Snippets Groups Projects
Commit a3853ed7 authored by Nadja Geisler's avatar Nadja Geisler :sunny:
Browse files

Merge branch 'feature-plan-improve' into 'master'

Improve plan (current & wall)

See merge request kif/akplanning!49
parents 7d1c7a1d 92f43c0f
No related branches found
No related tags found
1 merge request!49Improve plan (current & wall)
Pipeline #4133 passed
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
{% if slot.start %} {% if slot.start %}
{ {
'title': '{{ slot.ak.short_name }}', 'title': '{{ slot.ak.short_name }}',
'description': '{{ slot.ak.name }}',
'start': '{{ slot.start | timezone:event.timezone | date:"Y-m-d H:i:s" }}', '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" }}', 'end': '{{ slot.end | timezone:event.timezone | date:"Y-m-d H:i:s" }}',
'resourceId': '{{ slot.room.title }}', 'resourceId': '{{ slot.room.title }}',
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
<script src='{% static 'AKPlan/vendor/fullcalendar/timeline/main.js' %}'></script> <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-common/main.js' %}'></script>
<script src='{% static 'AKPlan/vendor/fullcalendar/resource-timeline/main.js' %}'></script> <script src='{% static 'AKPlan/vendor/fullcalendar/resource-timeline/main.js' %}'></script>
<script> <script>
document.addEventListener('DOMContentLoaded', function () { document.addEventListener('DOMContentLoaded', function () {
var planEl = document.getElementById('planCalendar'); var planEl = document.getElementById('planCalendar');
...@@ -51,6 +50,9 @@ ...@@ -51,6 +50,9 @@
buttonText: '{% trans "Event" %}', buttonText: '{% trans "Event" %}',
} }
}, },
eventRender: function(info) {
$(info.el).tooltip({title: info.event.extendedProps.description});
},
editable: false, editable: false,
allDaySlot: false, allDaySlot: false,
nowIndicator: true, nowIndicator: true,
...@@ -64,6 +66,9 @@ ...@@ -64,6 +66,9 @@
}); });
plan.render(); plan.render();
// Scroll to current time
$('.fc-scroller').scrollLeft($('.fc-now-indicator').position().left);
}); });
</script> </script>
{% endif %} {% endif %}
......
...@@ -53,7 +53,9 @@ ...@@ -53,7 +53,9 @@
start: '{{ start | timezone:event.timezone | date:"Y-m-d H:i:s" }}', start: '{{ start | timezone:event.timezone | date:"Y-m-d H:i:s" }}',
end: '{{ end | 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, editable: false,
allDaySlot: false, allDaySlot: false,
nowIndicator: true, nowIndicator: true,
...@@ -75,6 +77,9 @@ ...@@ -75,6 +77,9 @@
}); });
plan.render(); plan.render();
// Scroll to current time
$('.fc-scroller').scrollLeft($('.fc-now-indicator').position().left);
}); });
</script> </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