gateway: 입구의 지도를 iframe으로 변경
This commit is contained in:
+14
-18
@@ -1,4 +1,4 @@
|
|||||||
$(document).ready(function() {
|
$(document).ready(function () {
|
||||||
$("#main_form").validate({
|
$("#main_form").validate({
|
||||||
rules: {
|
rules: {
|
||||||
username: {
|
username: {
|
||||||
@@ -17,7 +17,7 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
errorElement: "div",
|
errorElement: "div",
|
||||||
errorPlacement: function(error, element) {
|
errorPlacement: function (error, element) {
|
||||||
// Add the `help-block` class to the error element
|
// Add the `help-block` class to the error element
|
||||||
error.addClass("invalid-feedback");
|
error.addClass("invalid-feedback");
|
||||||
|
|
||||||
@@ -27,15 +27,15 @@ $(document).ready(function() {
|
|||||||
error.insertAfter(element);
|
error.insertAfter(element);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
highlight: function(element, errorClass, validClass) {
|
highlight: function (element, errorClass, validClass) {
|
||||||
$(element).addClass("is-invalid").removeClass("is-valid");
|
$(element).addClass("is-invalid").removeClass("is-valid");
|
||||||
},
|
},
|
||||||
unhighlight: function(element, errorClass, validClass) {
|
unhighlight: function (element, errorClass, validClass) {
|
||||||
$(element).addClass("is-valid").removeClass("is-invalid");
|
$(element).addClass("is-valid").removeClass("is-invalid");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#main_form").submit(function() {
|
$("#main_form").submit(function () {
|
||||||
var raw_password = $('#password').val();
|
var raw_password = $('#password').val();
|
||||||
var salt = $('#global_salt').val();
|
var salt = $('#global_salt').val();
|
||||||
var hash_pw = sha512(salt + raw_password + salt);
|
var hash_pw = sha512(salt + raw_password + salt);
|
||||||
@@ -47,7 +47,7 @@ $(document).ready(function() {
|
|||||||
'username': $('#username').val(),
|
'username': $('#username').val(),
|
||||||
'password': hash_pw
|
'password': hash_pw
|
||||||
}
|
}
|
||||||
}).then(function(obj) {
|
}).then(function (obj) {
|
||||||
if (obj.result) {
|
if (obj.result) {
|
||||||
window.location.href = "./";
|
window.location.href = "./";
|
||||||
return;
|
return;
|
||||||
@@ -58,7 +58,7 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var $modal = $('#modalOTP').modal();
|
var $modal = $('#modalOTP').modal();
|
||||||
$modal.on('shown.bs.modal', function() {
|
$modal.on('shown.bs.modal', function () {
|
||||||
$('#otp_code').focus();
|
$('#otp_code').focus();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -67,14 +67,14 @@ $(document).ready(function() {
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#otp_form').submit(function() {
|
$('#otp_form').submit(function () {
|
||||||
$.post({
|
$.post({
|
||||||
url: 'oauth_kakao/j_check_OTP.php',
|
url: 'oauth_kakao/j_check_OTP.php',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
data: {
|
data: {
|
||||||
'otp': $('#otp_code').val(),
|
'otp': $('#otp_code').val(),
|
||||||
}
|
}
|
||||||
}).then(function(obj) {
|
}).then(function (obj) {
|
||||||
if (obj.result) {
|
if (obj.result) {
|
||||||
alert(obj.reason);
|
alert(obj.reason);
|
||||||
window.location.href = "./";
|
window.location.href = "./";
|
||||||
@@ -105,13 +105,9 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
$map.find('.map_body').data('scale', scale);
|
$map.find('.map_body').data('scale', scale);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
reloadWorldMap({
|
window.fitIframe = function () {
|
||||||
targetJson: "{0}/j_map_recent.php".format(runningServer.name),
|
var iframe = document.querySelector('#running_map');
|
||||||
reqType: 'get',
|
iframe.style.height = iframe.contentWindow.document.body.scrollHeight + 'px';
|
||||||
dynamicMapTheme: true,
|
}
|
||||||
callback: function(data, rawObject) {
|
|
||||||
$('#running_map .card-body').html(rawObject.history);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
Reference in New Issue
Block a user