Commit 296597ca by Kang Donghun

edited logout button function and alert message on accountSetting screen

parent df5d8bd6
...@@ -16,6 +16,7 @@ var HEADER = {}; ...@@ -16,6 +16,7 @@ var HEADER = {};
}; };
HEADER.initLogout = function() { HEADER.initLogout = function() {
$("#btnLogout").click(HEADER.logoutFunction); $("#btnLogout").click(HEADER.logoutFunction);
} }
...@@ -37,11 +38,7 @@ HEADER.goToHomePage = function (pageId) { ...@@ -37,11 +38,7 @@ HEADER.goToHomePage = function (pageId) {
*/ */
HEADER.logoutFunction = function () { HEADER.logoutFunction = function () {
console.log('clicked logout'); console.log('clicked logout');
$('#modalTitle').text(I18N.i18nText("confirmation")); COMMON.showConfirm(I18N.i18nText('msgLogoutConfirm'), HEADER.processLogout, {title: I18N.i18nText("confirmation")});
$('#msgModel').text(I18N.i18nText('msgLogoutConfirm'));
$('#confirmYes').show();
$('#confirmYes').click(HEADER.processLogout);
$('#confirmNo').text(I18N.i18nText("confirmNo"));
}; };
/** /**
...@@ -66,7 +63,7 @@ HEADER.processLogout = function () { ...@@ -66,7 +63,7 @@ HEADER.processLogout = function () {
COMMON.goUrlWithCurrentParams(CONSTANT.PAGE_NAME.LOGIN); COMMON.goUrlWithCurrentParams(CONSTANT.PAGE_NAME.LOGIN);
} else { } else {
if (data.errorMessage) { if (data.errorMessage) {
COMMON.showAlert(data.errorMessage); COMMON.showAlert(null, {message: data.errorMessage});
} else { } else {
COMMON.showAlert('errorOccured'); COMMON.showAlert('errorOccured');
} }
...@@ -74,7 +71,7 @@ HEADER.processLogout = function () { ...@@ -74,7 +71,7 @@ HEADER.processLogout = function () {
}, },
function (xmlHttpRequest, txtStatus, errorThrown) { function (xmlHttpRequest, txtStatus, errorThrown) {
if (xmlHttpRequest.errorMessage) { if (xmlHttpRequest.errorMessage) {
COMMON.showAlert(xmlHttpRequest.errorMessage); COMMON.showAlert(null, {message: xmlHttpRequest.errorMessage});
} else { } else {
COMMON.showAlert('errorOccured'); COMMON.showAlert('errorOccured');
} }
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
"msgEssential": "{0} is required", "msgEssential": "{0} is required",
"pdfPrint":"PDF Print", "pdfPrint":"PDF Print",
"msgOperationEmpty": "Operation data is Empty.", "msgOperationEmpty": "Operation data is Empty.",
"success": "Success",
"dashboard":"Dashboard", "dashboard":"Dashboard",
"dashboardSettings":"Dashboard Settings", "dashboardSettings":"Dashboard Settings",
...@@ -120,5 +121,6 @@ ...@@ -120,5 +121,6 @@
"error": "Error", "error": "Error",
"msgSendPushMessageConfirm": "Do you want to send message?", "msgSendPushMessageConfirm": "Do you want to send message?",
"close":"Close", "close":"Close",
"dateError": "Set the start date before the end date." "dateError": "Set the start date before the end date.",
"errorGetToken": "Failed to get token value from server."
} }
\ No newline at end of file
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
"msgEssential": "{0}は必須です。", "msgEssential": "{0}は必須です。",
"pdfPrint":"PDF出力", "pdfPrint":"PDF出力",
"msgOperationEmpty": "作業データがありません。", "msgOperationEmpty": "作業データがありません。",
"success": "成功",
"dashboard":"ダッシュボード", "dashboard":"ダッシュボード",
"dashboardSettings":"ダッシュボード設定", "dashboardSettings":"ダッシュボード設定",
...@@ -118,5 +119,6 @@ ...@@ -118,5 +119,6 @@
"error": "エラー", "error": "エラー",
"msgSendPushMessageConfirm": "プッシュメッセージを送信しますか?", "msgSendPushMessageConfirm": "プッシュメッセージを送信しますか?",
"close":"閉じる", "close":"閉じる",
"dateError": "開始日は終了日の前に設定してください。" "dateError": "開始日は終了日の前に設定してください。",
"errorGetToken": "サーバからトークン値を取得できませんでした。"
} }
\ No newline at end of file
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
"msgLogoutConfirm": "로그아웃 하시겠습니까?", "msgLogoutConfirm": "로그아웃 하시겠습니까?",
"pdfPrint":"PDF 출력", "pdfPrint":"PDF 출력",
"msgOperationEmpty": "작업 데이터가 없습니다.", "msgOperationEmpty": "작업 데이터가 없습니다.",
"success": "성공",
"dashboard":"대시보드", "dashboard":"대시보드",
"dashboardSettings":"대시보드 설정", "dashboardSettings":"대시보드 설정",
...@@ -116,6 +117,7 @@ ...@@ -116,6 +117,7 @@
"msgSendPushMessageSuccess":"푸시메시지를 보냈습니다.", "msgSendPushMessageSuccess":"푸시메시지를 보냈습니다.",
"error": "에러", "error": "에러",
"msgSendPushMessageConfirm": "Do you want to send message?", "msgSendPushMessageConfirm": "Do you want to send message?",
"close":"Close", "close":"닫기",
"dateError": "시작일은 종료일 이전에 설정하십시오." "dateError": "시작일은 종료일 이전에 설정하십시오.",
"errorGetToken": "서버에서 토큰 값을 가져오지 못했습니다."
} }
\ No newline at end of file
...@@ -28,14 +28,14 @@ SETTINGS.getToken = function () { ...@@ -28,14 +28,14 @@ SETTINGS.getToken = function () {
if (data.token) { if (data.token) {
$('#getToken').val(data.token); $('#getToken').val(data.token);
} else { } else {
COMMON.showAlert("token error..", true); COMMON.showAlert("errorGetToken");
} }
}, },
function(data) { function(data) {
if (data.errorMessage) { if (data.errorMessage) {
COMMON.showAlert(data.errorMessage); COMMON.showAlert(data.errorMessage);
} else { } else {
COMMON.showAlert('msgPwdChangeNG'); COMMON.showAlert("errorGetToken");
} }
}); });
}; };
...@@ -134,7 +134,7 @@ SETTINGS.avwCmsApi_passwordChange_success = function (data) { ...@@ -134,7 +134,7 @@ SETTINGS.avwCmsApi_passwordChange_success = function (data) {
$('#txtPwdNew').val(''); $('#txtPwdNew').val('');
$('#txtPwdNewRe').val(''); $('#txtPwdNewRe').val('');
/* show messages */ /* show messages */
COMMON.showAlert('msgPwdChangeOK'); COMMON.showAlert('msgPwdChangeOK',{titleCode: I18N.i18nText('success')});
} }
}; };
......
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