Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide assignments from recent activity and hide "Most Recent Activity" from home page (new) #166

Merged
merged 6 commits into from
Nov 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions public/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@ <h4 id="title">Aspine</h4>

<div class="tab">
<button class="tablinks" onclick="openTab(event, 'grades')" id="default_open">Grades</button>
<button class="tablinks" onclick="openTab(event, 'recent')">Recent Activity</button>
<button class="tablinks" onclick="openTab(event, 'schedule')">Schedule</button>
<button class="tablinks" onclick="openTab(event, 'clock')">Clock</button>
<button class="tablinks" onclick="openTab(event, 'recent')">Attendance</button>
<!--<button class="tablinks" onclick="openTab(event, 'clock')">Clock</button>-->
<!-- TODO: post-covid, setting lunch should be migrated to settings -->
<!--<button class="tablinks" onclick="openTab(event, 'calendar-tab')">Calendar</button>-->
<button class="tablinks" onclick="openTab(event, 'reports')" id="reports_open">Reports</button>
<!--#ifndef lite-->
Expand Down Expand Up @@ -246,8 +247,9 @@ <h3 id="import_modal_title">Import Data</h3>
<div id="grades" class="tabcontent">
<div id="classesTable"></div>
<div id="mostRecentDiv" style="display:none">
<h3 align="left">Most Recent Activity:</h3>
<div id="mostRecentTable"></div>
<!-- hide most recent activity; removed from aspen -->
<!-- <h3 align="left">Most Recent Activity:</h3> -->
<div id="mostRecentTable" style="display: none;"></div>
</div>
<div id="categoriesTable"></div>
<div id="assignmentsTable"></div>
Expand Down Expand Up @@ -301,13 +303,14 @@ <h3>Add Calendar</h3>
</div>
-->
<div id="recent" class="tabcontent">
<label class="switch">
<!-- <label class="switch">
<input type="checkbox" id="recent_toggle" onclick="recent_toggle();">
<span class="slider round"></span>
<p id="recent_title" class="unselectable">Assignments</p>
</label>
<div id="recentActivity"></div>
<div id="recentAttendance"></div>
</label>-->
<div id="recentActivity" style="display: none"></div>
<div id="recentAttendance" style="display: block"></div>
<!-- recentActivity is hidden because Aspen does not display recent assignments -->
</div>
<div id="reports" class="tabcontent">
<div class="pdf_topnav">
Expand Down
13 changes: 10 additions & 3 deletions public/js/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,10 @@ function responseCallback(response, includedTerms) {
if (currentTableData.recent.recentAttendanceArray[i].tardy === "true") {
currentTableData.recent.recentAttendanceArray[i].event += "Tardy ";
}
// addition for COVID
if (currentTableData.recent.recentAttendanceArray[i].code === "VP") {
currentTableData.recent.recentAttendanceArray[i].event += "VP ";
}
}

let activityArray = currentTableData.recent.recentActivityArray.slice();
Expand Down Expand Up @@ -1010,22 +1014,25 @@ function pdfCallback(response) {
generate_pdf(pdf_index);
}
}

// Currently no need for toggle; there are no recent assignments
/*
function recent_toggle() {
if (!document.getElementById("recent_toggle").checked) {
//recentActivity.setData(tableData.recent.recentActivityArray);
recentActivity.setData(tableData.recent.recentActivityArray);
document.getElementById("recentActivity").style.display = "block";
document.getElementById("recentAttendance").style.display = "none";
document.getElementById("recent_title").innerHTML = "Assignments";
recentActivity.redraw();
} else {
}
else {
//recentActivity.setData(tableData.recent.recentAttendanceArray);
document.getElementById("recentActivity").style.display = "none";
document.getElementById("recentAttendance").style.display = "block";
document.getElementById("recent_title").innerHTML = "Attendance";
recentAttendance.redraw();
}
}
*/

function schedule_toggle() {
if (document.getElementById("schedule_toggle").checked) {
Expand Down