highling conflicts on the UT course list screen

This commit is contained in:
Sriram Hariharan
2018-07-14 21:38:49 -05:00
parent 05c9aa9005
commit 37c454f7c2
4 changed files with 169 additions and 19 deletions

View File

@@ -6,14 +6,14 @@ chrome.storage.sync.get('savedCourses', function(data) {
var between = response.between;
var text = "";
for(var i = 0; i<between.length;i++){
text+="Conflict between: "+ getSimpleName(between[i][0].coursename,between[i][0].unique) + " and "+getSimpleName(between[i][1].coursename,between[i][1].unique);
text+="CONFLICT: "+ getSimpleName(between[i][0].coursename,between[i][0].unique) + " and "+getSimpleName(between[i][1].coursename,between[i][1].unique);
isConflicted.push(between[i][0].unique);
isConflicted.push(between[i][1].unique);
if(i != between.length-1){
text+= "<br>";
}
}
$("#courseList").prepend("<p style='font-size:small; font-weight:bold; color:red; margin:5px;'>"+text+"</>");
$("#courseList").prepend("<p style='font-size:small; font-weight:bold; color:red; margin:5px 5px 5px 10px'>"+text+"</>");
}
});
courses = data.savedCourses;
@@ -82,7 +82,9 @@ $(document).ready(function() {
console.log($(thisForm).closest("ul").children(":visible").length);
$(thisForm).closest("ul").find("> p").remove();
if($(thisForm).closest("ul").children(':visible').length===1){
$("#empty").fadeIn(200);
$("#courseList").fadeOut(300,function(){
$("#empty").fadeIn(200);
});
}
updateConflicts();
});