From d7847bafd78f7a0141d0fb660aa02940153df99c Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Mon, 16 Oct 2023 13:49:47 -0500 Subject: [PATCH] Remove the javascript for the "Site Description" buttons. We removed the "Site Description" buttons, but the javascript was left. It is still loaded on some pages even though it is not actually used. --- htdocs/js/ShowHide/show_hide.js | 10 ---------- .../Instructor/AchievementList.html.ep | 1 - .../ContentGenerator/Instructor/ProblemSetList.html.ep | 1 - .../ContentGenerator/Instructor/ShowAnswers.html.ep | 6 ------ templates/ContentGenerator/Instructor/UserList.html.ep | 1 - 5 files changed, 19 deletions(-) delete mode 100644 htdocs/js/ShowHide/show_hide.js diff --git a/htdocs/js/ShowHide/show_hide.js b/htdocs/js/ShowHide/show_hide.js deleted file mode 100644 index 0604716470..0000000000 --- a/htdocs/js/ShowHide/show_hide.js +++ /dev/null @@ -1,10 +0,0 @@ -/* This Javascript attaches the proper event handler to the "Show/Hide Description" button */ - -(() => { - const showHide = document.getElementById('show_hide'); - showHide?.addEventListener('click', () => { - const description = document.getElementById("site_description"); - if (description.style.display === "none") description.style.display = "block"; - else description.style.display = "none"; - }); -})(); diff --git a/templates/ContentGenerator/Instructor/AchievementList.html.ep b/templates/ContentGenerator/Instructor/AchievementList.html.ep index e058d9b466..6b9c8218b2 100644 --- a/templates/ContentGenerator/Instructor/AchievementList.html.ep +++ b/templates/ContentGenerator/Instructor/AchievementList.html.ep @@ -1,7 +1,6 @@ % use WeBWorK::Utils qw(getAssetURL); % % content_for js => begin - <%= javascript getAssetURL($ce, 'js/ShowHide/show_hide.js'), defer => undef =%> <%= javascript getAssetURL($ce, 'js/ActionTabs/actiontabs.js'), defer => undef =%> <%= javascript getAssetURL($ce, 'js/SelectAll/selectall.js'), defer => undef =%> % end diff --git a/templates/ContentGenerator/Instructor/ProblemSetList.html.ep b/templates/ContentGenerator/Instructor/ProblemSetList.html.ep index 2175be00c8..1a5aab50d8 100644 --- a/templates/ContentGenerator/Instructor/ProblemSetList.html.ep +++ b/templates/ContentGenerator/Instructor/ProblemSetList.html.ep @@ -20,7 +20,6 @@ <%= javascript getAssetURL($ce, 'js/DatePicker/datepicker.js'), defer => undef =%> <%= javascript getAssetURL($ce, 'js/ActionTabs/actiontabs.js'), defer => undef =%> <%= javascript getAssetURL($ce, 'js/ProblemSetList/problemsetlist.js'), defer => undef =%> - <%= javascript getAssetURL($ce, 'js/ShowHide/show_hide.js'), defer => undef =%> <%= javascript getAssetURL($ce, 'js/SelectAll/selectall.js'), defer => undef =%> % end % diff --git a/templates/ContentGenerator/Instructor/ShowAnswers.html.ep b/templates/ContentGenerator/Instructor/ShowAnswers.html.ep index 299757987f..4c091d1ab0 100644 --- a/templates/ContentGenerator/Instructor/ShowAnswers.html.ep +++ b/templates/ContentGenerator/Instructor/ShowAnswers.html.ep @@ -1,9 +1,3 @@ -% use WeBWorK::Utils qw(getAssetURL); -% -% content_for js => begin - <%= javascript getAssetURL($ce, 'js/ShowHide/show_hide.js'), defer => undef =%> -% end -% % unless ($authz->hasPermissions(param('user'), 'view_answers')) {
<%= maketext('You are not authorized to view past answers') %>
% last; diff --git a/templates/ContentGenerator/Instructor/UserList.html.ep b/templates/ContentGenerator/Instructor/UserList.html.ep index 320e6882a6..9c4a1d75ff 100644 --- a/templates/ContentGenerator/Instructor/UserList.html.ep +++ b/templates/ContentGenerator/Instructor/UserList.html.ep @@ -1,7 +1,6 @@ % use WeBWorK::Utils qw(getAssetURL); % % content_for js => begin - <%= javascript getAssetURL($ce, 'js/ShowHide/show_hide.js'), defer => undef =%> <%= javascript getAssetURL($ce, 'js/ActionTabs/actiontabs.js'), defer => undef =%> <%= javascript getAssetURL($ce, 'js/UserList/userlist.js'), defer => undef =%> <%= javascript getAssetURL($ce, 'js/SelectAll/selectall.js'), defer => undef =%>