diff --git a/css/_materialFullCalendar.css b/css/_materialFullCalendar.css index 4e1fdb65..e0c7995e 100644 --- a/css/_materialFullCalendar.css +++ b/css/_materialFullCalendar.css @@ -241,6 +241,12 @@ Colors: Use the following - https://www.google.com/design/spec/style/color.html# background-color: rgba(0, 0, 0, 0.4); } +#classname { + font-weight: bold; + margin-bottom: -10px; + font-size: 15px; +} + .modal-content { background-color: #fefefe; margin: auto; @@ -248,7 +254,21 @@ Colors: Use the following - https://www.google.com/design/spec/style/color.html# overflow-y: auto; padding: 20px; border: 1px solid #888; - width: 20%; + width: 30%; +} + +#prof { + font-size: 15px; +} + +#info { + margin: 10px; +} + +.time { + margin-left: auto; + margin-right: auto; + margin-bottom: 5px; } /* The Close Button */ @@ -280,6 +300,6 @@ Colors: Use the following - https://www.google.com/design/spec/style/color.html# .cardcontainer { padding: 2px 16px; - display: flex; + display: block; transition: width 300ms ease-in-out, height 300ms ease-in-out; } \ No newline at end of file diff --git a/js/calendar.js b/js/calendar.js index b2ed4b5a..c4da82a4 100644 --- a/js/calendar.js +++ b/js/calendar.js @@ -13,14 +13,13 @@ $(function () { ]); const fadetime = 150; const butdelay = 75; - $("#calendar").prepend('
" + dayarr[i] + ": " + timearr[i].split(",")[0] + " to " + timearr[i].split(",")[1] + "" + "
"; + } + return output; + } + // When the user clicks on (x), close the modal $(".close").click(() => { $("#myModal").fadeOut(fadetime); }); @@ -89,29 +114,28 @@ $(function () { } } + // Iterate through each saved course and add to 'event' function setAllEvents(savedCourses) { colorCounter = 0; classSchedules = []; for (let i = 0; i < savedCourses.length; i++) { - var classInfo = savedCourses[i]; - var department = classInfo.coursename.substring(0, classInfo.coursename.search(/\d/) - 2); - var course_nbr = classInfo.coursename.substring(classInfo.coursename.search(/\d/), classInfo.coursename.indexOf(" ", classInfo.coursename.search(/\d/))); - var uncapProf = classInfo.profname; - uncapProf = uncapProf.charAt(0) + uncapProf.substring(1).toLowerCase(); - var uniquenum = classInfo.unique; - var link = classInfo.link; - for (let j = 0; j < classInfo.datetimearr.length; j++) { - let session = classInfo.datetimearr[j]; // One single session for a class - setEventForSection(session, colorCounter, department, course_nbr, uncapProf, uniquenum, link); + for (let j = 0; j < savedCourses[i].datetimearr.length; j++) { + let session = savedCourses[i].datetimearr[j]; // One single session for a class + setEventForSection(session, colorCounter, i); } colorCounter++; } } //create the event object for every section - function setEventForSection(session, colorCounter, department, course_nbr, uncapProf, uniquenum, link) { + function setEventForSection(session, colorCounter, i) { var fullday = days.get(session[0]); + var classInfo = savedCourses[i]; + var department = classInfo.coursename.substring(0, classInfo.coursename.search(/\d/) - 2); + var course_nbr = classInfo.coursename.substring(classInfo.coursename.search(/\d/), classInfo.coursename.indexOf(" ", classInfo.coursename.search(/\d/))); + var uncapProf = classInfo.profname; + uncapProf = uncapProf.charAt(0) + uncapProf.substring(1).toLowerCase(); classSchedules.push({ title: `${department}-${course_nbr} with ${uncapProf}`, start: moment().format("YYYY-MM-") + @@ -131,8 +155,7 @@ $(function () { session[1][1] + ":00", color: materialColors[colorCounter], - unique: uniquenum, - courseLink: link, + index: i, allday: false }); } diff --git a/js/content.js b/js/content.js index 21c7bf3a..6d2daa57 100644 --- a/js/content.js +++ b/js/content.js @@ -203,7 +203,6 @@ function getCourseInfo(row) { } }); /*Handle if on the individual course page, ie if the textbook button exists*/ - console.log($("#textbook_button").length); if ($("#textbook_button").length) { coursename = $("#details h2").text(); profinit = $("table").find("td[data-th='Instructor']").text().split(", ")[1].substring(0, 1); diff --git a/todo b/todo index ce21027b..c0e8dad0 100644 --- a/todo +++ b/todo @@ -6,8 +6,8 @@ FEATURES: - something to fill the space to the rght of the main popup window BUGS TO FIX: -- RMP not working on individual course pages DONE/FIXED: - unneeded Logout message on individual course pages +- RMP not working on individual course pages