Fakultas Ilmu Komputer UI

Commit 43e1672f authored by Farid Wajdi's avatar Farid Wajdi
Browse files

Restructure new course list display

parent 4980ecc2
......@@ -22,16 +22,18 @@ for (var i = 0; i < courses.length; i++) {
};
// Creating new course list
myCoursesDiv.getElementsByClassName("unlist")[0].remove();
var newCourseList = document.createElement("ul");
var newCourseList = document.createElement("div");
newCourseList.setAttribute("class","unlist");
for (var key in coursePerSemester) {
if (!courseGroup.hasOwnProperty(key)) continue;
var courseNodes = coursePerSemester[key];
newCourseList.appendChild(document.createTextNode(key))
var courseListCurrentSemester = document.createElement("ul")
courseNodes.forEach(element => {
newCourseList.appendChild(element)
courseListCurrentSemester.appendChild(element)
});
newCourseList.appendChild(courseListCurrentSemester)
}
var courseFooter = myCoursesDiv.getElementsByClassName("footer")[0];
myCoursesContent.insertBefore(newCourseList, courseFooter);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment