Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_web
check
Commits
c0564dbe
Commit
c0564dbe
authored
Oct 31, 2022
by
Kang Donghun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Validation logic check & Add service option for chat function
parent
140d01a5
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
76 additions
and
93 deletions
+76
-93
abvw/common/js/common.js
+18
-80
abvw/common/js/constant.js
+5
-0
abvw/common/js/validation.js
+1
-1
abvw/common/json/lang/lang-en.json
+4
-0
abvw/common/json/lang/lang-ja.json
+4
-0
abvw/common/json/lang/lang-ko.json
+4
-0
abvw/js/login/login.js
+40
-12
No files found.
abvw/common/js/common.js
View file @
c0564dbe
...
...
@@ -465,6 +465,15 @@ var ClientData = {
}
},
// Session :事業者オプション(serviceOpt)_ChatFunction:Char(Y:有効, N:無効)
serviceOpt_chat_function
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
SessionStorageUtils
.
set
(
CONSTANT
.
KEYS
.
serviceOpt_abook_check
,
data
);
}
else
{
return
SessionStorageUtils
.
get
(
CONSTANT
.
KEYS
.
serviceOpt_abook_check
);
}
},
// Session :事業者オプション(serviceOpt)_初回ログイン時パスワード強制変更:Integer(0:なし, 1:催促, 2:強制)
serviceOpt_force_pw_change_on_login
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
...
...
@@ -773,67 +782,6 @@ COMMON.lockLayout = function () {
});
}
};
/* show system error message */
COMMON
.
showSystemError
=
function
(
textId
)
{
if
(
COMMON
.
hasError
())
{
// すでにエラー状態であればエラーを表示しない
return
;
}
else
{
// エラー状態にセット
COMMON
.
setErrorState
();
}
if
(
!
textId
)
{
textId
=
'sysErrorCallApi01'
;
}
// create DOM element for showing error message
var
errMes
=
I18N
.
i18nText
(
textId
);
var
tags
=
'<div id="avw-sys-error"></div>'
;
//$('body').prepend(tags);
$
(
'body'
).
append
(
tags
);
$
(
'#avw-sys-error'
).
css
({
opacity
:
0.7
,
position
:
'fixed'
,
top
:
'0'
,
left
:
'0'
,
width
:
$
(
window
).
width
(),
height
:
$
(
window
).
height
(),
background
:
'#999'
,
'z-index'
:
90000
,
});
// resize error page
$
(
window
).
resize
(
function
()
{
$
(
'#avw-sys-error'
).
css
({
width
:
$
(
window
).
width
(),
height
:
$
(
window
).
height
(),
});
});
// show error messages
$
().
toastmessage
({
position
:
'middle-center'
});
$
().
toastmessage
(
'showToast'
,
{
type
:
'error'
,
sticky
:
true
,
text
:
errMes
,
close
:
function
()
{
if
(
!
HEADER
.
webLogoutEvent
())
{
//ログアウト出来なかった
SessionStorageUtils
.
clear
();
//カスタムURI起動対応のため sidのバックアップは消さない
COMMON
.
userSetting
().
remove
(
CONSTANT
.
KEYS
.
userInfo_sid
);
COMMON
.
avwScreenMove
(
CONSTANT
.
PAGE_NAME
.
LOGIN
);
}
},
});
/*
$().toastmessage('showToast', {
type: 'error',
sticky: true,
text: errMes,
close: function() { isShowErrorMessage = false; }
});
*/
};
/* エラー状態をクリア */
COMMON
.
clearError
=
function
()
{
...
...
@@ -1246,22 +1194,10 @@ Array.prototype.clear = function () {
};
/* CMS API Call */
COMMON
.
callCmsApi
=
function
(
url
,
accountPath
,
apiName
,
type
,
params
,
async
,
success
,
error
)
{
COMMON
.
callCmsApi
=
function
(
url
,
type
,
params
,
async
,
success
,
error
)
{
// アプリケーション設定取得
var
sysSettings
=
COMMON
.
sysSetting
();
// url 構築
var
apiUrl
;
if
(
!
url
)
{
apiUrl
=
ClientData
.
conf_apiUrl
();
//sysSettings.apiUrl;
}
else
{
apiUrl
=
url
;
}
if
(
accountPath
)
{
apiUrl
=
COMMON
.
format
(
apiUrl
,
accountPath
);
}
apiUrl
=
apiUrl
+
'/'
+
apiName
+
'/'
;
//----------------------------------------------------------------------------------
// for IE: 暫定的に対応 (これをすることでIE9でもCrossDomainリクエストが可能だがアクセスのたびに警告が出る)
$
.
support
.
cors
=
true
;
...
...
@@ -1271,7 +1207,7 @@ COMMON.callCmsApi = function (url, accountPath, apiName, type, params, async, su
$
.
ajax
({
async
:
async
?
async
:
false
,
type
:
type
?
type
:
'get'
,
url
:
apiU
rl
,
url
:
u
rl
,
cache
:
false
,
dataType
:
'json'
,
data
:
params
,
...
...
@@ -1290,16 +1226,18 @@ COMMON.callCmsApi = function (url, accountPath, apiName, type, params, async, su
success
(
data
);
}
},
error
:
function
(
x
mlHttpRequest
,
txtStatus
,
errorThrown
)
{
error
:
function
(
x
hr
,
txtStatus
,
errorThrown
)
{
/* call custom error process */
if
(
error
)
{
error
(
x
mlHttpRequest
,
txtStatus
,
errorThrown
);
error
(
x
hr
,
txtStatus
,
errorThrown
);
}
else
{
if
(
xmlHttpRequest
.
status
==
403
)
{
COMMON
.
showSystemError
(
'sysErrorCallApi02'
);
COMMON
.
closeLoading
();
if
(
xhr
.
responseText
&&
xhr
.
status
!=
0
)
{
$
(
'#main-error-message'
).
html
(
COMMON
.
format
(
I18N
.
i18nText
(
'msgLoginErrWrong'
),
JSON
.
parse
(
xhr
.
responseText
).
errorMessage
).
toString
());
}
else
{
COMMON
.
showSystemError
(
);
$
(
'#main-error-message'
).
html
(
COMMON
.
format
(
I18N
.
i18nText
(
'msgLoginErrWrong'
),
'E001'
)
);
}
$
(
'#main-error-message'
).
show
();
}
},
});
...
...
abvw/common/js/constant.js
View file @
c0564dbe
...
...
@@ -45,11 +45,14 @@ CONSTANT.URL = {
CMS
:
{
// BASE_CMS: 'https://' + location.host + '/checkapi/web/',
BASE
:
'http://localhost:8080/acms/'
,
//BASE: 'https://chatdev2.agentec.jp/acms/',
API
:
{
BASE
:
'/checkapi/web/'
,
ALL_OPERATION_LIST
:
'operationListWeb/getOperationList'
,
AUTH_SESSION
:
'getSession/checkAuthUser'
,
OPERATION_VIEW_LOG
:
'operationViewLog/saveLog'
,
PASSWORD_CHANGE
:
'passwordChangeWeb/'
,
LOGIN
:
'webClientLogin/'
},
HTML
:
{
BASE
:
'/checkapi/web/html/'
,
...
...
@@ -100,6 +103,8 @@ CONSTANT.KEYS = {
conf_apiResourceDlUrl
:
'conf_apiResourceDlUrl'
,
// Session :ABookCheck:Char (Y: Yes, N: No)
serviceOpt_abook_check
:
'abook_check'
,
// Session :Chat Function:Char (Y: Yes, N: No)
serviceOpt_chat_function
:
'chat_function'
,
// Session: Enterprise Option (serviceOpt)_Any push message: Char (Y: Yes, N: No)
serviceOpt_usable_push_message
:
'usable_push_message'
,
// Local
...
...
abvw/common/js/validation.js
View file @
c0564dbe
...
...
@@ -127,7 +127,7 @@ var ValidationUtil = {
var
count
=
0
;
var
prev
=
0
;
for
(
var
i
=
0
;
i
<
str
.
length
()
;
i
++
)
{
for
(
var
i
=
0
;
i
<
str
.
length
;
i
++
)
{
var
c
=
str
.
charAt
(
i
);
if
(
i
>
0
&&
prev
==
c
)
{
count
++
;
...
...
abvw/common/json/lang/lang-en.json
View file @
c0564dbe
...
...
@@ -9,6 +9,10 @@
"msgPwdEmpty"
:
"Password is required."
,
"msgPwdOldWrong"
:
"Current Password mismatch."
,
"msgPwdNotMatch"
:
"New Password doesn't match."
,
"msgMaxLength"
:
"The new password length exceeds the maximum of 16 characters."
,
"msgMinLength"
:
"The new password length is less than a minimum of 6 characters."
,
"msgHasSeqChar"
:
"The new password contains at least three consecutive characters of the same character."
,
"msgContainSameSeqChar"
:
"The previous password cannot contain more than four characters."
,
"msgLoginErrWrong"
:
"LoginId or Password wrong: {0}"
,
"dspLogin"
:
"Login"
,
"dspSkip"
:
"Skip"
,
...
...
abvw/common/json/lang/lang-ja.json
View file @
c0564dbe
...
...
@@ -9,6 +9,10 @@
"msgPwdEmpty"
:
"パスワードを入力してください"
,
"msgPwdOldWrong"
:
"現在のパスワードに誤りがあります"
,
"msgPwdNotMatch"
:
"変更パスワードが一致していません。"
,
"msgMaxLength"
:
"新規パスワードの長さが最大値16文字を超えています。"
,
"msgMinLength"
:
"新規パスワードの長さが最小値6文字未満です。"
,
"msgHasSeqChar"
:
"新規パスワードに同じ文字が3文字以上連続して使われています。"
,
"msgContainSameSeqChar"
:
"前回パスワードに使用されている文字は4文字以上使えません。"
,
"msgLoginErrWrong"
:
"ログインできません。入力情報を確認してください。(エラーコード:{0})"
,
"dspLogin"
:
"ログイン"
,
"dspSkip"
:
"スキップ"
,
...
...
abvw/common/json/lang/lang-ko.json
View file @
c0564dbe
...
...
@@ -6,6 +6,10 @@
"txtUsrCap"
:
"사용자 정보"
,
"txtLastLoginTime"
:
"최종 로그인 시간:"
,
"msgMaxLength"
:
"신규 비밀번호 길이가 최대치 16자를 초과합니다."
,
"msgMinLength"
:
"신규 비밀번호 길이가 최소치 6글자 미만입니다."
,
"msgHasSeqChar"
:
"신규 비밀번호에 같은 문자가 3글자 이상 연속적으로 사용되고 있습니다."
,
"msgContainSameSeqChar"
:
"지난번 비밀번호에 사용된 문자는 4글자 이상 사용할 수 없습니다."
,
"msgPwdEmpty"
:
"패스워드를 입력해 주십시오."
,
"msgPwdOldWrong"
:
"기존 패스워드를 바르게 입력해 주십시오."
,
"msgPwdNotMatch"
:
"신규 패스워드와 신규 패스워드 확인이 일치하지 않습니다."
,
...
...
abvw/js/login/login.js
View file @
c0564dbe
...
...
@@ -126,6 +126,30 @@ LOGIN.checkDialogValidation = function() {
msgError
.
attr
(
'lang'
,
'msgPwdNotMatch'
);
msgError
.
show
();
return
false
;
}
else
if
(
!
ValidationUtil
.
CheckMinLengthForByte
(
newPass
,
6
))
{
LOGIN
.
login_errorMessage
=
""
;
msgError
.
html
(
I18N
.
i18nText
(
'msgMinLength'
));
msgError
.
attr
(
'lang'
,
'msgMinLength'
);
msgError
.
show
();
return
false
;
}
else
if
(
!
ValidationUtil
.
CheckMaxLengthForByte
(
newPass
,
16
))
{
LOGIN
.
login_errorMessage
=
""
;
msgError
.
html
(
I18N
.
i18nText
(
'msgMaxLength'
));
msgError
.
attr
(
'lang'
,
'msgMaxLength'
);
msgError
.
show
();
return
false
;
}
else
if
(
ValidationUtil
.
HasSeqChar
(
newPass
,
3
))
{
LOGIN
.
login_errorMessage
=
""
;
msgError
.
html
(
I18N
.
i18nText
(
'msgHasSeqChar'
));
msgError
.
attr
(
'lang'
,
'msgHasSeqChar'
);
msgError
.
show
();
return
false
;
}
else
if
(
ValidationUtil
.
ContainSameSeqChar
(
newPass
,
currentPass
,
4
))
{
LOGIN
.
login_errorMessage
=
""
;
msgError
.
html
(
I18N
.
i18nText
(
'msgContainSameSeqChar'
));
msgError
.
attr
(
'lang'
,
'msgContainSameSeqChar'
);
msgError
.
show
();
return
false
;
}
else
{
return
true
;
}
...
...
@@ -159,9 +183,9 @@ LOGIN.processLogin = function() {
}
// Get url to login
var
apiLoginUrl
=
ClientData
.
conf_checkApiLoginUrl
();
// sysSettings.apiLoginUrl
;
url
=
CONSTANT
.
URL
.
CMS
.
BASE
+
ClientData
.
userInfo_accountPath
()
+
CONSTANT
.
URL
.
CMS
.
API
.
BASE
+
CONSTANT
.
URL
.
CMS
.
API
.
LOGIN
;
COMMON
.
callCmsApi
(
apiLoginUrl
,
null
,
'webClientLogin'
,
'GE
T'
,
params
,
true
,
function
(
data
)
{
COMMON
.
callCmsApi
(
url
,
'POS
T'
,
params
,
true
,
function
(
data
)
{
LOGIN
.
userinfo_sid
=
data
.
sid
;
LOGIN
.
userInfo_userName
=
data
.
userName
;
LOGIN
.
optionList
=
data
.
serviceOptionList
;
...
...
@@ -292,7 +316,6 @@ LOGIN.processLogin = function() {
// Change Password Process
LOGIN
.
changePasswordProcess
=
function
()
{
var
accountPath
=
$
(
'#txtAccPath'
).
val
();
var
sid
=
ClientData
.
userInfo_sid_local
();
var
loginId
=
$
(
'#txtAccId'
).
val
();
var
password
=
$
(
'#txtCurrentPass'
).
val
();
...
...
@@ -306,13 +329,14 @@ LOGIN.changePasswordProcess = function() {
appId
:
4
};
COMMON
.
callCmsApi
(
accountPath
,
'passwordChange'
,
'GET'
,
params
,
false
,
function
(
data
)
{
var
result
=
data
.
result
;
if
(
result
==
'success'
)
{
$
(
'#dialog-error-message'
).
css
(
'display'
,
'none'
);
const
url
=
CONSTANT
.
URL
.
CMS
.
BASE
+
ClientData
.
userInfo_accountPath
()
+
CONSTANT
.
URL
.
CMS
.
API
.
BASE
+
CONSTANT
.
URL
.
CMS
.
API
.
PASSWORD_CHANGE
;
COMMON
.
callCmsApi
(
url
,
'POST'
,
params
,
false
,
function
(
result
)
{
if
(
result
.
httpStatus
==
'200'
)
{
LOGIN
.
CloseChangePasswordDialog
();
$
(
'#dialog-error-message'
).
css
(
'display'
,
'none'
);
ClientData
.
userInfo_sid
(
ClientData
.
userInfo_sid_local
());
if
(
ClientData
.
serviceOpt_abook_check
()
==
'Y'
)
{
// move to home.html page
COMMON
.
avwScreenMove
(
"index.html"
);
...
...
@@ -320,9 +344,10 @@ LOGIN.changePasswordProcess = function() {
$
(
'#main-error-message'
).
html
(
COMMON
.
format
(
I18N
.
i18nText
(
'msgLoginErrWrong'
),
'E001'
));
$
(
'#main-error-message'
).
show
();
}
}
else
{
$
(
'#dialog-error-message'
).
html
(
I18N
.
i18nText
(
'msgPwdOldWrong'
));
}
else
if
(
result
.
httpStatus
==
'401'
)
{
COMMON
.
goUrlWithCurrentParams
(
CONSTANT
.
PAGE_NAME
.
LOGIN
);
}
else
if
(
result
.
httpStatus
==
'403'
)
{
$
(
'#dialog-error-message'
).
html
(
data
.
message
);
$
(
'#dialog-error-message'
).
show
();
}
},
function
(
xhr
,
b
,
c
)
{
...
...
@@ -331,7 +356,8 @@ LOGIN.changePasswordProcess = function() {
$
(
'#dialog-error-message'
).
show
();
}
else
{
// Show systemerror
COMMON
.
showSystemError
();
COMMON
.
closeLoading
();
COMMON
.
displayAlert
(
'errorOccurred'
);
}
});
};
...
...
@@ -425,6 +451,8 @@ LOGIN.saveServiceUserOption = function() {
ClientData
.
serviceOpt_usable_push_message
(
option
.
value
);
}
else
if
(
option
.
serviceOptionId
==
161
)
{
ClientData
.
serviceOpt_abook_check
(
option
.
value
);
}
else
if
(
option
.
serviceOptionId
==
183
)
{
ClientData
.
serviceOpt_chat_function
(
option
.
value
);
}
});
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment