2021-09-10 07:30:39 -07:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html>
|
|
|
|
|
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8">
|
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
2021-09-24 22:31:36 -07:00
|
|
|
|
<title>Homeroom 班級 ({{homeroomCode[0]}}{{homeroomCode[1]}}) - Attendance 點名</title>
|
2021-09-10 07:30:39 -07:00
|
|
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/css/bootstrap.min.css" rel="stylesheet"
|
|
|
|
|
integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">
|
|
|
|
|
<link rel="stylesheet" href="/static/allpages.css">
|
2021-09-12 02:39:09 -07:00
|
|
|
|
<link rel="stylesheet" href="/static/homeroom.css">
|
2021-09-18 04:26:06 -07:00
|
|
|
|
<link rel="shortcut icon" type="image/x-icon" href="/static/favicon.ico" />
|
|
|
|
|
<!-- Global site tag (gtag.js) - Google Analytics -->
|
|
|
|
|
<script async src="https://www.googletagmanager.com/gtag/js?id=G-H6D61RSBHR"></script>
|
|
|
|
|
<script>
|
|
|
|
|
window.dataLayer = window.dataLayer || [];
|
|
|
|
|
function gtag() { dataLayer.push(arguments); }
|
|
|
|
|
gtag('js', new Date());
|
|
|
|
|
|
|
|
|
|
gtag('config', 'G-H6D61RSBHR');
|
|
|
|
|
</script>
|
|
|
|
|
|
2021-09-10 07:30:39 -07:00
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
<body>
|
2021-09-26 06:37:34 -07:00
|
|
|
|
<div class="showTime"><span id="showTime"></span></div>
|
2021-09-10 07:30:39 -07:00
|
|
|
|
<div class="container">
|
2021-09-18 04:26:06 -07:00
|
|
|
|
<h1 class="margin-top">Homeroom View | 班級主頁</h1>
|
|
|
|
|
<h2 class="margin-top">{{homeroomCode[0]}}{{homeroomCode[1]}}</h2>
|
|
|
|
|
<h2>[{{currDate}}]</h2>
|
|
|
|
|
<a href="/logout"><button class="btn btn-primary logout margin-top">Logout 登出</button></a>
|
2021-10-03 07:33:53 -07:00
|
|
|
|
<a href="/select"><button class="btn btn-primary margin-top logout">Choose Subuser 選擇其他帳號</button></a>
|
2021-09-10 07:30:39 -07:00
|
|
|
|
<form action="/manage/date" id="dateSelForm" method="post">
|
2021-09-18 04:26:06 -07:00
|
|
|
|
<select name="date" id="date" class="form-select logout" onchange="chgDate();">
|
2021-09-12 02:39:09 -07:00
|
|
|
|
{% for date in absData %}
|
2021-09-10 07:30:39 -07:00
|
|
|
|
{% if date == currDate %}
|
|
|
|
|
<option value="{{date}}" selected="selected">{{date}}</option>
|
|
|
|
|
{% else %}
|
|
|
|
|
<option value="{{date}}">{{date}}</option>
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</select>
|
|
|
|
|
</form>
|
|
|
|
|
<form action="/manage/homeroom_confirm" id="homeroom_confirm" method="post">
|
|
|
|
|
<input type="hidden" name="date" value="{{currDate}}">
|
2021-09-12 02:39:09 -07:00
|
|
|
|
<input type="hidden" name="homeroom" value="{{homeroomCode[0]}}^{{homeroomCode[1]}}">
|
|
|
|
|
<input type="hidden" id="hrCfrm-sign" name="signatureData" value="">
|
2021-10-07 01:27:32 -07:00
|
|
|
|
<input type="hidden" id="hrCfrm-notes" name="notes" value="">
|
2021-09-10 07:30:39 -07:00
|
|
|
|
</form>
|
|
|
|
|
<div class="col">
|
2021-09-13 07:42:12 -07:00
|
|
|
|
<div class="sticky-top" style="background-color:white;">
|
|
|
|
|
<div class="row title">
|
2021-09-18 04:26:06 -07:00
|
|
|
|
<div class="col">班級</div>
|
|
|
|
|
<div class="col">座號</div>
|
|
|
|
|
<div class="col">姓名</div>
|
|
|
|
|
<div class="col">英文姓名</div>
|
2021-09-13 07:42:12 -07:00
|
|
|
|
{% for i in periods %}
|
|
|
|
|
<div class="col" {% if currPeriod==i %} style="background-color: #ffdf81;" {% endif %}>{{i}}</div>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row title">
|
|
|
|
|
<div class="col"></div>
|
|
|
|
|
<div class="col"></div>
|
|
|
|
|
<div class="col"></div>
|
|
|
|
|
<div class="col"></div>
|
|
|
|
|
{% for i in periods %}
|
|
|
|
|
<div class="col" {% if currPeriod==i %} style="background-color: #ffdf81;" {% endif %}>
|
|
|
|
|
{{absData[currDate][i]['name']}}</div>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row title">
|
|
|
|
|
<div class="col"></div>
|
|
|
|
|
<div class="col"></div>
|
|
|
|
|
<div class="col"></div>
|
|
|
|
|
<div class="col"></div>
|
|
|
|
|
{% for i in periods %}
|
|
|
|
|
<div class="col" {% if currPeriod==i %} style="background-color: #ffdf81;" {% endif %}>
|
|
|
|
|
{{absData[currDate][i]['teacher']}}</div>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</div>
|
2021-09-10 07:30:39 -07:00
|
|
|
|
</div>
|
2021-09-12 02:39:09 -07:00
|
|
|
|
{% for i in homeroomData %}
|
2021-09-10 07:30:39 -07:00
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col">{{homeroomCode[0]}}{{homeroomCode[1]}}</div>
|
|
|
|
|
<div class="col">{{i}}</div>
|
2021-09-12 02:39:09 -07:00
|
|
|
|
<div class="col">{{ homeroomData[i]['name'] }}</div>
|
|
|
|
|
<div class="col">{{ homeroomData[i]['eng_name'] }}</div>
|
|
|
|
|
{% for j in periods %}
|
2021-09-12 06:59:31 -07:00
|
|
|
|
<div class="col" {% if currPeriod==j %} style="background-color: #ffdf81;" {% endif %}>
|
|
|
|
|
{% if 'signature' in absData[currDate][j] %}
|
|
|
|
|
{% if i in absData[currDate][j] %}
|
2021-09-13 07:42:12 -07:00
|
|
|
|
{% if absData[currDate][j][i] == 1 %}
|
2021-09-12 02:39:09 -07:00
|
|
|
|
<p class="highlightAbs n-2">X</p>
|
2021-09-12 06:59:31 -07:00
|
|
|
|
{% else %}
|
2021-09-18 07:04:31 -07:00
|
|
|
|
<p class="highlightAbs n-3">𝜑</p>
|
2021-09-13 07:42:12 -07:00
|
|
|
|
{% endif %}
|
|
|
|
|
{% else %}
|
2021-09-12 06:59:31 -07:00
|
|
|
|
{% if absData[currDate][j]['name'] != 'GP' %}
|
2021-09-12 02:39:09 -07:00
|
|
|
|
<p class="highlightAbs n-1">V</p>
|
2021-09-12 06:59:31 -07:00
|
|
|
|
{% else %}
|
|
|
|
|
{% if (homeroomData[i]['GP_Class'][absData[currDate][j]['teacher']] in
|
|
|
|
|
absData[currDate][j]['signature'])%}
|
2021-09-12 02:39:09 -07:00
|
|
|
|
<p class="highlightAbs n-1">V</p>
|
2021-09-12 06:59:31 -07:00
|
|
|
|
{% else %}
|
2021-09-12 02:39:09 -07:00
|
|
|
|
<p class="highlightAbs n-2"></p>
|
2021-09-12 06:59:31 -07:00
|
|
|
|
{% endif %}
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% elif absData[currDate][j]['name'] == 'GP' %}
|
2021-09-12 02:39:09 -07:00
|
|
|
|
<p class="highlightAbs"></p>
|
2021-09-12 06:59:31 -07:00
|
|
|
|
{% else %}
|
2021-09-12 02:39:09 -07:00
|
|
|
|
{% if 'confirm' in absData[currDate] %}
|
|
|
|
|
<p class="highlightAbs"></p>
|
|
|
|
|
{% else %}
|
2021-09-13 07:42:12 -07:00
|
|
|
|
<input type="checkbox" class="tobeform 2^{{j}}^{{i}} late" id="late^{{j}}^{{i}}"
|
|
|
|
|
onchange="unCheckAbs('{{j}}^{{i}}')">
|
|
|
|
|
<input type="checkbox" class="tobeform 1^{{j}}^{{i}} absent" id="absent^{{j}}^{{i}}"
|
|
|
|
|
onchange="unCheckLate('{{j}}^{{i}}')">
|
2021-09-12 02:39:09 -07:00
|
|
|
|
{% endif %}
|
2021-09-13 07:42:12 -07:00
|
|
|
|
<!-- <input type="checkbox" class="tobeform {{j}}^{{i}}"> -->
|
2021-09-12 06:59:31 -07:00
|
|
|
|
{% endif %}
|
2021-09-12 02:39:09 -07:00
|
|
|
|
</div>
|
|
|
|
|
{% endfor %}
|
2021-09-10 07:30:39 -07:00
|
|
|
|
</div>
|
|
|
|
|
{% endfor %}
|
2021-09-12 02:39:09 -07:00
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col"></div>
|
|
|
|
|
<div class="col"></div>
|
|
|
|
|
<div class="col"></div>
|
|
|
|
|
<div class="col"></div>
|
|
|
|
|
{% for i in periods %}
|
2021-09-12 06:59:31 -07:00
|
|
|
|
<div class="col" {% if currPeriod==i %} style="background-color: #ffdf81;" {% endif %}>
|
2021-09-12 02:39:09 -07:00
|
|
|
|
{% if ('signature' in absData[currDate][i] or absData[currDate][i]['name'] == 'GP' or
|
|
|
|
|
'confirm' in absData[currDate]) %}
|
|
|
|
|
<button class="btn btn-primary afterSelButton" disabled="disabled"
|
2021-09-12 06:59:31 -07:00
|
|
|
|
onclick="afterSelAbs('{{i|string}}')"></button>
|
2021-09-12 02:39:09 -07:00
|
|
|
|
{% else %}
|
|
|
|
|
<button class="btn btn-primary afterSelButton"
|
2021-09-12 06:59:31 -07:00
|
|
|
|
onclick="afterSelAbs('{{i|string}}')">Confirm<br>{{absData[currDate][i]['name']}}</button>
|
2021-09-12 02:39:09 -07:00
|
|
|
|
{% endif %}
|
|
|
|
|
</div>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</div>
|
|
|
|
|
<form action="/manage/homeroom_abs" id="postHomeroomAbs" hidden="hidden" method="post">
|
|
|
|
|
<input type="text" id="HR-date" name="date" value="{{currDate}}">
|
|
|
|
|
<input type="text" id="HR-period" name="period" value="">
|
|
|
|
|
<input type="text" id="HR-signatureData" name="signatureData" value="">
|
2021-09-14 02:49:16 -07:00
|
|
|
|
<input type="text" id="HR-notes" name="notes" value="">
|
2021-09-12 02:39:09 -07:00
|
|
|
|
<input type="text" id="HR-homeroom" name="homeroom" value="{{homeroomCode[0]}}^{{homeroomCode[1]}}">
|
|
|
|
|
</form>
|
|
|
|
|
{% if 'confirm' in absData[currDate] %}
|
|
|
|
|
<button class="btn btn-primary margin-top afterSelButton" onclick="homeroomCfrm()" disabled="disabled">
|
2021-09-14 07:55:11 -07:00
|
|
|
|
Homeroom Teacher Already Confirmed | 班導已確認</button>
|
2021-09-12 02:39:09 -07:00
|
|
|
|
{% else %}
|
|
|
|
|
<button class="btn btn-primary margin-top afterSelButton" onclick="homeroomCfrm()">Homeroom
|
2021-09-15 04:30:09 -07:00
|
|
|
|
Teacher Confirm | 班導確認</button>
|
2021-09-10 07:30:39 -07:00
|
|
|
|
{% endif %}
|
2021-09-12 02:39:09 -07:00
|
|
|
|
<div id="finalCheck" hidden="hidden">
|
2021-09-12 07:21:10 -07:00
|
|
|
|
<!-- show warning -->
|
2021-09-18 07:04:31 -07:00
|
|
|
|
<div class="alert alert-warning margin-top" id="allPresentWarning" role="alert" hidden="hidden">
|
2021-09-12 07:21:10 -07:00
|
|
|
|
<h4 class="alert-heading">請確認是否全班全到!Please check if everyone is present!</h4>
|
|
|
|
|
</div>
|
2021-09-18 07:04:31 -07:00
|
|
|
|
<h3 class="margin-top">Please Sign Below 請在下方簽名<br>
|
2021-09-12 06:59:31 -07:00
|
|
|
|
Period: <span id="showSignPeriod"></span> <br>
|
|
|
|
|
Subject: <span id="showSignSubjectName"></span>
|
|
|
|
|
</h3>
|
2021-09-12 02:39:09 -07:00
|
|
|
|
<div class="forSign"><canvas id="signature_pad"></canvas></div>
|
2021-09-18 07:04:31 -07:00
|
|
|
|
<h3 class="margin-top">Notes 備註欄</h3>
|
2021-09-14 02:49:16 -07:00
|
|
|
|
<input type="textarea" class="form-control" name="notes" id="subjectNotes"
|
|
|
|
|
placeholder="Enter Notes 請輸入備註" style="width: 80%; margin-left: 10%;" row="3">
|
2021-09-18 07:04:31 -07:00
|
|
|
|
<button class="btn btn-secondary margin-top" type="button" onclick="signaturePad.clear()">Clear
|
|
|
|
|
Signature 清除簽名</button>
|
|
|
|
|
<button class="btn btn-primary margin-top" type="button" onclick="submitForm()">Submit 提交</button>
|
2021-09-12 02:39:09 -07:00
|
|
|
|
</div>
|
|
|
|
|
{% for c in range(periods|length + 1) %}
|
2021-09-14 02:49:16 -07:00
|
|
|
|
{% if c % 4 == 0 %}
|
2021-09-10 07:30:39 -07:00
|
|
|
|
<div class="row signatures">
|
|
|
|
|
{% endif %}
|
|
|
|
|
<div class="col half">
|
2021-09-12 02:39:09 -07:00
|
|
|
|
{% if c == 0 %}
|
2021-10-05 04:22:23 -07:00
|
|
|
|
<div class="row needborder">Homeroom Teacher 導師</div>
|
2021-09-16 06:19:10 -07:00
|
|
|
|
{% if 'confirm' in absData[currDate] %}
|
2021-09-12 02:39:09 -07:00
|
|
|
|
<div class="row"><img src="{{absData[currDate]['confirm']}}" alt=""></div>
|
2021-10-07 01:27:32 -07:00
|
|
|
|
<div class="row">備註: {{absData[currDate]['notes']}}</div>
|
2021-09-12 02:39:09 -07:00
|
|
|
|
{% else %}
|
2021-09-16 06:19:10 -07:00
|
|
|
|
<div class="row"><span style="color:red;">No Signature 導師尚未簽名</span></div>
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% else %}
|
2021-09-12 02:39:09 -07:00
|
|
|
|
{% if absData[currDate][periods[c-1]]['name'] == 'GP' %}
|
|
|
|
|
{% if 'signature' in absData[currDate][periods[c-1]] %}
|
|
|
|
|
{% for i in absData[currDate][periods[c-1]]['signature'] %}
|
2021-10-05 04:22:23 -07:00
|
|
|
|
<div class="row needborder">{{periods[c-1]}}: {{absData[currDate][periods[c-1]]['teacher']}}: {{i}}:
|
2021-09-16 06:19:10 -07:00
|
|
|
|
{{absData[currDate][periods[c-1]]['names'][i]}}</div>
|
2021-10-05 04:22:23 -07:00
|
|
|
|
<div class="row"><img src="{{absData[currDate][periods[c-1]]['signature'][i]}}" alt="">
|
|
|
|
|
{% if loop.index == loop.length %}
|
|
|
|
|
<br>備註: {{absData[currDate][periods[c-1]]['notes']}}
|
|
|
|
|
{% endif %}
|
|
|
|
|
</div>
|
2021-09-12 02:39:09 -07:00
|
|
|
|
{% endfor %}
|
|
|
|
|
{% else %}
|
2021-10-05 04:22:23 -07:00
|
|
|
|
<div class="row needborder">{{periods[c-1]}}: {{absData[currDate][periods[c-1]]['teacher']}}: No
|
|
|
|
|
Signature
|
2021-09-12 02:39:09 -07:00
|
|
|
|
</div>
|
|
|
|
|
<div class="row"></div>
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% else %}
|
2021-10-05 04:22:23 -07:00
|
|
|
|
<div class="row needborder">{{periods[c-1]}}: {{absData[currDate][periods[c-1]]['name']}}:
|
2021-09-12 02:39:09 -07:00
|
|
|
|
{{absData[currDate][periods[c-1]]['teacher']}}
|
2021-09-10 07:30:39 -07:00
|
|
|
|
</div>
|
2021-09-14 02:49:16 -07:00
|
|
|
|
<div class="row"><img src="{{absData[currDate][periods[c-1]]['signature']}}" alt=""><br>備註:
|
|
|
|
|
{{absData[currDate][periods[c-1]]['notes']}}</div>
|
2021-09-12 02:39:09 -07:00
|
|
|
|
{% endif %}
|
|
|
|
|
{% endif %}
|
2021-09-10 07:30:39 -07:00
|
|
|
|
</div>
|
2021-09-14 02:49:16 -07:00
|
|
|
|
{% if c % 4 == 3 %}
|
2021-09-10 07:30:39 -07:00
|
|
|
|
</div>
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/signature_pad@2.3.2/dist/signature_pad.min.js"></script>
|
2021-09-12 02:44:27 -07:00
|
|
|
|
<script type="text/javascript" src="/static/jquery.min.js"></script>
|
2021-09-10 07:30:39 -07:00
|
|
|
|
<div id="loading" style="text-align:center; width:100%; display:none;"><img src="/static/loading.gif" alt=""
|
|
|
|
|
style="height:100%;" />
|
|
|
|
|
</div>
|
2021-09-24 22:31:36 -07:00
|
|
|
|
{% include 'footer.html' %}
|
2021-09-10 07:30:39 -07:00
|
|
|
|
<script>
|
2021-09-12 02:39:09 -07:00
|
|
|
|
var signaturePad, hrCfrm = false;
|
2021-09-23 03:04:18 -07:00
|
|
|
|
var width = $(window).width();
|
2021-09-12 06:59:31 -07:00
|
|
|
|
var periodData = {}
|
|
|
|
|
{% for i in periods %}
|
|
|
|
|
periodData['{{i}}'] = '{{ absData[currDate][i]['name'] }}'
|
|
|
|
|
{% endfor %}
|
|
|
|
|
|
2021-09-10 07:30:39 -07:00
|
|
|
|
function loadingAnimation() {
|
|
|
|
|
$('.container').hide();
|
|
|
|
|
$('#loading').show();
|
|
|
|
|
}
|
|
|
|
|
function chgDate() {
|
|
|
|
|
loadingAnimation();
|
|
|
|
|
document.getElementById('dateSelForm').submit();
|
|
|
|
|
}
|
2021-09-12 02:39:09 -07:00
|
|
|
|
function submitForm() {
|
|
|
|
|
if (!signaturePad.isEmpty()) {
|
|
|
|
|
loadingAnimation()
|
|
|
|
|
signaturePad.off();
|
|
|
|
|
var data = signaturePad.toDataURL('image/png');
|
|
|
|
|
if (hrCfrm) {
|
|
|
|
|
$('#hrCfrm-sign').val(data);
|
2021-10-07 01:27:32 -07:00
|
|
|
|
$('#hrCfrm-notes').val($('#subjectNotes').val());
|
2021-09-12 02:39:09 -07:00
|
|
|
|
document.getElementById('homeroom_confirm').submit()
|
|
|
|
|
} else {
|
2021-09-14 02:49:16 -07:00
|
|
|
|
var notes = $('#subjectNotes').val();
|
2021-09-12 02:39:09 -07:00
|
|
|
|
document.getElementById('HR-signatureData').value = data;
|
2021-09-14 02:49:16 -07:00
|
|
|
|
document.getElementById('HR-notes').value = notes;
|
2021-09-12 02:39:09 -07:00
|
|
|
|
document.getElementById('postHomeroomAbs').submit();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
alert("Please sign first");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function showSignaturePad() {
|
|
|
|
|
$('#finalCheck').removeAttr('hidden');
|
|
|
|
|
var canvas = document.getElementById("signature_pad");
|
|
|
|
|
signaturePad = new SignaturePad(canvas);
|
2021-09-23 03:04:18 -07:00
|
|
|
|
width = $(window).width();
|
2021-09-12 02:39:09 -07:00
|
|
|
|
function resizeCanvas() {
|
|
|
|
|
var ratio = Math.max(window.devicePixelRatio || 1, 1);
|
|
|
|
|
canvas.width = canvas.offsetWidth * ratio;
|
|
|
|
|
canvas.height = canvas.offsetHeight * ratio;
|
|
|
|
|
canvas.getContext("2d").scale(ratio, ratio);
|
|
|
|
|
signaturePad.clear(); // otherwise isEmpty() might return incorrect value
|
|
|
|
|
}
|
2021-09-23 03:04:18 -07:00
|
|
|
|
window.addEventListener("resize", () => {
|
|
|
|
|
if (width != $(window).width()) {
|
|
|
|
|
resizeCanvas();
|
|
|
|
|
width = $(window).width();
|
|
|
|
|
}
|
|
|
|
|
});
|
2021-09-12 02:39:09 -07:00
|
|
|
|
resizeCanvas();
|
2021-10-07 07:03:30 -07:00
|
|
|
|
$('html,body').unbind().animate({ scrollTop: $("#finalCheck").offset().top - $(".sticky-top").outerHeight() - 10 }, 'slow');
|
2021-09-12 02:39:09 -07:00
|
|
|
|
}
|
|
|
|
|
function afterSelAbs(period) {
|
|
|
|
|
var tobeformArr = [];
|
2021-09-13 07:42:12 -07:00
|
|
|
|
$('#postHomeroomAbs #HR-period').attr('value', period);
|
2021-09-12 02:39:09 -07:00
|
|
|
|
$('.tobeform').attr('disabled', 'disabled');
|
|
|
|
|
$('.afterSelButton').attr('disabled', 'disabled');
|
2021-09-12 06:59:31 -07:00
|
|
|
|
$('#showSignPeriod').text(period);
|
|
|
|
|
$('#showSignSubjectName').text(periodData[period]);
|
2021-09-12 07:21:10 -07:00
|
|
|
|
var cnt = 0;
|
2021-09-12 02:39:09 -07:00
|
|
|
|
$('.tobeform').each(function (i, obj) {
|
2021-09-13 07:42:12 -07:00
|
|
|
|
if ($(this).attr('class').split(' ')[1].split('^')[1] == period &&
|
2021-09-12 02:39:09 -07:00
|
|
|
|
$(this).is(":checked")) {
|
2021-09-12 07:21:10 -07:00
|
|
|
|
cnt++;
|
2021-09-13 07:42:12 -07:00
|
|
|
|
$('#postHomeroomAbs').append('<input type="checkbox" name="' + $(this).attr('class').split(' ')[1].split('^')[0] + '^'
|
|
|
|
|
+ $(this).attr('class').split(' ')[1].split('^')[2]
|
2021-09-12 02:39:09 -07:00
|
|
|
|
+ '" checked="checked">');
|
|
|
|
|
}
|
|
|
|
|
});
|
2021-09-12 07:21:10 -07:00
|
|
|
|
if (cnt == 0) {
|
|
|
|
|
$('#allPresentWarning').removeAttr('hidden');
|
|
|
|
|
}
|
2021-09-12 02:39:09 -07:00
|
|
|
|
// show signature pad
|
|
|
|
|
showSignaturePad()
|
|
|
|
|
}
|
|
|
|
|
function homeroomCfrm() {
|
|
|
|
|
hrCfrm = true;
|
2021-09-12 05:15:19 -07:00
|
|
|
|
$('.tobeform').attr('disabled', 'disabled');
|
|
|
|
|
$('.afterSelButton').attr('disabled', 'disabled');
|
2021-09-12 02:39:09 -07:00
|
|
|
|
showSignaturePad();
|
|
|
|
|
}
|
2021-09-13 07:42:12 -07:00
|
|
|
|
function unCheckLate(string) {
|
|
|
|
|
document.getElementById('late^' + string).checked = false;
|
|
|
|
|
}
|
|
|
|
|
function unCheckAbs(string) {
|
|
|
|
|
document.getElementById('absent^' + string).checked = false;
|
|
|
|
|
}
|
2021-09-10 07:30:39 -07:00
|
|
|
|
</script>
|
2021-09-18 07:04:31 -07:00
|
|
|
|
<script src="/static/time.js"></script>
|
2021-09-10 07:30:39 -07:00
|
|
|
|
</body>
|
|
|
|
|
|
|
|
|
|
</html>
|