Showing
1 changed file
with
24 additions
and
2 deletions
... | @@ -7,6 +7,18 @@ | ... | @@ -7,6 +7,18 @@ |
7 | <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css"> | 7 | <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css"> |
8 | <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nanum+Gothic:400,700,800&subset=korean"> | 8 | <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nanum+Gothic:400,700,800&subset=korean"> |
9 | <style>body,h1,h2,h3,h4,h5 {font-family: "Nanum+Gothic", sans-serif}</style> | 9 | <style>body,h1,h2,h3,h4,h5 {font-family: "Nanum+Gothic", sans-serif}</style> |
10 | +<style> | ||
11 | +#container { | ||
12 | + margin: 0px auto; | ||
13 | + border: 10px #333 solid; | ||
14 | +} | ||
15 | +#videoInput { | ||
16 | + background-color: #666; | ||
17 | +} | ||
18 | +#canvasOutput { | ||
19 | + background-color: #666; | ||
20 | +} | ||
21 | +</style> | ||
10 | <script type='text/javascript' src="{{url_for('static', filename='js/opencv.js')}}"></script> | 22 | <script type='text/javascript' src="{{url_for('static', filename='js/opencv.js')}}"></script> |
11 | <script type='text/javascript' src="{{url_for('static', filename='js/utils.js')}}"></script> | 23 | <script type='text/javascript' src="{{url_for('static', filename='js/utils.js')}}"></script> |
12 | <script type='text/javascript' src="https://code.jquery.com/jquery-1.12.4.min.js"></script> | 24 | <script type='text/javascript' src="https://code.jquery.com/jquery-1.12.4.min.js"></script> |
... | @@ -142,7 +154,7 @@ function main() | ... | @@ -142,7 +154,7 @@ function main() |
142 | function activate_sender() | 154 | function activate_sender() |
143 | { | 155 | { |
144 | let sender = document.getElementById("sender"); | 156 | let sender = document.getElementById("sender"); |
145 | - fileloader.disabled = false; | 157 | + sender.disabled = false; |
146 | } | 158 | } |
147 | 159 | ||
148 | function toggle_streaming() | 160 | function toggle_streaming() |
... | @@ -170,6 +182,16 @@ function submit() | ... | @@ -170,6 +182,16 @@ function submit() |
170 | { | 182 | { |
171 | let student_id = document.getElementById('student_id').value; | 183 | let student_id = document.getElementById('student_id').value; |
172 | let student_name = document.getElementById('student_name').value; | 184 | let student_name = document.getElementById('student_name').value; |
185 | + if (b64encoded === '') | ||
186 | + { | ||
187 | + alert("얼굴을 먼저 촬영해주세요"); | ||
188 | + return; | ||
189 | + } | ||
190 | + if (!(student_id.length && student_name.length)) | ||
191 | + { | ||
192 | + alert("학번과 이름을 입력해주세요"); | ||
193 | + return; | ||
194 | + } | ||
173 | b64encoded = b64encoded.replace('data:image/jpeg;base64,', '') | 195 | b64encoded = b64encoded.replace('data:image/jpeg;base64,', '') |
174 | $.ajax({ | 196 | $.ajax({ |
175 | type: "POST", | 197 | type: "POST", |
... | @@ -208,7 +230,7 @@ and is wrapped around the whole page content, except for the footer in this exam | ... | @@ -208,7 +230,7 @@ and is wrapped around the whole page content, except for the footer in this exam |
208 | <div> | 230 | <div> |
209 | 학번: <input type="text" id="student_id"><br> | 231 | 학번: <input type="text" id="student_id"><br> |
210 | 이름: <input type="text" id="student_name"><br><br> | 232 | 이름: <input type="text" id="student_name"><br><br> |
211 | - <input id="streamButton" type="button" onclick="toggle_streaming()" value="활영중지" disabled> | 233 | + <input id="streamButton" type="button" onclick="toggle_streaming()" value="활영중지"> |
212 | <input id="sender" type="button" onclick="submit()" value="등록" disabled> | 234 | <input id="sender" type="button" onclick="submit()" value="등록" disabled> |
213 | </div> | 235 | </div> |
214 | </div> | 236 | </div> | ... | ... |
-
Please register or login to post a comment