diff --git a/js/calendar.js b/js/calendar.js index 3df46cd9..af26960c 100644 --- a/js/calendar.js +++ b/js/calendar.js @@ -13,7 +13,7 @@ $(function () { ]); const fadetime = 150; const butdelay = 75; - $("#calendar").prepend(''); + $("#calendar").prepend(''); // Counter to iterate through material colors to avoid duplicates var colorCounter = 0; // Each schedule needs to store 'TITLE - START TIME - END TIME - COLOR' @@ -54,12 +54,16 @@ $(function () { }, eventClick: function (data, event, view) { $("#myModal").fadeIn(fadetime); + $("#colorStrip").css('background-color', data.color); currindex = data.index; currLink = savedCourses[currindex].link; var currunique = savedCourses[currindex].unique; $("#classname").html(`${savedCourses[currindex].coursename} (${savedCourses[currindex].unique})`); $("#timelines").append(makeLine(savedCourses[currindex].datetimearr)); - $("#prof").html(`with ${savedCourses[currindex].profname}`); + + var uncapProf = savedCourses[currindex].profname + uncapProf = uncapProf.charAt(0) + uncapProf.substring(1).toLowerCase(); + $("#prof").html(`with ${uncapProf}`); } }); });