From 833202bb79e9d19b372930b039b3fda60cb147c5 Mon Sep 17 00:00:00 2001 From: Tim Steiner <tsteiner2@unl.edu> Date: Mon, 13 Sep 2010 15:38:15 +0000 Subject: [PATCH] Make the Computer Science department show up in both Arts and Sciences and Engineering colleges in curriculum search. --- .../javascript/courses/public-view/search-box.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/document_root/javascript/courses/public-view/search-box.js b/document_root/javascript/courses/public-view/search-box.js index adefb089..0fb49107 100644 --- a/document_root/javascript/courses/public-view/search-box.js +++ b/document_root/javascript/courses/public-view/search-box.js @@ -55,7 +55,13 @@ function handleChangeSelectHierarchy() var selectedCollegeId = collegeSelect.options[collegeSelect.selectedIndex].value; var options = departmentSelect.getElementsByTagName('option'); for (var i = options.length - 1; i >= 0; i--) { - if (options[i].getAttribute('rel') == selectedCollegeId || collegeSelect.value == 0 || options[i].value == 0) { + // hack to make Computer Science show up in both Arts and Sciences and Engineering + var multiCollegeDepartmentOverride = false; + if (options[i].value == 13 && selectedCollegeId == 2) { + multiCollegeDepartmentOverride = true; + } + + if (options[i].getAttribute('rel') == selectedCollegeId || collegeSelect.value == 0 || options[i].value == 0 || multiCollegeDepartmentOverride) { options[i].style.display = ''; } else { options[i].style.display = 'none'; -- GitLab