From 910f64038b38b08af2aae895ad65eee84b360c13 Mon Sep 17 00:00:00 2001 From: Sriram Hariharan Date: Sat, 12 Jan 2019 01:56:11 -0600 Subject: [PATCH] Styling and bugfixes --- calendar.html | 4 ---- css/_materialFullCalendar.css | 7 ++++++- js/content.js | 6 +++++- js/popup.js | 8 +++++--- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/calendar.html b/calendar.html index 18715b56..816892ed 100644 --- a/calendar.html +++ b/calendar.html @@ -27,11 +27,7 @@ - - - - \ No newline at end of file diff --git a/css/_materialFullCalendar.css b/css/_materialFullCalendar.css index e3f2c91c..457c3592 100644 --- a/css/_materialFullCalendar.css +++ b/css/_materialFullCalendar.css @@ -43,6 +43,7 @@ Colors: Use the following - https://www.google.com/design/spec/style/color.html# opacity: 0; border: none; } + /* Styling for each event from Schedule */ .fc-time-grid-event.fc-v-event.fc-event { @@ -54,7 +55,10 @@ Colors: Use the following - https://www.google.com/design/spec/style/color.html# opacity: 1; } -.html2canvas-container { width: 3000px !important; height: 3000px !important; } +.html2canvas-container { + width: 3000px !important; + height: 3000px !important; +} .fc-time-grid-event.fc-v-event.fc-event:hover { @@ -329,6 +333,7 @@ body a:visited { box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2), 0 4px 20px 0 rgba(0, 0, 0, 0.19); } + .cardcontainer { padding: 2px 16px; display: block; diff --git a/js/content.js b/js/content.js index c570677f..87399045 100644 --- a/js/content.js +++ b/js/content.js @@ -646,7 +646,11 @@ function prettifyTitle() { } /* Format the Professor Name */ function prettifyName() { - return profinit + ". " + profname.replace(/\w\S*/g, function (txt) { + var fixedprofinit = ""; + if (profinit) { + fixedprofinit = profinit + ". "; + } + return fixedprofinit + profname.replace(/\w\S*/g, function (txt) { return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); }); } diff --git a/js/popup.js b/js/popup.js index dcfb73d6..a5ba30ba 100644 --- a/js/popup.js +++ b/js/popup.js @@ -41,7 +41,7 @@ function setCourseList() {

- ${department} ${course_nbr} with ${profname} (${courses[i].unique}) + ${department} ${course_nbr} with ${profname} (${courses[i].unique})

@@ -107,7 +107,7 @@ function updateConflicts() { text += "
"; } } - $("#courseList").prepend("

" + text + ""); + $("

" + text + "").prependTo("#courseList").hide().fadeIn(200); } }); } @@ -144,7 +144,9 @@ $(document).ready(function () { var thisForm = this; if (canremove) { canremove = false; - $(thisForm).closest("ul").find("#conflict").remove(); + $(thisForm).closest("ul").find("#conflict").fadeOut(300, function () { + $(this).remove(); + }); chrome.runtime.sendMessage({ command: "courseStorage", course: courses[$(thisForm).closest("li").attr("id")],