이민호

add screen lock page

1 <script type="text/javascript"> 1 <script type="text/javascript">
2 - post_data = { 2 +var type = '<%= type %>';
3 - "collection":'<%= collection %>' 3 +post_data = {
4 - } 4 + "collection":'<%= collection %>'
5 - function winOpen() { 5 +}
6 - var type = '<%= type %>'; 6 +function login() {
7 - let sign = window.prompt("password"); 7 + if (document.getElementById("password").value == type) {
8 - 8 + redirectPost('/',post_data)
9 - if (sign == type){
10 - redirectPost('/',post_data)
11 - }
12 - else{
13 - winOpen();
14 - }
15 } 9 }
16 - 10 + else {
17 - function redirectPost(url, data) { 11 + window.alert("비밀번호가 틀립니다!")
18 - var form = document.createElement('form'); 12 + }
19 - document.body.appendChild(form); 13 +}
20 - form.method = 'post'; 14 +function redirectPost(url, data) {
21 - form.action = url; 15 + var form = document.createElement('form');
22 - for (var name in data) { 16 + document.body.appendChild(form);
23 - var input = document.createElement('input'); 17 + form.method = 'post';
24 - input.type = 'hidden'; 18 + form.action = url;
25 - input.name = name; 19 + for (var name in data) {
26 - input.value = data[name]; 20 + var input = document.createElement('input');
27 - form.appendChild(input); 21 + input.type = 'hidden';
22 + input.name = name;
23 + input.value = data[name];
24 + form.appendChild(input);
28 } 25 }
29 form.submit(); 26 form.submit();
30 - }
31 - </script>
32 -
33 - <body onLoad="winOpen()"></body>
...\ No newline at end of file ...\ No newline at end of file
27 + }
28 +</script>
29 +<body>
30 + <div id="screen-lock" class="hide" style="opacity:0.95;">
31 + <div class="panel panel-warning" style="width:500px;margin: 168px 0px 0px -250px;left: 50%;position: absolute;">
32 + <!-- begin panel-heading -->
33 + <div class="panel-heading">
34 + <h4 class="panel-title">screenlock_message</h4>
35 + </div>
36 + <!-- end panel-heading -->
37 +
38 + <!-- begin panel-body -->
39 + <div class="panel-body">
40 + <!-- begin fieldset -->
41 + <fieldset>
42 + <!-- begin row -->
43 + <div class="row">
44 + <!-- begin col-8 -->
45 + <div class="col-md-10 offset-md-1">
46 + <!-- begin form-group -->
47 + <div class="form-group row m-b-10">
48 + <label class="col-md-5 col-form-label text-md-right">비밀번호</label>
49 + <div class="col-md-6">
50 + <input type="password" name="password" id="password" class="form-control" />
51 + <button id="LockPasswordCheckAction" class="btn btn-success" onclick="login()">unlock</button>
52 + </div>
53 + </div>
54 + <!-- end form-group -->
55 + </div>
56 + <!-- end col-8 -->
57 + </div>
58 + <!-- end row -->
59 + </fieldset>
60 + <!-- end fieldset -->
61 + </div>
62 + <!-- end panel-body -->
63 + </div>
64 + <!-- end panel -->
65 + </div>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -52,7 +52,7 @@ limitations under the License. ...@@ -52,7 +52,7 @@ limitations under the License.
52 <canvas id="output"></canvas> 52 <canvas id="output"></canvas>
53 <div id="description"> 53 <div id="description">
54 <div id="description-title">Face Detecting...</div> 54 <div id="description-title">Face Detecting...</div>
55 - 55 + <input type="button" id="close_button" onclick="location.href='/';" value="종료" />
56 </div> 56 </div>
57 <video id="video" playsinline style=" 57 <video id="video" playsinline style="
58 -webkit-transform: scaleX(-1); 58 -webkit-transform: scaleX(-1);
...@@ -63,7 +63,6 @@ limitations under the License. ...@@ -63,7 +63,6 @@ limitations under the License.
63 "> 63 ">
64 </video> 64 </video>
65 </div> 65 </div>
66 - <input type="button" id="AWS_button" onclick="onClick();" value="버튼1" />
67 <form> 66 <form>
68 <input type="hidden" id="method" name="method" value=<%= method %> /> 67 <input type="hidden" id="method" name="method" value=<%= method %> />
69 <input type="hidden" id="collection" name="collection" value=<%= collection %> /> 68 <input type="hidden" id="collection" name="collection" value=<%= collection %> />
......