Commit 2160f736 authored by Charlie Melidosian's avatar Charlie Melidosian

Fixed finals page+put final schedules in.

parent a8e9f3da
......@@ -109,7 +109,8 @@ gtag('config', 'UA-61705441-2');
<div class="col-md-6" id="schedule-container">
<div id="title-container" class="col-xs-12" style="font-size: 40px;position: relative;">
<h3 class="text-center container-title">Schedule</h3>
<a href="schedule/"><button type="button" style="/* float:left; *//* vertical-align: middle; */position: absolute;left: .5em;top: 50%;transform: translate(0,-50%);" class="btn btn-primary" id="back">Other Schedules</button></a>
<a href="schedule/"><button type="button" style="position: absolute;left: .5em;top: 50%;transform: translate(0,-50%);" class="btn btn-primary" id="back">Daily Schedules</button></a>
<a href="schedule/finals.html"><button type="button" style="position: absolute;right: .5em;top: 50%;transform: translate(0,-50%);" class="btn btn-primary" id="back">Final Schedule</button></a>
</div>
<!-- <h5 class="text-center" id="scheduleLoadingMessage">loading...</h5>-->
<div class="table-responsive" style="width: 100%;" id="currScheduleContainer">
......
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="../css/normalize.css">
<link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../css/animate.css">
<link rel="stylesheet" type="text/css" href="../css/bootstrap-slider.min.css">
<link rel="stylesheet" type="text/css" href="../css/bootstrap-switch.min.css">
<link href='https://fonts.googleapis.com/css?family=Roboto:400,100,900,500|Raleway:400,100' rel='stylesheet' type='text/css'>
<!-- <link rel="stylesheet" type="text/css" href="../css/styles.css"> -->
<link rel="stylesheet" type="text/css" href="../css/schedule.css">
<link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/oljpfipfiljocopmadffodjgkgaiflnl">
<script src="../js/resources/jquery-2.1.4.min.js"></script>
<script src="../js/resources/bootstrap.min.js"></script>
<script src="../js/resources/bootstrap-slider.min.js"></script>
<script src="../js/resources/bootstrap-switch.min.js"></script>
<script src="../js/resources/flowtype.js"></script>
<title>South Schedule</title>
<meta name="title" content="South Schedule">
<meta name="description" content="Realtime bell schedule and class period countdown for Maine South High School">
<meta name="author" content="Philip Melidosian">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="keywords" content="maine, south, mainedb, district, 207, dashboard, Maine Dashboard, time, period, southschedule, South Schedule">
<link rel="icon" href="../img/icon.png">
<link rel="apple-touch-icon" sizes="120x120" href="../img/icon.png">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-61705441-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-61705441-2');
</script>
</head>
<body>
<div id="nav-container" class='container-fluid' style=" z-index: 100">
<div id="brand-container" class="col-xs-12" style="font-size: 40px;position: relative;">
<a href="../"><button type="button" style="/* float:left; *//* vertical-align: middle; */position: absolute;left: .5em;top: 50%;transform: translate(0,-50%);" class="btn btn-primary" id="back">Go Back</button></a>
<p style="text-align:center;"><span style="font-weight:100">SOUTH</span> <span style="font-weight: 400;">SCHEDULE</span></p>
</div>
</div>
<div style="background: #4096EE; padding-bottom: 10px; padding-top: 10px; font-size: 20px;" class="container-fluid" id="clock-container">
<div class="col-md-12 schedule-container" id="schedule-container">
<h3 class="text-center container-title">Finals Week Schedules</h3>
<div class="table-responsive" id="FutureScheduleContainer">
<div id="FutureSchedule" class="table">
<div class="text-center">
<button type="button" class="btn btn-primary" onclick="showSchedule(2)" id="day2">Monday</button>
<button type="button" class="btn btn-primary" onclick="showSchedule(3)" id="day3">Tuesday</button>
<button type="button" class="btn btn-primary" onclick="showSchedule(4)" id="day4">Wednsday</button>
<button type="button" class="btn btn-primary" onclick="showSchedule(5)" id="day5">Thursday</button>
<button type="button" class="btn btn-primary" onclick="showSchedule(6)" id="day6">Friday</button>
</div>
<!-- <p> <i>Note: These schedules are for the regular week days, and do not reflect any "special" days.</i></p> -->
<table id="sched-day-2" class="table" style="display: none;">
<tbody>
<tr>
<td>Office Hours</td>
<td> 7:25</td>
<td> 8:00</td>
</tr>
<tr>
<td> 1</td>
<td> 8:05</td>
<td> 8:55</td>
</tr>
<tr>
<td> 2</td>
<td> 9:00</td>
<td> 9:50</td>
</tr>
<tr>
<td> 3</td>
<td> 9:55</td>
<td> 10:45</td>
</tr>
<tr>
<td> 4</td>
<td> 10:50</td>
<td> 11:40</td>
</tr>
<tr>
<td> 5</td>
<td> 11:45</td>
<td> 12:35</td>
</tr>
<tr>
<td> 6</td>
<td> 12:40</td>
<td>1:30</td>
</tr>
<tr>
<td> 7</td>
<td>1:35</td>
<td>2:25</td>
</tr>
<tr>
<td> 8</td>
<td>2:30</td>
<td>3:20</td>
</tr>
</tbody>
</table>
<table id="sched-day-3" class="table" style="display: none;">
<tbody>
<tr>
<td>Office Hours</td>
<td> 7:25</td>
<td> 8:00</td>
</tr>
<tr>
<td> 1</td>
<td> 8:05</td>
<td> 8:55</td>
</tr>
<tr>
<td> 2</td>
<td> 9:00</td>
<td> 9:50</td>
</tr>
<tr>
<td> 3</td>
<td> 9:55</td>
<td> 10:45</td>
</tr>
<tr>
<td> 4</td>
<td> 10:50</td>
<td> 11:40</td>
</tr>
<tr>
<td> 5</td>
<td> 11:45</td>
<td> 12:35</td>
</tr>
<tr>
<td> 6</td>
<td> 12:40</td>
<td>1:30</td>
</tr>
<tr>
<td> 7</td>
<td>1:35</td>
<td>2:25</td>
</tr>
<tr>
<td> 8</td>
<td>2:30</td>
<td>3:20</td>
</tr>
</tbody>
</table>
<table id="sched-day-4" class="table" style="display: none;">
<tbody>
<tr>
<td>Office Hours</td>
<td> 7:50</td>
<td> 8:00</td>
</tr>
<tr>
<td> 3</td>
<td> 8:05</td>
<td> 9:35</td>
</tr>
<tr>
<td> 2</td>
<td> 9:50</td>
<td> 11:20</td>
</tr>
<tr>
<td> 6</td>
<td> 11:35</td>
<td> 1:05</td>
</tr>
</tbody>
</table>
<table id="sched-day-5" class="table" style="display: none;">
<tbody>
<tr>
<td>Office Hours</td>
<td> 7:50</td>
<td> 8:00</td>
</tr>
<tr>
<td> 5</td>
<td> 8:05</td>
<td> 9:35</td>
</tr>
<tr>
<td> 8</td>
<td> 9:50</td>
<td> 11:20</td>
</tr>
<tr>
<td> 1</td>
<td> 11:35</td>
<td> 1:05</td>
</tr>
</tbody>
</table>
<table id="sched-day-6" class="table" style="display: none;">
<tbody>
<tr>
<td>Office Hours</td>
<td> 7:50</td>
<td> 8:00</td>
</tr>
<tr>
<td> 4</td>
<td> 8:05</td>
<td> 9:35</td>
</tr>
<tr>
<td> 7</td>
<td> 9:50</td>
<td> 11:20</td>
</tr>
<tr>
<td> Make-up (pre approved)</td>
<td> 11:35</td>
<td> 1:05</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="container-fluid" id="footer-container">
<br>
<p class="text-center">Programmed and maintained by Philip (Charlie) Melidosian - Maine South High School class of 2019.</p>
<p class="text-center"> &copy; 2019 All Rights Reserved. </p>
<br>
</div>
</body>
<footer>
<script src="finalscript.js?noCache=1234"></script>
<script>
$(document).ready(
function()
{
window.addEventListener("hashchange", function() { scrollBy(0, -50) });
$("#eventsContainer").hide();
$("#editContainer").hide();
$("#editToggle").click( function() {
$("#editToggle").slideUp();
setTimeout( function() { $("#editContainer").slideDown(); }, 500);
});
}
);
$('#clock-container').addClass('animated slideInDown');
</script>
<script type="text/javascript">
update();
function update()
{
// var parentHeight = $('#clock-container').height();
// var childHeight = $('#clock-content-container').height();
// //$('#clock-content-container').css('margin-top', (parentHeight - childHeight) / 2);
//
// var navWidth = $('#nav-container').width();
// var brandWidth = $('#brand-container').width();
// setTimeout( function() { update();}, 10);
}
</script>
</footer>
</html>
function showSchedule(scheduleNum)
{
for (let i=2; i<7; i++) {
var table = document.getElementById("sched-day-"+i);
table.style.display = "none";
var button = document.getElementById("day"+i);
button.classList.remove("active");
}
var button = document.getElementById("day"+scheduleNum);
if(scheduleNum==1 || scheduleNum ==7)
{
table = document.getElementById("sched-day-"+2);
table.style.display = "table";
var button = document.getElementById("day"+2);
button.classList.add("active");
}
else {
table = document.getElementById("sched-day-"+scheduleNum);
table.style.display = "table";
button.classList.add("active");
}
}
window.onload = function () {
var d = new Date();
var n = d.getDay()
console.log(d);
showSchedule(n+1);
};
......@@ -84,7 +84,7 @@ else if($down)
</div>
</body>
<footer>
<script src="schedulepage.js?noCache=<?php echo md5_file("js/schedulepage.js"); ?>"></script>
<script src="schedulepage.js?noCache=<?php echo md5_file("schedulepage.js"); ?>"></script>
<script>
$(document).ready(
function()
......
......@@ -36,32 +36,36 @@ function addSchedule(type, schedule)
if(type == 0)
{
var table = document.getElementById("currSchedule");
var k=0;
while(table.hasChildNodes())
if(table != null)
{
table.removeChild(table.firstChild);
}
for (let i=0; i<schedule.length; i+=3) {
var row = table.insertRow(k);
var cell1 = row.insertCell(0);
var cell2 = row.insertCell(1);
var cell3 = row.insertCell(2);
cell1.innerHTML = schedule[i];
cell2.innerHTML = converRawTo12(schedule[i+1]);
cell3.innerHTML = converRawTo12(schedule[i+2]);
k++;
var k=0;
console.log(table);
while(table.hasChildNodes())
{
table.removeChild(table.firstChild);
}
for (let i=0; i<schedule.length; i+=3) {
var row = table.insertRow(k);
var cell1 = row.insertCell(0);
var cell2 = row.insertCell(1);
var cell3 = row.insertCell(2);
cell1.innerHTML = schedule[i];
cell2.innerHTML = converRawTo12(schedule[i+1]);
cell3.innerHTML = converRawTo12(schedule[i+2]);
k++;
}
}
}
else if (type>1 && type <7)
{
var table = document.getElementById("FutureSchedule");
var k=0;
// while(table.hasChildNodes())
// {
// table.removeChild(table.firstChild);
// }
table.innerHTML += "<table id='sched-day-"+type+"' class='table'></table>";
table = document.getElementById("sched-day-"+type);
while(table.hasChildNodes()) //fixed issue with repeating schedule on Tuesday and Wednsday
{
table.removeChild(table.firstChild);
}
schedule = schedule.slice(schedule.indexOf(",[")+2,schedule.length-1);
schedule = schedule.split(",");
for (let i=0; i<schedule.length; i+=3) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment