Commit 140d01a5 by Kang Donghun

ログインJS修正、プログレスバー表示追加

parent 17d151f1
...@@ -1304,3 +1304,13 @@ COMMON.callCmsApi = function (url, accountPath, apiName, type, params, async, su ...@@ -1304,3 +1304,13 @@ COMMON.callCmsApi = function (url, accountPath, apiName, type, params, async, su
}, },
}); });
}; };
// Function to set position of object to center
jQuery.fn.center = function() {
this.css("position", "fixed");
this.css("top", (($(window).height() - this.height()) / 2) + "px");
this.css("left", (($(window).width() - this.width()) / 2) + "px");
return this;
};
\ No newline at end of file
...@@ -79,6 +79,11 @@ ...@@ -79,6 +79,11 @@
</article> </article>
</div> </div>
</div> </div>
<!--ローディング-->
<div id="check_loading" style="display:none; position: relative; overflow:hidden;">
<p id="checkLoadingMessage"></p>
<div id="checkLoadingImage"><img src='########' /></div>
</div>
<footer> <footer>
<div class="border"> <div class="border">
<div class="cnt_footer"> <div class="cnt_footer">
......
...@@ -178,7 +178,7 @@ LOGIN.processLogin = function() { ...@@ -178,7 +178,7 @@ LOGIN.processLogin = function() {
console.log("data.requirePasswordChange:" + data.requirePasswordChange); console.log("data.requirePasswordChange:" + data.requirePasswordChange);
console.log("ClientData.serviceOpt_abook_check:" + ClientData.serviceOpt_abook_check()); console.log("ClientData.serviceOpt_abook_check:" + ClientData.serviceOpt_abook_check());
COMMON.closeLoading();
if (data.requirePasswordChange == 0) { if (data.requirePasswordChange == 0) {
ClientData.userInfo_sid(ClientData.userInfo_sid_local()); ClientData.userInfo_sid(ClientData.userInfo_sid_local());
...@@ -269,6 +269,7 @@ LOGIN.processLogin = function() { ...@@ -269,6 +269,7 @@ LOGIN.processLogin = function() {
} }
} }
} else { } else {
COMMON.closeLoading();
LOGIN.login_errorMessage = data.errorMessage; LOGIN.login_errorMessage = data.errorMessage;
$('#main-error-message').html(COMMON.format(I18N.i18nText('msgLoginErrWrong'), data.errorMessage).toString()); $('#main-error-message').html(COMMON.format(I18N.i18nText('msgLoginErrWrong'), data.errorMessage).toString());
$('#main-error-message').show(); $('#main-error-message').show();
...@@ -277,6 +278,7 @@ LOGIN.processLogin = function() { ...@@ -277,6 +278,7 @@ LOGIN.processLogin = function() {
}, function(xhr, statusText, errorThrown) { }, function(xhr, statusText, errorThrown) {
LOGIN.login_error_flag = true; LOGIN.login_error_flag = true;
COMMON.closeLoading();
if (xhr.responseText && xhr.status != 0) { if (xhr.responseText && xhr.status != 0) {
LOGIN.login_errorMessage = JSON.parse(xhr.responseText).errorMessage; LOGIN.login_errorMessage = JSON.parse(xhr.responseText).errorMessage;
...@@ -304,7 +306,7 @@ LOGIN.changePasswordProcess = function() { ...@@ -304,7 +306,7 @@ LOGIN.changePasswordProcess = function() {
appId : 4 appId : 4
}; };
AVWEB.avwCmsApiSync(accountPath, 'passwordChange', 'GET', params, function(data) { COMMON.callCmsApi(accountPath, 'passwordChange', 'GET', params, false, function(data) {
var result = data.result; var result = data.result;
if (result == 'success') { if (result == 'success') {
$('#dialog-error-message').css('display', 'none'); $('#dialog-error-message').css('display', 'none');
...@@ -363,8 +365,11 @@ LOGIN.changeLanguageEn = function() { ...@@ -363,8 +365,11 @@ LOGIN.changeLanguageEn = function() {
// Login click function // Login click function
LOGIN.loginFunction = function() { LOGIN.loginFunction = function() {
COMMON.showLoading();
if (LOGIN.checkValidation()) { if (LOGIN.checkValidation()) {
LOGIN.processLogin(); LOGIN.processLogin();
} else {
COMMON.closeLoading();
} }
}; };
...@@ -397,12 +402,14 @@ LOGIN.OpenChangePasswordDialog = function() { ...@@ -397,12 +402,14 @@ LOGIN.OpenChangePasswordDialog = function() {
// Clear all input values // Clear all input values
$("#main-password-change").show(); $("#main-password-change").show();
$("#main-password-change").center(); $("#main-password-change").center();
COMMON.lockLayout(); COMMON.showLoading();
console.log("password open");
}; };
// Close Chnage Password Dialog // Close Chnage Password Dialog
LOGIN.CloseChangePasswordDialog = function() { LOGIN.CloseChangePasswordDialog = function() {
$("#main-password-change").hide(); $("#main-password-change").hide();
COMMON.closeLoading();
}; };
// Save Service Option // Save Service Option
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment