From 3b1ab693c014b3c19fed3973d464983e2b9348fa Mon Sep 17 00:00:00 2001
From: Piotr Gawron <piotr.gawron@uni.lu>
Date: Fri, 20 Oct 2017 12:16:38 +0200
Subject: [PATCH] tilte in the daily planning calendar view is an abbreviation

---
 smash/web/api_views/daily_planning.py | 1 +
 smash/web/static/js/daily_planning.js | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/smash/web/api_views/daily_planning.py b/smash/web/api_views/daily_planning.py
index f526803c..4a1438e3 100644
--- a/smash/web/api_views/daily_planning.py
+++ b/smash/web/api_views/daily_planning.py
@@ -217,6 +217,7 @@ def events(request, date):
                 link_end = link_when + datetime.timedelta(minutes=link.appointment_type.default_duration)
             event = {
                 'title': link.appointment_type.description,
+                'short_title': link.appointment_type.code,
                 'duration': build_duration(link.appointment_type.default_duration),
                 'subject': unicode(appointment_subject),
                 'id': '{}-{}'.format(i, j),
diff --git a/smash/web/static/js/daily_planning.js b/smash/web/static/js/daily_planning.js
index 3e8d99c7..798ca84b 100644
--- a/smash/web/static/js/daily_planning.js
+++ b/smash/web/static/js/daily_planning.js
@@ -45,7 +45,7 @@ function add_event(event, color, subjectId, boxBody) {
     eventElement.data('event', {
         appointment_start: event.appointment_start,
         appointment_end: event.appointment_end,
-        title: event.title,
+        title: event.short_title,
         stick: true,
         color: color + " !important",
         duration: event.duration,
@@ -277,7 +277,7 @@ $(document).ready(function () {
         eventRender: function (event, element) {
             if (event.rendering !== 'background') {
                 element.popover({
-                    title: event.title,
+                    title: event.short_title,
                     container: 'body',
                     placement: 'bottom',
                     trigger: 'click',
-- 
GitLab