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
2230a4a9
Commit
2230a4a9
authored
Oct 31, 2022
by
NGUYEN HOANG SON
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/1.0_check_web_dev' into feature/1.0_check_web_dev_50270
parents
0ed1067c
43bb1ed4
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
100 additions
and
94 deletions
+100
-94
abvw/common/js/common.js
+29
-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/html/login.html
+5
-0
abvw/js/login/login.js
+48
-13
No files found.
abvw/common/js/common.js
View file @
2230a4a9
...
...
@@ -465,6 +465,15 @@ var ClientData = {
}
},
// Session : Tenant Service_Option(serviceOpt)_ChatFunction:Char(Y:Use, N:Unused)
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,17 +1226,29 @@ 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
();
}
},
});
};
// 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
abvw/common/js/constant.js
View file @
2230a4a9
...
...
@@ -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 @
2230a4a9
...
...
@@ -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 @
2230a4a9
...
...
@@ -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 @
2230a4a9
...
...
@@ -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 @
2230a4a9
...
...
@@ -6,6 +6,10 @@
"txtUsrCap"
:
"사용자 정보"
,
"txtLastLoginTime"
:
"최종 로그인 시간:"
,
"msgMaxLength"
:
"신규 비밀번호 길이가 최대치 16자를 초과합니다."
,
"msgMinLength"
:
"신규 비밀번호 길이가 최소치 6글자 미만입니다."
,
"msgHasSeqChar"
:
"신규 비밀번호에 같은 문자가 3글자 이상 연속적으로 사용되고 있습니다."
,
"msgContainSameSeqChar"
:
"지난번 비밀번호에 사용된 문자는 4글자 이상 사용할 수 없습니다."
,
"msgPwdEmpty"
:
"패스워드를 입력해 주십시오."
,
"msgPwdOldWrong"
:
"기존 패스워드를 바르게 입력해 주십시오."
,
"msgPwdNotMatch"
:
"신규 패스워드와 신규 패스워드 확인이 일치하지 않습니다."
,
...
...
abvw/html/login.html
View file @
2230a4a9
...
...
@@ -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"
>
...
...
abvw/js/login/login.js
View file @
2230a4a9
...
...
@@ -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
;
...
...
@@ -178,7 +202,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 +293,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 +302,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
;
...
...
@@ -290,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
();
...
...
@@ -304,11 +329,12 @@ LOGIN.changePasswordProcess = function() {
appId
:
4
};
AVWEB
.
avwCmsApiSync
(
accountPath
,
'passwordChange'
,
'GET'
,
params
,
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'
)
{
...
...
@@ -318,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
)
{
...
...
@@ -329,7 +356,8 @@ LOGIN.changePasswordProcess = function() {
$
(
'#dialog-error-message'
).
show
();
}
else
{
// Show systemerror
COMMON
.
showSystemError
();
COMMON
.
closeLoading
();
COMMON
.
displayAlert
(
'errorOccurred'
);
}
});
};
...
...
@@ -363,8 +391,11 @@ LOGIN.changeLanguageEn = function() {
// Login click function
LOGIN
.
loginFunction
=
function
()
{
COMMON
.
showLoading
();
if
(
LOGIN
.
checkValidation
())
{
LOGIN
.
processLogin
();
}
else
{
COMMON
.
closeLoading
();
}
};
...
...
@@ -397,12 +428,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
...
...
@@ -418,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