diff --git a/smash/web/api_views/daily_planning.py b/smash/web/api_views/daily_planning.py index 48526c3c4b6eb8390598d54da471a3c1b94f73ef..3c338e5371efa7ef283b5c460cd0c60b00679796 100644 --- a/smash/web/api_views/daily_planning.py +++ b/smash/web/api_views/daily_planning.py @@ -191,6 +191,7 @@ def events(request, date): 'name': unicode(appointment_subject), 'id': appointment_subject.id, 'color': RANDOM_COLORS[i], + 'start':appointment.datetime_when.replace(tzinfo=None).strftime("%H:%M:00"), 'events': [] } subjects[appointment_subject.id] = subject diff --git a/smash/web/static/js/daily_planning.js b/smash/web/static/js/daily_planning.js index 4b608d6fe624562bf19d54096e130f0a8a82b007..467c4a904e45cbc41d38c24cc4d8a060fe393392 100644 --- a/smash/web/static/js/daily_planning.js +++ b/smash/web/static/js/daily_planning.js @@ -110,7 +110,7 @@ function get_subjects_events(day) { var boxSubject = $("<div class='box box-primary'/>").css('border-top-color', subject.color); var boxBody = $("<div class='box-body' id='subject_" + subject.id + "'>"); var boxHeader = $("<div class='box-header with-border'/>"); - var title_subject = $("<h4>" + subject.name + "</h4>"); + var title_subject = $("<h4>" + subject.name + "( " + subject.start + ")" + "</h4>"); boxHeader.append(title_subject); $.each(subject.events, function (index_event, event) { if (event.link_when) { @@ -188,7 +188,7 @@ $(document).ready(function () { var saveButton = $(".fc-save-button"); var currentBorder = saveButton.css('border-color'); $.each(calendarEvents, function (i, calendar_event) { - if (calendar_event.rendering!=="background") { + if (calendar_event.rendering !== "background") { eventsToPersist.push({ 'link_id': calendar_event.link_id, 'link_who': parseInt(calendar_event.resourceId),