forked from Belikhun/ctms-plus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
152 lines (133 loc) · 6.5 KB
/
index.html
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="manifest" href="manifest.json">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CTMS+</title>
<!-- Load Library First -->
<link rel="stylesheet" type="text/css" media="screen" href="assets/css/default.css" />
<link rel="stylesheet" type="text/css" media="screen" href="assets/css/progressBar.css" />
<link rel="stylesheet" type="text/css" media="screen" href="assets/css/button.css" />
<link rel="stylesheet" type="text/css" media="screen" href="assets/css/input.css" />
<link rel="stylesheet" type="text/css" media="screen" href="assets/css/textView.css" />
<link rel="stylesheet" type="text/css" media="screen" href="assets/css/table.css" />
<link rel="stylesheet" type="text/css" media="screen" href="assets/css/switch.css" />
<link rel="stylesheet" type="text/css" media="screen" href="assets/css/slider.css" />
<link rel="stylesheet" type="text/css" media="screen" href="assets/css/navbar.css" />
<link rel="stylesheet" type="text/css" media="screen" href="assets/css/smenu.css" />
<link rel="stylesheet" type="text/css" media="screen" href="assets/css/wavec.css" />
<link rel="stylesheet" type="text/css" media="screen" href="assets/css/spinner.css" />
<link rel="stylesheet" type="text/css" media="screen" href="assets/css/scrollbar.css" />
<link rel="stylesheet" type="text/css" media="screen" href="static/css/splash.css" />
<!-- Page Style -->
<link rel="stylesheet" type="text/css" media="screen" href="static/css/core.css" />
<link rel="stylesheet" type="text/css" media="screen" href="static/css/screens/home.css" />
<link rel="stylesheet" type="text/css" media="screen" href="static/css/screens/results.css" />
<link rel="stylesheet" type="text/css" media="screen" href="static/css/screens/schedule.css" />
<link rel="stylesheet" type="text/css" media="screen" href="static/css/screens/subscribe.css" />
<link rel="stylesheet" type="text/css" media="screen" href="static/css/screens/tests.css" />
<link rel="stylesheet" type="text/css" media="screen" href="static/css/dark.css" />
<!-- Fonts -->
<link rel="stylesheet" type="text/css" media="screen" href="assets/fonts/calibri/calibri.css" />
<link rel="stylesheet" type="text/css" media="screen" href="assets/fonts/opensans/opensans.css" />
<link rel="stylesheet" type="text/css" media="screen" href="assets/fonts/nunito/nunito.css" />
<link rel="stylesheet" type="text/css" media="screen" href="assets/fonts/consolas/consolas.css" />
<link rel="stylesheet" type="text/css" media="screen" href="assets/fonts/fontawesome/fontawesome.css" />
</head>
<body>
<!--
Load Important Library, Draw Splash Screen
Initialize CTMS+ Core
-->
<script src="assets/js/belibrary.js" type="text/javascript"></script>
<script src="assets/js/errorHandler.js" type="text/javascript"></script>
<script type="text/javascript" src="static/js/splash.js"></script>
<script type="text/javascript">
const mainSplash = new Splash({
container: document.body,
name: "CTMS+",
icon: "assets/img/icon.png"
});
mainSplash.onInit(async (set) => {
set({ p: 0, m: "main", d: "Initializing CTMS+ Core" });
await core.init(set);
});
mainSplash.onPostInit(async (set) => {
set({ p: 0, m: "main", d: "Sending Analytics Data" });
gtag("event", "pageView", {
event_category: "load",
event_label: "scriptInitialized",
send_to: "default",
event_callback: () => clog("INFO", "Analytics data sent!")
});
set({ p: 100, m: "main", d: "Sending Analytics Data" });
});
mainSplash.onError(async (error, code, description, stack) => {
if (cookie.get("splashInitSuccess", true) === "false")
if (popup.initialized) {
let errorLines = [`[${code}] >>> ${description}`]
if (stack.length > 0)
errorLines = [ ...errorLines, "", "Stack Trace:", ...stack ]
let errorBox = document.createElement("ul");
errorBox.classList.add("textView", "breakWord");
errorBox.innerHTML = errorLines.map(i => `<li>${i}</li>`).join("");
let action = await popup.show({
windowTitle: "Init Exception Handler",
title: "Toang rồi ông Giáo ạ!",
message: "Một Lỗi Không Mong Muốn Đã Xảy Ra",
description: "Hãy thử <b>tải lại</b> trang hoặc sử dụng thông tin dưới đây để gửi một báo cáo lỗi:",
level: "error",
customNode: errorBox,
buttonList: {
report: {
text: "Báo lỗi",
color: "pink",
resolve: false,
onClick: () => window.open(SERVER.REPORT_ERROR, "_blank")
},
reload: { text: "Tải lại", color: "blue" },
close: { text: "Đóng", color: "dark" }
}
})
switch (action) {
case "reload":
location.reload();
break;
}
} else
alert(error);
});
</script>
<div id="container">
<div id="navbar"></div>
<div id="userSettings"></div>
<div id="content">
</div>
</div>
<!-- Library -->
<script src="assets/js/sounds.js" type="text/javascript"></script>
<script src="assets/js/tooltip.js" type="text/javascript"></script>
<script src="assets/js/scrollable.js" type="text/javascript"></script>
<script src="assets/js/wavec.js" type="text/javascript"></script>
<script src="assets/js/navbar.js" type="text/javascript"></script>
<script src="assets/js/smenu.js" type="text/javascript"></script>
<script src="static/js/md5.js" type="text/javascript"></script>
<script src="static/js/api.js" type="text/javascript"></script>
<script src="static/js/core.js" type="text/javascript"></script>
<script src="static/js/screens/home.js" type="text/javascript"></script>
<script src="static/js/screens/schedule.js" type="text/javascript"></script>
<script src="static/js/screens/tests.js" type="text/javascript"></script>
<script src="static/js/screens/subscribe.js" type="text/javascript"></script>
<script src="static/js/screens/results.js" type="text/javascript"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-G0YF7DFC55"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments) }
gtag("js", new Date());
gtag("config", `G-G0YF7DFC55`, { groups: "default" });
</script>
</body>
</html>