-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck_in.html
More file actions
86 lines (73 loc) · 2.54 KB
/
check_in.html
File metadata and controls
86 lines (73 loc) · 2.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<!-- style -->
<style type='text/css'>
html, body{
height: 100%;
}
.msg {
display: flex;
align-items: center;
justify-content: center;
height: calc(100% - 48px);
}
.bottom {
position: fixed;
height: 48px;
left: 0;
right: 0;
bottom: 0px;
}
.bottom .btn {
border-radius: 0px;
}
</style>
<title>บันทึกไทยชนะ</title>
</head>
<body>
<!-- message -->
<div class='msg'>
<h3>กรุณากดปุ่มด้านล่าง</h3>
</div>
<!-- bottom -->
<div class='bottom'>
<a class='btn btn-check-in btn-lg btn-secondary w-100' href='#/'>...</a>
</div>
<!-- bottom scripts -->
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
<!-- app scripts -->
<script src="./thaichana.js"></script>
<script>
// update check-in button
let url = Thaichana.pop_pending_url();
let $btn = $('.bottom a.btn');
if (url) {
$btn.removeClass('btn-secondary');
if (url.indexOf('checkin') > -1) {
$btn.html('เช็คอิน');
$btn.addClass('btn-success');
}
else { // check-out
$btn.html('เช็คเอาท์');
$btn.addClass('btn-warning');
}
}
else {
$btn.html('ถอยกลับ');
}
// bind button
$('.btn-check-in').click(_ => {
if (url) window.open(url, Thaichana.WIN);
location.href = './list.html';
});
</script>
</body>
</html>