From ebc80c47c18992687203dac5667c68e9b853b9e8 Mon Sep 17 00:00:00 2001 From: NathanRusso Date: Tue, 1 Sep 2026 16:27:28 -0400 Subject: [PATCH 1/5] I added handling for more features in the course pop. It has not been tested. --- app.py | 5 +++++ index.html | 15 +++++++++------ js/load.js | 13 ++++++++++--- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/app.py b/app.py index 7dce470..feb71de 100644 --- a/app.py +++ b/app.py @@ -14,6 +14,11 @@ "FROM courses c JOIN departments d ON c.department = d.id " "WHERE d.code = ? AND c.course = ? ORDER BY c.quarter DESC LIMIT 1" ) +#COURSE_QUERY = ( +# "SELECT c.quarter, d.code, c.course, c.credits, c.title, c.description, c.prerequisites, c.contact, c.offered " +# "FROM courses c JOIN departments d ON c.department = d.id " +# "WHERE d.code = ? AND c.course = ? ORDER BY c.quarter DESC LIMIT 1" +#) pool = None # Startup code diff --git a/index.html b/index.html index f6eb2db..757ee69 100644 --- a/index.html +++ b/index.html @@ -46,12 +46,15 @@

GCCIS Flowcharts

- - +
+ Prerequisites:  +
+
+ Contact Hours:  +
+
+ Typically Offered:  +
diff --git a/js/load.js b/js/load.js index 68d0cc0..cea08ee 100644 --- a/js/load.js +++ b/js/load.js @@ -26,8 +26,9 @@ const coursePopup = document.getElementById("coursePopup"); const coursePopupButton = document.getElementById("coursePopupButton"); const coursePopupTitle = document.getElementById("coursePopupTitle"); const coursePopupDescription = document.getElementById("coursePopupDescription"); -// const coursePopupPrerequisites = document.getElementById("coursePopupPrerequisites"); // Database didn't contain this information -// const coursePopupOffered = document.getElementById("coursePopupOffered"); // Database didn't contain this information +const coursePopupPrerequisites = document.getElementById("coursePopupPrerequisitesContent"); +const coursePopupContact = document.getElementById("coursePopupContactContent"); +const coursePopupOffered = document.getElementById("coursePopupOfferedContent"); let hyperDictionary = {} // A mapping of hyperParentIds to hyperChildIds to their courseDivs let initialHyperChildIds = {} // A mapping of hyperParentIds to the initial hyperChildIds @@ -630,6 +631,9 @@ function displayCoursePopup(target) { coursePopup.style.borderColor = popupInformation.borderColor; coursePopupTitle.textContent = popupInformation.title; coursePopupDescription.textContent = popupInformation.description; + coursePopupPrerequisites.textContent = popupInformation.prerequisites; + coursePopupContact.textContent = popupInformation.contact; + coursePopupOffered.textContent = popupInformation.offered; revealCoursePopup(); return; } @@ -647,7 +651,10 @@ function displayCoursePopup(target) { courseInformationCache[courseKey] = { borderColor: courseColor, title: coursePopupTitle.textContent, - description: coursePopupDescription.textContent + description: coursePopupDescription.textContent, + prerequisites: courseDBInfo.prerequisites ?? "", + contact: courseDBInfo.contact ?? "", + offered: courseDBInfo.offered ?? "" } revealCoursePopup(); }); From a47ba3546b0971b03215eb39e17c77e4b24c8711 Mon Sep 17 00:00:00 2001 From: NathanRusso Date: Tue, 1 Sep 2026 17:08:58 -0400 Subject: [PATCH 2/5] I fixed the popup button 'X' size. --- css/main.css | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/css/main.css b/css/main.css index 5ff2306..372bc83 100644 --- a/css/main.css +++ b/css/main.css @@ -96,11 +96,12 @@ width: 15px; height: 15px; margin: 0px; - padding: 0; - border: 0; + padding: 0px; + border: 0px; border-radius: 3px; background-color: var(--background-color); color: var(--text-color); + font-size: 1.2rem; cursor: pointer; position: absolute; z-index: 4; From 8a5b5ebcebed5a11fbe10db4d788ae789e6faa45 Mon Sep 17 00:00:00 2001 From: NathanRusso Date: Tue, 1 Sep 2026 17:56:34 -0400 Subject: [PATCH 3/5] I updated how the popup centers vertically. --- css/main.css | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/css/main.css b/css/main.css index 372bc83..4570051 100644 --- a/css/main.css +++ b/css/main.css @@ -62,9 +62,11 @@ justify-content: center; /* Centers horizontally */ align-items: stretch; overflow-y: auto; - top: 25%; + top: 50%; left: 25%; width: 50vw; + max-height: 80vw; + transform: translateY(-50%); /* Moves popup back up 50% of its height */ border: 5px solid var(--text-color); border-radius: 5px; box-shadow: 5px 5px 15px var(--shadow-color); From 4a0398e43e79160d76789f1f8cb985555d92a7c9 Mon Sep 17 00:00:00 2001 From: NathanRusso Date: Thu, 3 Sep 2026 22:41:02 -0400 Subject: [PATCH 4/5] Updating names. --- app.py | 2 +- index.html | 6 +++--- js/load.js | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app.py b/app.py index feb71de..608d37a 100644 --- a/app.py +++ b/app.py @@ -15,7 +15,7 @@ "WHERE d.code = ? AND c.course = ? ORDER BY c.quarter DESC LIMIT 1" ) #COURSE_QUERY = ( -# "SELECT c.quarter, d.code, c.course, c.credits, c.title, c.description, c.prerequisites, c.contact, c.offered " +# "SELECT c.quarter, d.code, c.course, c.credits, c.title, c.description, c.prerequisites, c.typically_offered, c.contact_hours " # "FROM courses c JOIN departments d ON c.department = d.id " # "WHERE d.code = ? AND c.course = ? ORDER BY c.quarter DESC LIMIT 1" #) diff --git a/index.html b/index.html index 757ee69..c0de3fa 100644 --- a/index.html +++ b/index.html @@ -49,12 +49,12 @@

GCCIS Flowcharts

Prerequisites: 
-
- Contact Hours:  -
Typically Offered: 
+
+ Contact Hours:  +
diff --git a/js/load.js b/js/load.js index cea08ee..5b1faa3 100644 --- a/js/load.js +++ b/js/load.js @@ -27,8 +27,8 @@ const coursePopupButton = document.getElementById("coursePopupButton"); const coursePopupTitle = document.getElementById("coursePopupTitle"); const coursePopupDescription = document.getElementById("coursePopupDescription"); const coursePopupPrerequisites = document.getElementById("coursePopupPrerequisitesContent"); -const coursePopupContact = document.getElementById("coursePopupContactContent"); const coursePopupOffered = document.getElementById("coursePopupOfferedContent"); +const coursePopupContact = document.getElementById("coursePopupContactContent"); let hyperDictionary = {} // A mapping of hyperParentIds to hyperChildIds to their courseDivs let initialHyperChildIds = {} // A mapping of hyperParentIds to the initial hyperChildIds @@ -632,8 +632,8 @@ function displayCoursePopup(target) { coursePopupTitle.textContent = popupInformation.title; coursePopupDescription.textContent = popupInformation.description; coursePopupPrerequisites.textContent = popupInformation.prerequisites; - coursePopupContact.textContent = popupInformation.contact; coursePopupOffered.textContent = popupInformation.offered; + coursePopupContact.textContent = popupInformation.contact; revealCoursePopup(); return; } @@ -653,8 +653,8 @@ function displayCoursePopup(target) { title: coursePopupTitle.textContent, description: coursePopupDescription.textContent, prerequisites: courseDBInfo.prerequisites ?? "", - contact: courseDBInfo.contact ?? "", - offered: courseDBInfo.offered ?? "" + offered: courseDBInfo.offered ?? "", + contact: courseDBInfo.contact ?? "" } revealCoursePopup(); }); From 69a46975bba6a4480ce9b6d5b58eae611fdeda1a Mon Sep 17 00:00:00 2001 From: NathanRusso Date: Sat, 5 Sep 2026 23:19:49 -0400 Subject: [PATCH 5/5] Removed unneeded lines. --- app.py | 12 +++++++----- js/main.js | 2 -- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app.py b/app.py index 608d37a..ca8abb3 100644 --- a/app.py +++ b/app.py @@ -9,16 +9,18 @@ import os +COURSE_QUERY = ( + "SELECT c.quarter, d.code, c.course, c.credits, c.title, c.description, c.prerequisites, c.typically_offered, c.contact_hours " + "FROM courses c JOIN departments d ON c.department = d.id " + "WHERE d.code = ? AND c.course = ? ORDER BY c.quarter DESC LIMIT 1" +) +""" COURSE_QUERY = ( "SELECT c.quarter, d.code, c.course, c.credits, c.title, c.description " "FROM courses c JOIN departments d ON c.department = d.id " "WHERE d.code = ? AND c.course = ? ORDER BY c.quarter DESC LIMIT 1" ) -#COURSE_QUERY = ( -# "SELECT c.quarter, d.code, c.course, c.credits, c.title, c.description, c.prerequisites, c.typically_offered, c.contact_hours " -# "FROM courses c JOIN departments d ON c.department = d.id " -# "WHERE d.code = ? AND c.course = ? ORDER BY c.quarter DESC LIMIT 1" -#) +""" pool = None # Startup code diff --git a/js/main.js b/js/main.js index 0c7aea7..07c78a9 100644 --- a/js/main.js +++ b/js/main.js @@ -14,7 +14,6 @@ let academicYearCount = 0; // The numbers of years of school currently bein let transferSection = false; // Whether or not the transfer section is visible. let uploadedFilename = null; // The filename of the uploaded file. -const body = document.body; const pageTitle = document.getElementById("pageTitle"); const yearSelect = document.getElementById("yearSelect"); const templateSelect = document.getElementById("templateSelect"); @@ -68,7 +67,6 @@ updateTemplateFlowcharts(yearSelect.value); * @param {string} year - the selected year to view templates form */ async function updateTemplateFlowcharts(year) { - const pastOption = templateSelect.value; // Gets the selected flowchart templateSelect.innerHTML = ""; // Clears the dropdown options // Adds back the empty option