This commit is contained in:
10001shh
2018-08-30 21:35:46 -05:00
parent af0d8a775e
commit 6b6a35e9b5
3 changed files with 91 additions and 82 deletions

View File

@@ -55,8 +55,6 @@ $(function () {
$("#myModal").fadeIn(fadetime);
$("#colorStrip").css('background-color', data.color);
currindex = data.index;
var currLink = savedCourses[currindex].link;
var currunique = savedCourses[currindex].unique;
$("#classname").html(`${savedCourses[currindex].coursename} <span style='font-size:small'>(${savedCourses[currindex].unique})</span>`);
$("#timelines").append(makeLine(savedCourses[currindex].datetimearr));
@@ -67,20 +65,21 @@ $(function () {
$("#prof").html(`with <span style='font-weight:bold;'>${uncapProf}</span>`);
let status = savedCourses[currindex].status;
if(status.includes("closed") || status.includes("cancelled")){
$("#register").text("Class Closed").css("background-color","#FF5722");
} else{
$("#register").text("Register").css("background-color","#4CAF50").click(function () {
let registerlink = savedCourses[currindex].registerlink;
setTimeout(() => {
window.open(registerlink);
}, butdelay);
if (status.includes("closed") || status.includes("cancelled")) {
$("#register").text("Class Closed").css("background-color", "#FF5722");
} else {
$("#register").text("Register").css("background-color", "#4CAF50");
}
}
});
});
// When the user clicks on <span> (x), close the modal
$(".close").click(() => {
$("#myModal").fadeOut(fadetime);
});
$("#info").click(() => {
var currLink = savedCourses[currindex].link;
setTimeout(() => {
window.open(currLink);
}, butdelay);
@@ -104,13 +103,18 @@ $(function () {
});
}, butdelay);
});
}
$("#register").click(function () {
let registerlink = savedCourses[currindex].registerlink;
let status = savedCourses[currindex].status;
if (!(status.includes("closed") || status.includes("cancelled"))) {
setTimeout(() => {
window.open(registerlink);
}, butdelay);
}
});
});
/* convert from the dtarr and maek the time lines*/
function makeLine(datetimearr) {
/* convert from the dtarr and maek the time lines*/
function makeLine(datetimearr) {
$(".time").remove();
//converted times back
console.log(datetimearr);

View File

@@ -24,7 +24,7 @@
<span style="font-size: small;display:table;margin:0 auto;font-weight: bold">(No Courses Saved)</span>
</h2>
<div style=" margin-bottom: 0px; display:inline-block"></div>
<button title='Options' class="settingsbut" id='open'>
<button title='Options' style="background-color:white;" class="settingsbut" id='open'>
<i style='color:#FF9800' class="material-icons">
settings
</i></button>

5
todo
View File

@@ -3,8 +3,13 @@ TODO as of 8/28/18
FEATURES:
- something to fill the space to the rght of the main popup window
- Location in popup extra info
- import into UT registration plus
- import calendar
BUGS TO FIX:
- online classes no times in popup link
DONE/FIXED:
- unneeded Logout message on individual course pages