Styling and bugfixes

This commit is contained in:
Sriram Hariharan
2019-01-12 01:56:11 -06:00
parent 8e747290a8
commit 910f64038b
4 changed files with 16 additions and 9 deletions

View File

@@ -27,11 +27,7 @@
</div> </div>
</div> </div>
</div> </div>
</body> </body>
<script src='js/html2canvas.min.js'></script> <script src='js/html2canvas.min.js'></script>
<script src='js/ics.min.js'></script> <script src='js/ics.min.js'></script>
<script src='js/calendar.js'></script> <script src='js/calendar.js'></script>

View File

@@ -43,6 +43,7 @@ Colors: Use the following - https://www.google.com/design/spec/style/color.html#
opacity: 0; opacity: 0;
border: none; border: none;
} }
/* Styling for each event from Schedule */ /* Styling for each event from Schedule */
.fc-time-grid-event.fc-v-event.fc-event { .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; 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 { .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); box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2), 0 4px 20px 0 rgba(0, 0, 0, 0.19);
} }
.cardcontainer { .cardcontainer {
padding: 2px 16px; padding: 2px 16px;
display: block; display: block;

View File

@@ -646,7 +646,11 @@ function prettifyTitle() {
} }
/* Format the Professor Name */ /* Format the Professor Name */
function prettifyName() { 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(); return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
}); });
} }

View File

@@ -41,7 +41,7 @@ function setCourseList() {
<div class='card'> <div class='card'>
<div class='container' style='background:${color}'> <div class='container' style='background:${color}'>
<h4 class='truncate' style='color:white;margin:5px; display:inline-block;font-size:large;'> <h4 class='truncate' style='color:white;margin:5px; display:inline-block;font-size:large;'>
<b>${department} ${course_nbr} <span style='font-size:medium'> with </span><span style='font-size:medium'>${profname} (${courses[i].unique})</span></b> <b>${department} ${course_nbr} <span style='font-size:medium'> with <span style='font-size:medium'>${profname} (${courses[i].unique})</span></b>
</h4> </h4>
<p id='arrow' style='float:right;font-size:small;display:inline-block;margin-top:10px;color:white;font-family: sans-serif'>&#9658;</p> <p id='arrow' style='float:right;font-size:small;display:inline-block;margin-top:10px;color:white;font-family: sans-serif'>&#9658;</p>
</div> </div>
@@ -107,7 +107,7 @@ function updateConflicts() {
text += "<br>"; text += "<br>";
} }
} }
$("#courseList").prepend("<p id='conflict' style='font-size:small; font-weight:bold; color:red; margin:5px 5px 5px 10px'>" + text + "</>"); $("<p id='conflict' style='font-size:small; font-weight:bold; color:red; margin:5px 5px 5px 10px'>" + text + "</>").prependTo("#courseList").hide().fadeIn(200);
} }
}); });
} }
@@ -144,7 +144,9 @@ $(document).ready(function () {
var thisForm = this; var thisForm = this;
if (canremove) { if (canremove) {
canremove = false; canremove = false;
$(thisForm).closest("ul").find("#conflict").remove(); $(thisForm).closest("ul").find("#conflict").fadeOut(300, function () {
$(this).remove();
});
chrome.runtime.sendMessage({ chrome.runtime.sendMessage({
command: "courseStorage", command: "courseStorage",
course: courses[$(thisForm).closest("li").attr("id")], course: courses[$(thisForm).closest("li").attr("id")],