Commit 3279537d by Kang Donghun

フィードバック対応

parent 03e723b5
......@@ -432,6 +432,13 @@ var ClientData = {
return SessionStorageUtils.get(CONSTANT.KEYS.conf_apiLoginUrl);
}
},
conf_checkApiLoginUrl: function (data) {
if (arguments.length > 0) {
SessionStorageUtils.set(CONSTANT.KEYS.conf_checkApiLoginUrl, data);
} else {
return SessionStorageUtils.get(CONSTANT.KEYS.conf_checkApiLoginUrl);
}
},
conf_apiResourceDlUrl: function (data) {
if (arguments.length > 0) {
SessionStorageUtils.set(CONSTANT.KEYS.conf_apiResourceDlUrl, data);
......
......@@ -71,34 +71,35 @@ CONSTANT.LANG = {
CONSTANT.KEYS = {
userInfo_loginId: 'loginId',
// Local :ユーザ情報(userInfo)_アカウントパス:String
// Local: UserInfo_Account Path: String
userInfo_accountPath: 'accountPath',
// Local :ユーザ情報(userInfo)_アカウント情報記憶フラグ:Char(Y:可能, N:不可)
// Local: UserInfo_Account Information Storage Flag: Char (Y: Yes, N: No)
userInfo_rememberLogin: 'rememberLogin',
// Local :ユーザ情報(userInfo)_最終ログイン日時:Datetime
// Local: UserInfo_Last login date and time: Datetime
userInfo_lastLoginTime: 'lastLoginTime',
// Local :ユーザ情報(userInfo)_パスワードスキップ日時:Datetime
// Local: UserInfo_Password Skip Date and Time: Datetime
userInfo_pwdSkipDt: 'pwdSkipDt',
// Local :ユーザオプション(userOpt)_動画繰り返しフラグ:Interger(0: 繰り返しなし, 1: 繰り返しあり)
// Session/local:ユーザ情報(userInfo)_セッションID:String
// Local: User Options (userOpt)_Video Repeated Flag: Interger (0: No Repeated, 1: Repeated)
// Session/local:UserInfo_Session ID:String
userInfo_sid: 'sid',
userInfo_sid_preview: 'sidPreview',
// Session :事業者オプション(serviceOpt)_初回ログイン時パスワード強制変更:Integer(0:なし, 1:催促, 2:強制)
// Session: Enterprise Option (serviceOpt)_Forced password change on first login: Integer (0: None, 1: Urgent, 2: Forced)
serviceOpt_force_pw_change_on_login: 'force_pw_change_on_login',
// Session :事業者オプション(serviceOpt)_定期ログイン時パスワード強制変更:Integer(0:なし, 1:催促, 2:強制)
// Session: Enterprise Option (serviceOpt)_Forced password change on periodic login: Integer (0: None, 1: Urgent, 2: Forced)
serviceOpt_force_pw_change_periodically: 'force_pw_change_periodically',
// Session:事業者オプション(serviceOpt)_メモ・マーキングデータバックアップ使用:Char(Y:可能, N:不可)
// Session: Enterprise Options (serviceOpt)_Using Memo Marking Data Backup: Char (Y: Yes, N: No)
userInfo_userName: 'userInfo_userName',
// Local:セッションID:String
// Local:Session ID: String
userInfo_sid_bak: 'sid_bak',
// Session :通知情報(pushInfo)_新着件数:Interger
// Session: Notification Information (pushInfo)_Number of new arrivals: Interger
pushInfo_newMsgNumber: 'pushInfo_newMsgNumber',
conf_apiUrl: 'conf_apiUrl',
conf_apiLoginUrl: 'conf_apiLoginUrl',
conf_checkApiLoginUrl: 'conf_checkApiLoginUrl',
conf_apiResourceDlUrl: 'conf_apiResourceDlUrl',
// Session :ABookCheck:Char(Y:有効, N:無効)
// Session :ABookCheck:Char (Y: Yes, N: No)
serviceOpt_abook_check: 'abook_check',
// Session :事業者オプション(serviceOpt)_任意のプッシュメッセージ:Char(Y:可能, N:不可)
// Session: Enterprise Option (serviceOpt)_Any push message: Char (Y: Yes, N: No)
serviceOpt_usable_push_message: 'usable_push_message',
// Local
IsJumpBack: 'IsJumpBack',
......
......@@ -7,7 +7,7 @@
// =============================================================================================
var ValidationUtil = {
// 必須: Text
// Required Text
CheckRequiredForText : function(value) {
if (value == null || value == '') {
......@@ -31,14 +31,14 @@ var ValidationUtil = {
return count;
},
// 最小文字数
// check text min length
CheckMinLengthForByte : function(value, len) {
if (this.GetByteCount(value) < len)
return false;
return true;
},
// 最大文字数
// check text max length
CheckMaxLengthForByte : function(value, len) {
if (this.GetByteCount(value) > len)
......@@ -46,26 +46,26 @@ var ValidationUtil = {
return true;
},
// 半数字
// check if the text is a number
IsNumber : function(value) {
var reg = new RegExp("^[0-9]+$");
return reg.test(value);
},
// 半英字
// check if the text is a alphabet
IsAlphabet : function(value) {
var reg = new RegExp("^[a-zA-Z]+$");
return reg.test(value);
},
// 半記号
// check if the text is a symbol
IsSymbol : function(value) {
var reg = new RegExp(
"\u005b\u005e\u0027\u0060\u0027\u007e\u0027\u0021\u0027\u0040\u0027\u0023\u0027\u0024\u0027\u0025\u0027\u005e\u0027\u0026\u0027\u002a\u0027\u0028\u0027\u0029\u0027\u005f\u0027\u002b\u0027\u003d\u0027\u007b\u0027\u007d\u0027\u007c\u0027\u003a\u0027\u0022\u0027\u003b\u0027\u0027\u0027\u003c\u0027\u003e\u0027\u003f\u0027\u002f\u0027\u002e\u0027\u002c\u005c\u002d\u005b\u005c\u005d\u005c\u005c\u005d");
return !reg.test(value);
},
// メール
// check if the text is a emailAddress
CheckEmailValid : function(value) {
// Check if string is a valid email address
var reg = new RegExp("^[0-9a-zA-Z]+@[0-9a-zA-Z]+[\\.]{1}[0-9a-zA-Z]+[\\.]?[0-9a-zA-Z]+$");
......@@ -110,19 +110,20 @@ var ValidationUtil = {
return false;
},
// 半記号
// Symbol check for password
IsPasswordSymbol : function(value) {
var reg = new RegExp("\u005b\u005e\u0027\u0023\u0027\u002b\u005c\u002d\u0027\u002e\u0027\u002f\u0027\u003a\u0027\u005f\u005d");
return !reg.test(value);
},
// 半記号
IsPasswordAlphabetOrNumerOrSymbol : function(value) {
// text check for password(Alphabet Or Number Or Symbol)
IsPasswordAlphabetOrNumberOrSymbol : function(value) {
var reg = new RegExp("\u005b\u005e\u0061\u002d\u007a\u0041\u002d\u005a\u0030\u002d\u0039\u0027\u0023\u0027\u002b\u005c\u002d\u0027\u002e\u0027\u002f\u0027\u003a\u0027\u005f\u005d");
return !reg.test(value);
},
HasSeqChar : function(value, num) {
// Check at consecutive characters
HasSeqChar : function(str, num) {
var count = 0;
var prev = 0;
......@@ -143,6 +144,7 @@ var ValidationUtil = {
return false;
},
// Check same characters in text
ContainSameSeqChar : function(str1, str2, num) {
if (str2.length < num || str1.length < num) {
return false;
......
{
"apiUrl" : "http://localhost:8080/acms/{0}/abvapi",
"checkApiLoginUrl" : "http://localhost:8080/acms/{0}/checkapi/web",
"apiLoginUrl" : "http://localhost:8080/acms/nuabvapi",
"apiResourceDlUrl" : "http://localhost:8080/acms/{0}/dl",
"1apiUrl" : "https://abook189.abook.bz/acms/{0}/abvapi",
"1apiLoginUrl" : "https://abook189.abook.bz/acms/nuabvapi",
"1apiResourceDlUrl" : "https://abook189.abook.bz/acms/{0}/dl",
"1apiUrl" : "https://chatdev2.agentec.jp/acms/{0}/abvapi",
"1checkApiLoginUrl" : "https://chatdev2.agentec.jp/acms/{0}/checkapi/web",
"1apiLoginUrl" : "https://chatdev2.agentec.jp/acms/nuabvapi",
"1apiResourceDlUrl" : "https://chatdev2.agentec.jp/acms/{0}/dl",
"bookShelfCount" : 15,
"bookListCount" : 15,
"screenlockTimeDefault" : 30,
......
//グローバルの名前空間用のオブジェクトを用意する
// prepared to use Global object(LOGIN)
var LOGIN = {};
// var requirePasswordChange;
......@@ -39,15 +39,13 @@ LOGIN.saveLoginInfo = function() {
// load language
I18N.changeLanguage(lang);
// Set flag コンテンツデータチェックフラグ = true to sync local with server
// ClientData.common_contentDataChkFlg(true);
var accountPath, loginId, password;
var chkRemember = $('#chkRemember').attr('checked');
accountPath = $('#txtAccPath').val();
loginId = $('#txtAccId').val();
password = $('#txtPassword').val();
// save user data to local storage
var date = new Date();
ClientData.userInfo_accountPath(accountPath);
ClientData.userInfo_loginId(loginId);
......@@ -62,11 +60,11 @@ LOGIN.saveLoginInfo = function() {
ClientData.userInfo_lastLoginTime(date.jpDateTimeString());
ClientData.userInfo_sid_local(LOGIN.userinfo_sid);
// バックアップにも保持
// save sid for backup
ClientData.userInfo_sid_local_bak(LOGIN.userinfo_sid);
LOGIN.saveServiceUserOption();
// ページジャンプ設定をクリア
// reset to paging function
ClientData.JumpQueue([]);
ClientData.IsJumpBack(false);
......@@ -75,11 +73,6 @@ LOGIN.saveLoginInfo = function() {
// Check validation
LOGIN.checkValidation = function() {
// 暗号化モードならチェック無し
// if (ClientData.serviceOpt_encryption() == 'Y') {
// return true;
// }
var accountPath = $('#txtAccPath').val();
var loginId = $('#txtAccId').val();
var password = $('#txtPassword').val();
......@@ -160,16 +153,13 @@ LOGIN.processLogin = function() {
urlpath : accountPath
};
// 引数パラメータがあれば取得
// var paramContentID = COMMON.getUrlParam('cid', '');
// Set sid for login, this will be checked authoring 2 sessions
if (ClientData.userInfo_sid_local()) {
params.previousSid = ClientData.userInfo_sid_local();
}
// Get url to login
var apiLoginUrl = ClientData.conf_apiLoginUrl(); // sysSettings.apiLoginUrl;
var apiLoginUrl = ClientData.conf_checkApiLoginUrl(); // sysSettings.apiLoginUrl;
COMMON.callCmsApi(apiLoginUrl, null, 'webClientLogin', 'GET', params, true, function(data) {
LOGIN.userinfo_sid = data.sid;
......@@ -186,10 +176,6 @@ LOGIN.processLogin = function() {
$('#main-error-message').css('display', 'none');
// if (ClientData.serviceOpt_encryption() == 'Y') {
// data.requirePasswordChange = 0;
// }
console.log("data.requirePasswordChange:" + data.requirePasswordChange);
console.log("ClientData.serviceOpt_abook_check:" + ClientData.serviceOpt_abook_check());
......@@ -197,7 +183,7 @@ LOGIN.processLogin = function() {
if (data.requirePasswordChange == 0) {
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
// ホームへ移動
// move to home.html page
COMMON.avwScreenMove("index.html");
} else if (data.requirePasswordChange == 1) {
......@@ -226,7 +212,7 @@ LOGIN.processLogin = function() {
if (numDay <= 30) {
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
// ホームへ移動
// move to home.html page
COMMON.avwScreenMove("index.html");
} else if (numDay > 30) {
LOGIN.OpenChangePasswordDialog();
......@@ -237,7 +223,7 @@ LOGIN.processLogin = function() {
} else { // no need to change password
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
// ホームへ移動
// move to home.html page
COMMON.avwScreenMove("index.html");
}
} else if (data.requirePasswordChange == 2) {
......@@ -260,7 +246,7 @@ LOGIN.processLogin = function() {
if (numDay <= 30) {
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
// ホームへ移動
// move to home.html page
COMMON.avwScreenMove("index.html");
} else if (numDay > 30) {
......@@ -278,7 +264,7 @@ LOGIN.processLogin = function() {
$("#txtPwdRemind").css('visibility', 'hidden');
} else { // No need to change password
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
// ホームへ移動
// move to home.html page
COMMON.avwScreenMove("index.html");
}
}
......@@ -326,7 +312,7 @@ LOGIN.changePasswordProcess = function() {
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
if (ClientData.serviceOpt_abook_check() == 'Y') {
// ホームへ移動
// move to home.html page
COMMON.avwScreenMove("index.html");
} else {
$('#main-error-message').html(COMMON.format(I18N.i18nText('msgLoginErrWrong'), 'E001'));
......@@ -352,7 +338,6 @@ LOGIN.changePasswordProcess = function() {
LOGIN.changeLanguageJa = function() {
I18N.changeLanguage(CONSTANT.LANG.JAPAN);
document.title = I18N.i18nText('dspLogin') + ' | ' + I18N.i18nText('sysAppTitle');
// ClientData.userInfo_language(COMMON.Consts.ConstLanguage_Ja);
if (LOGIN.login_errorMessage != "") {
$('#main-error-message').html(COMMON.format(I18N.i18nText('msgLoginErrWrong'), LOGIN.login_errorMessage).toString());
}
......@@ -362,7 +347,6 @@ LOGIN.changeLanguageJa = function() {
LOGIN.changeLanguageKo = function() {
I18N.changeLanguage(CONSTANT.LANG.KOREA);
document.title = I18N.i18nText('dspLogin') + ' | ' + I18N.i18nText('sysAppTitle');
// ClientData.userInfo_language(COMMON.Consts.ConstLanguage_Ko);
if (LOGIN.login_errorMessage != "") {
$('#main-error-message').html(COMMON.format(I18N.i18nText('msgLoginErrWrong'), LOGIN.login_errorMessage).toString());
}
......@@ -372,7 +356,6 @@ LOGIN.changeLanguageKo = function() {
LOGIN.changeLanguageEn = function() {
I18N.changeLanguage(CONSTANT.LANG.ENGLISH);
document.title = I18N.i18nText('dspLogin') + ' | ' + I18N.i18nText('sysAppTitle');
// ClientData.userInfo_language(COMMON.Consts.ConstLanguage_En);
if (LOGIN.login_errorMessage != "") {
$('#main-error-message').html(COMMON.format(I18N.i18nText('msgLoginErrWrong'), LOGIN.login_errorMessage).toString());
}
......@@ -400,7 +383,7 @@ LOGIN.skipPassFunction = function() {
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
if (ClientData.serviceOpt_abook_check() == 'Y') {
// ホームへ移動
// move to home.html page
COMMON.avwScreenMove("index.html");
} else {
$('#main-error-message').html(COMMON.format(I18N.i18nText('msgLoginErrWrong'), 'E001'));
......@@ -517,7 +500,7 @@ LOGIN.showAlertScreen = function(errMes, scrMove) {
// $(document).ready(function (e) {
LOGIN.ready = function() {
// セッションストレージクリア
// Session Storage clear
SessionStorageUtils.clear();
COMMON.userSessionObj = null;
// create new session
......@@ -526,21 +509,22 @@ LOGIN.ready = function() {
var sysSettings = COMMON.sysSetting(); // get info in conf.json
// getitsサーバー設定確認
// check an getits setting
if (sysSettings.apiUrl == "") {
// 引数パラメータを取得
// acquire parameters
var siteUrl = COMMON.getUrlParam('siteUrl', '');
var urlPath = COMMON.getUrlParam('urlPath', '');
var storeUrl = COMMON.getUrlParam('storeUrl', '');
if (siteUrl != "" && urlPath != "") {
// ClientData.siteUrl(siteUrl);
// api接続先設定
// set api connection
ClientData.conf_apiUrl(siteUrl + "{0}/abvapi");
ClientData.conf_apiLoginUrl(siteUrl + "nuabvapi");
ClientData.conf_checkApiLoginUrl(siteUrl + "checkapi/web");
ClientData.conf_apiResourceDlUrl(siteUrl + "{0}/dl");
// アカウント関連
// set account setting value
ClientData.userInfo_accountPath(urlPath);
ClientData.userInfo_accountPath_session(urlPath);
ClientData.userInfo_loginId("");
......@@ -549,13 +533,14 @@ LOGIN.ready = function() {
}
} else {
// confのパラメータセット
// conf parameter set
ClientData.conf_apiUrl(sysSettings.apiUrl);
ClientData.conf_checkApiLoginUrl(sysSettings.checkApiLoginUrl);
ClientData.conf_apiLoginUrl(sysSettings.apiLoginUrl);
ClientData.conf_apiResourceDlUrl(sysSettings.apiResourceDlUrl);
}
// 引数でアカウントパスを受け取ったらセットする
// Set when you receive the account path with the argument
$('#normalUser').show();
$('#formlogin').hide();
......@@ -575,5 +560,4 @@ LOGIN.ready = function() {
});
LOGIN.initLoginNormalUser();
};
// });
......@@ -784,16 +784,14 @@ SETTINGS.dspPwdUpd1_Click = function(e) {
if (!ValidationUtil.IsAlphabetOrNumberOrSymbol(SETTINGS.getNewPasswordRe())) {
isOK = false;
}
// 連続3文字以上チェック
if (!ValidationUtil.HasSeqChar(SETTINGS.getNewPassword())) {
// Check at least 3 consecutive characters
if (!ValidationUtil.HasSeqChar(SETTINGS.getNewPassword(), 3)) {
isOK = false;
}
// 前回と4文字連続一致
// Check 4 same characters in before password
if (!ValidationUtil.ContainSameSeqChar(SETTINGS.getCurrentPassword(), SETTINGS.getNewPassword(), 4)) {
isOK = false;
}
var str = SETTINGS.getCurrentPassword() + "";
}
// Do changing password
......
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