Skip to content

Commit

Permalink
Merge pull request #360 from Aspine/recent-activity
Browse files Browse the repository at this point in the history
Recent activity
  • Loading branch information
jshaw-7 authored May 16, 2023
2 parents 6ffadd7 + bbd022d commit c68cb94
Show file tree
Hide file tree
Showing 5 changed files with 127 additions and 82 deletions.
21 changes: 18 additions & 3 deletions public/css/home.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*//////////////////////////////////////////////////////////////////
/* //////////////////////////////////////////////////////////////////
[ FONT ]*/

@font-face {
Expand Down Expand Up @@ -305,8 +305,11 @@ button:hover {
background-color: var(--white3);
}


/* sets attendance as default instead of activity */
#recentAttendance {
display: block;
}
#recentActivity {
display: none;
}

Expand Down Expand Up @@ -495,7 +498,7 @@ button:hover {
to {opacity: 1;}
}
#recent_title {
color: var(--white);
color: white;
display: inline;
position: relative;
font-size: 20px;
Expand Down Expand Up @@ -638,6 +641,12 @@ i.fa.fa-toolbox {
cursor: pointer;
}

#mostRecentTable .tabulator-tableHolder {
height: 100% !important;
max-height: 100% !important;
min-height: 100% !important;
}

#gradesButtons{
height:35px;
display:flex;
Expand All @@ -650,6 +659,12 @@ i.fa.fa-toolbox {
height:35px;
}

#mostRecentTable .tabulator-tableHolder {
height: 100% !important;
max-height: 100% !important;
min-height: 100% !important;
}

#classesTable .tabulator-col,
#classesTable .tabulator-header,
#assignmentsTable .tabulator-col,
Expand Down
20 changes: 11 additions & 9 deletions public/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ <h4 id="title" onclick="openTab('grades')">Aspine</h4>
<button class="tablinks hide switch-exempt" onclick="openSideNav()" id="hamburger_button"><i class="fa fa-bars"></i></button>
<button class="tablinks active" onclick="openTab('grades'); closeSideNav()" id="grades_open">Grades</button>
<button class="tablinks" onclick="openTab('schedule'); closeSideNav()" id="schedule_open">Schedule</button>
<button class="tablinks" onclick="openTab('recent'); closeSideNav()" id="recent_open">Attendance</button>
<button class="tablinks" onclick="openTab('recent'); closeSideNav()" id="recent_open">Attendance & Recent</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>-->
Expand Down Expand Up @@ -204,6 +204,8 @@ <h3 id="import_modal_title">Import Data</h3>
</div>
</div>



<div id="grades" class="tabcontent">

<div id="gradesButtons">
Expand All @@ -220,8 +222,8 @@ <h3 id="import_modal_title">Import Data</h3>
<div id="classesTable"></div>
<div id="mostRecentDiv" style="display:none">
<!-- hide most recent activity; removed from aspen -->
<!-- <h3 align="left">Most Recent Activity:</h3> -->
<div id="mostRecentTable" style="display: none;"></div>
<h3 align="left">Most Recent Activity:</h3>
<div id="mostRecentTable"></div>
</div>
<div id="categoriesTable"></div>

Expand Down Expand Up @@ -310,6 +312,7 @@ <h3 id="stats_modal_title">Modal Title..</h3>

<div id="assignmentsTable"></div>
</div>

<div id="schedule" class="tabcontent">
<!-- Rounded switch -->
<!-- Black/silver switch disabled due to covid-19 schedule -->
Expand Down Expand Up @@ -342,14 +345,13 @@ <h3 id="stats_modal_title">Modal Title..</h3>
<p id="large_clock_period"></p>
</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" style="display: none"></div>
<div id="recentAttendance" style="display: block"></div>
<!-- recentActivity is hidden because Aspen does not display recent assignments -->
<p id="recent_title" class="unselectable">Attendance</p>
</label>
<div id="recentActivity"></div>
<div id="recentAttendance"></div>
</div>
<div id="reports" class="tabcontent">
<div class="pdf_topnav">
Expand Down
17 changes: 0 additions & 17 deletions public/js/extraFunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,6 @@ let classIndex = function(classname) {
// why the mod 8?
}

let classFormatter = function(cell, formatterParams) {
let rowClass = cell.getRow().getData().classname;
let classColor = classColors[classIndex(rowClass)];
let value = cell.getValue();

if (vip_username_list.includes(currentTableData.username)) {
return "<span style='background: -webkit-linear-gradient(left, red, orange, green, blue, purple);-webkit-background-clip: text; -webkit-text-fill-color:transparent; font-weight:bold;'>" + value + "</span>";

}

if (classColor === "black") {
return value;
} else {
return "<span style='color:" + classColor + "; font-weight:bold;'>" + value + "</span>";
}
}

let weightFormatter = function(cell, formatterParams) {
let value = cell.getValue();
let rowColor = cell.getRow().getData().color;
Expand Down
Loading

0 comments on commit c68cb94

Please sign in to comment.