Commit 140d01a5 by Kang Donghun

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

parent 17d151f1
......@@ -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 @@
</article>
</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>
<div class="border">
<div class="cnt_footer">
......
......@@ -178,7 +178,7 @@ LOGIN.processLogin = function() {
console.log("data.requirePasswordChange:" + data.requirePasswordChange);
console.log("ClientData.serviceOpt_abook_check:" + ClientData.serviceOpt_abook_check());
COMMON.closeLoading();
if (data.requirePasswordChange == 0) {
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
......@@ -269,6 +269,7 @@ LOGIN.processLogin = function() {
}
}
} else {
COMMON.closeLoading();
LOGIN.login_errorMessage = data.errorMessage;
$('#main-error-message').html(COMMON.format(I18N.i18nText('msgLoginErrWrong'), data.errorMessage).toString());
$('#main-error-message').show();
......@@ -277,6 +278,7 @@ LOGIN.processLogin = function() {
}, function(xhr, statusText, errorThrown) {
LOGIN.login_error_flag = true;
COMMON.closeLoading();
if (xhr.responseText && xhr.status != 0) {
LOGIN.login_errorMessage = JSON.parse(xhr.responseText).errorMessage;
......@@ -304,7 +306,7 @@ LOGIN.changePasswordProcess = function() {
appId : 4
};
AVWEB.avwCmsApiSync(accountPath, 'passwordChange', 'GET', params, function(data) {
COMMON.callCmsApi(accountPath, 'passwordChange', 'GET', params, false, function(data) {
var result = data.result;
if (result == 'success') {
$('#dialog-error-message').css('display', 'none');
......@@ -363,8 +365,11 @@ LOGIN.changeLanguageEn = function() {
// Login click function
LOGIN.loginFunction = function() {
COMMON.showLoading();
if (LOGIN.checkValidation()) {
LOGIN.processLogin();
} else {
COMMON.closeLoading();
}
};
......@@ -397,12 +402,14 @@ LOGIN.OpenChangePasswordDialog = function() {
// Clear all input values
$("#main-password-change").show();
$("#main-password-change").center();
COMMON.lockLayout();
COMMON.showLoading();
console.log("password open");
};
// Close Chnage Password Dialog
LOGIN.CloseChangePasswordDialog = function() {
$("#main-password-change").hide();
COMMON.closeLoading();
};
// 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