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
f0c78053
Commit
f0c78053
authored
Nov 15, 2022
by
Kang Donghun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
コード整理、トークン処理追加
parent
4d55b513
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
115 additions
and
64 deletions
+115
-64
abweb/common/css/style.css
+7
-0
abweb/common/js/common.js
+44
-20
abweb/common/js/constant.js
+1
-0
abweb/common/json/lang/lang-en.json
+3
-1
abweb/common/json/lang/lang-ja.json
+3
-1
abweb/common/json/lang/lang-ko.json
+3
-1
abweb/html/accountSetting.html
+22
-25
abweb/html/index.html
+0
-2
abweb/js/login/login.js
+4
-4
abweb/js/operationList/operationList.js
+1
-1
abweb/js/reportList/reportList.js
+0
-3
abweb/js/setting/settings.js
+26
-5
abweb/js/template/template.js
+1
-1
No files found.
abweb/common/css/style.css
View file @
f0c78053
...
...
@@ -60,3 +60,9 @@ ul.message-list li.read{
grid-template-columns
:
repeat
(
2
,
1
fr
);
}
}
.error
{
font-size
:
13px
;
color
:
#FF0000
;
font-weight
:
bolder
;
}
\ No newline at end of file
abweb/common/js/common.js
View file @
f0c78053
...
...
@@ -20,7 +20,7 @@ COMMON.hasErrorKey = 'AVW_HASERR';
* @param {*} url
*/
COMMON
.
avwScreenMove
=
function
(
url
)
{
COMMON
.
showLoading
();
//
COMMON.showLoading();
window
.
onbeforeunload
=
null
;
window
.
location
=
url
;
};
...
...
@@ -32,9 +32,9 @@ COMMON.avwScreenMove = function (url) {
* @param {String} key
*/
COMMON
.
showLoading
=
function
()
{
$
.
LoadingOverlay
(
'show'
,
{
image
:
'../common/img/loading.gif'
,
});
//
$.LoadingOverlay('show', {
//
image: '../common/img/loading.gif',
//
});
};
/**
...
...
@@ -43,7 +43,7 @@ COMMON.showLoading = function () {
COMMON
.
closeLoading
=
function
()
{
setTimeout
(
function
()
{
$
(
'#contentFieldOrverlay'
).
show
();
$
.
LoadingOverlay
(
'hide'
);
//
$.LoadingOverlay('hide');
},
500
);
};
...
...
@@ -52,17 +52,22 @@ COMMON.closeLoading = function () {
*
* @param {String} msgCode
*/
COMMON
.
displayAlert
=
function
(
msgCode
,
title
)
{
$
(
'#alertMsg'
).
html
(
I18N
.
i18nText
(
msgCode
));
$
(
'.alert-overlay'
).
removeClass
(
'd-none'
);
$
(
'.alert-area'
).
removeClass
(
'd-none'
);
const
positionY
=
$
(
document
).
scrollTop
()
+
screen
.
height
/
8
;
const
height
=
screen
.
height
/
4
;
$
(
'.alert-overlay'
).
css
(
'height'
,
screen
.
height
);
$
(
'.alert-area'
).
css
(
'top'
,
positionY
);
$
(
'.alert-area'
).
css
(
'min-height'
,
height
);
$
(
'body'
).
css
(
'overflow'
,
'hidden'
);
COMMON
.
displayAlert
=
function
(
msgCode
,
isError
)
{
$
(
'#msgModel'
).
html
(
I18N
.
i18nText
(
msgCode
));
$
(
'#confirmYes'
).
hide
();
$
(
'#confirmNo'
).
text
(
I18N
.
i18nText
(
"confirmation"
));
$
(
'#modalTitle'
).
text
(
I18N
.
i18nText
(
"error"
));
if
(
isError
)
{
}
// $('.alert-overlay').removeClass('d-none');
// $('.alert-area').removeClass('d-none');
// const positionY = $(document).scrollTop() + screen.height / 8;
// const height = screen.height / 4;
// $('.alert-overlay').css('height', screen.height);
// $('.alert-area').css('top', positionY);
// $('.alert-area').css('min-height', height);
// $('body').css('overflow', 'hidden');
};
/**
...
...
@@ -162,10 +167,10 @@ COMMON.cmsAjax = function (url, param, async = true, callback, errorCallback, ty
}
else
if
(
result
.
httpStatus
==
'401'
)
{
COMMON
.
goUrlWithCurrentParams
(
CONSTANT
.
PAGE_NAME
.
LOGIN
);
}
else
if
(
result
.
httpStatus
==
'403'
)
{
COMMON
.
closeLoading
();
//
COMMON.closeLoading();
COMMON
.
displayAlert
(
'errorOccurred'
);
}
else
{
COMMON
.
closeLoading
();
//
COMMON.closeLoading();
COMMON
.
displayAlert
(
result
.
message
);
}
},
...
...
@@ -173,7 +178,7 @@ COMMON.cmsAjax = function (url, param, async = true, callback, errorCallback, ty
if
(
errorCallback
)
{
errorCallback
(
XMLHttpRequest
,
textStatus
,
errorThrown
);
}
else
{
COMMON
.
closeLoading
();
//
COMMON.closeLoading();
COMMON
.
displayAlert
(
'errorCommunicationFailed'
);
}
},
...
...
@@ -182,7 +187,7 @@ COMMON.cmsAjax = function (url, param, async = true, callback, errorCallback, ty
if
(
errorCallback
)
{
errorCallback
();
}
else
{
COMMON
.
closeLoading
();
//
COMMON.closeLoading();
COMMON
.
displayAlert
(
'errorOccurred'
);
}
}
...
...
@@ -960,6 +965,25 @@ COMMON.currentTime = function () {
return
Date
.
now
();
};
/**
* create UUID For token
*
*/
COMMON
.
generateUuid
=
function
()
{
var
chars
=
"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"
.
split
(
""
);
for
(
var
i
=
0
,
len
=
chars
.
length
;
i
<
len
;
i
++
)
{
switch
(
chars
[
i
])
{
case
"x"
:
chars
[
i
]
=
Math
.
floor
(
Math
.
random
()
*
16
).
toString
(
16
);
break
;
case
"y"
:
chars
[
i
]
=
(
Math
.
floor
(
Math
.
random
()
*
4
)
+
8
).
toString
(
16
);
break
;
}
}
return
chars
.
join
(
""
);
}
/*
* Operations for session storage [ end ]
*/
...
...
abweb/common/js/constant.js
View file @
f0c78053
...
...
@@ -99,6 +99,7 @@ CONSTANT.URL = {
AUTH_SESSION
:
'getSession/checkAuthUser'
,
OPERATION_VIEW_LOG
:
'operationViewLog/saveLog'
,
PASSWORD_CHANGE
:
'passwordChangeWeb/'
,
PASSWORD_GET_TOKEN
:
'passwordChangeWeb/getToken'
,
LOGIN
:
'webClientLogin/'
,
LOGOUT
:
'logoutWeb/'
,
DASHBOARD
:
'dashboard/'
,
...
...
abweb/common/json/lang/lang-en.json
View file @
f0c78053
...
...
@@ -116,5 +116,6 @@
"categoryAll"
:
"All"
,
"reportForm"
:
"Report"
,
"periodicInspectionPeriod"
:
"Periodic Inspection Period"
,
"msgSendPushMessageSuccess"
:
"we sent a push message"
"msgSendPushMessageSuccess"
:
"we sent a push message"
,
"error"
:
"Error"
}
\ No newline at end of file
abweb/common/json/lang/lang-ja.json
View file @
f0c78053
...
...
@@ -114,5 +114,6 @@
"categoryAll"
:
"すべて"
,
"reportForm"
:
"報告"
,
"periodicInspectionPeriod"
:
"定期点検期間"
,
"msgSendPushMessageSuccess"
:
"プッシュメッセージ送信しました。"
"msgSendPushMessageSuccess"
:
"プッシュメッセージ送信しました。"
,
"error"
:
"エラー"
}
\ No newline at end of file
abweb/common/json/lang/lang-ko.json
View file @
f0c78053
...
...
@@ -113,5 +113,6 @@
"categoryAll"
:
"All"
,
"reportForm"
:
"보고서"
,
"periodicInspectionPeriod"
:
"정기점검기간"
,
"msgSendPushMessageSuccess"
:
"푸시메시지를 보냈습니다."
"msgSendPushMessageSuccess"
:
"푸시메시지를 보냈습니다."
,
"error"
:
"에러"
}
\ No newline at end of file
abweb/html/accountSetting.html
View file @
f0c78053
...
...
@@ -33,12 +33,9 @@
<!-- header -->
<div
id=
"includedHeader"
></div>
<!-- account setting -->
<div
id=
"includedMainTitle"
></div>
<main
id=
"main"
>
<div
class=
"container-wrap"
>
<!-- title -->
<div
id=
"includedMainTitle"
></div>
<h1
class=
"fs-14 font-weight-bold pt-4 pb-3 mb-0 lang"
lang=
"accountSetting"
></h1>
<!-- content -->
<div
class=
"row"
>
<div
class=
"col-md-6 col-12 mb-4"
>
...
...
@@ -64,26 +61,26 @@
</tbody>
</table>
</div>
<div
class=
"col-md-6 col-12 mb-4"
>
<div
class=
"card p-4 password
"
>
<h2
class=
"fs-10 font-weight-bold mb-3 lang"
lang=
"dspPwdUpd"
>
パスワード変更
</h2
>
<form
>
<div
class=
"form-group mb-3"
>
<label
id=
"lblPwdCur"
class=
"lang"
lang=
"txtPwdCurr"
>
現在のパスワード
</label
>
<input
type=
"password"
class=
"form-control"
id=
"txtPwdCur"
maxlength=
"16"
aria-describedby=
"current"
>
<
/div
>
<div
class=
"form-group mb-3"
>
<label
id=
"lblPwdNew"
class=
"lang"
lang=
"txtPwdNew"
>
新しいパスワード
</label
>
<input
type=
"password"
class=
"form-control"
id=
"txtPwdNew"
maxlength=
"16"
aria-describedby=
"new"
>
<
/div
>
<div
class=
"form-group mb-4"
>
<label
id=
"lblPwdNewRe"
class=
"lang"
lang=
"txtPwdNewRe"
>
新しいパスワード
</label
>
<input
type=
"password"
class=
"form-control"
id=
"txtPwdNewRe"
maxlength=
"16"
aria-describedby=
"confirm"
>
<
/div
>
<p
class=
"error lang"
id=
"main-error-message"
style=
"display:none;"
>
パスワードまたはIDに誤りがあります
</p
>
<button
type=
"submit"
class=
"btn btn-primary lang"
lang=
"dspChange"
id=
"dspPwdUpd1"
>
変更
</button
>
<
/form
>
</
div
>
</div
>
<div
class=
"col-md-6 col-12 mb-4
"
>
<div
class=
"card p-4 password"
>
<h2
class=
"fs-10 font-weight-bold mb-3 lang"
lang=
"dspPwdUpd"
>
パスワード変更
</h2
>
<form
>
<div
class=
"form-group mb-3"
>
<label
id=
"lblPwdCur"
class=
"lang"
lang=
"txtPwdCurr"
>
現在のパスワード
</label
>
<
input
type=
"password"
class=
"form-control"
id=
"txtPwdCur"
maxlength=
"16"
aria-describedby=
"current"
>
</div
>
<div
class=
"form-group mb-3"
>
<label
id=
"lblPwdNew"
class=
"lang"
lang=
"txtPwdNew"
>
新しいパスワード
</label
>
<
input
type=
"password"
class=
"form-control"
id=
"txtPwdNew"
maxlength=
"16"
aria-describedby=
"new"
>
</div
>
<div
class=
"form-group mb-4"
>
<label
id=
"lblPwdNewRe"
class=
"lang"
lang=
"txtPwdNewRe"
>
新しいパスワード
</label
>
<
input
type=
"password"
class=
"form-control"
id=
"txtPwdNewRe"
maxlength=
"16"
aria-describedby=
"confirm"
>
</div
>
<p
class=
"error lang"
id=
"main-error-message"
style=
"display:none;"
>
パスワードまたはIDに誤りがあります
</p
>
<
button
type=
"submit"
class=
"btn btn-primary lang"
lang=
"dspChange"
id=
"dspPwdUpd1"
>
変更
</button
>
</
form
>
</div>
</div>
</div>
...
...
@@ -96,7 +93,7 @@
<i
class=
"text-right fas fa-times fa-2x loading-close"
onclick=
"COMMON.alertClose();"
></i>
<div
class=
"fs-13 mt-4 text-left"
style=
"padding: 15px;"
id=
"alertMsg"
></div>
</div>
<input
type=
"hidden"
id=
"getToken"
>
<!-- confirm -->
<div
id=
"includedConfirmModal"
></div>
<script
type=
"text/javascript"
src=
"../common/js/app.js?__UPDATEID__"
></script>
...
...
abweb/html/index.html
View file @
f0c78053
...
...
@@ -21,8 +21,6 @@
<script
src=
"../common/js/constant.js?__UPDATEID__"
></script>
<script
src=
"../common/js/common.js?__UPDATEID__"
></script>
<script
src=
"../common/js/header.js?__UPDATEID__"
></script>
<script
src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"
></script>
<script
src=
"https://cdn.jsdelivr.net/npm/gasparesganga-jquery-loading-overlay@2.1.7/dist/loadingoverlay.min.js"
></script>
<script
src=
"../js/template/template.js?__UPDATEID__"
></script>
<script
src=
"../js/operationList/operationList.js?__UPDATEID__"
></script>
...
...
abweb/js/login/login.js
View file @
f0c78053
...
...
@@ -390,11 +390,11 @@ LOGIN.changeLanguage = function (lang) {
// Login click function
LOGIN
.
loginFunction
=
function
()
{
COMMON
.
showLoading
();
//
COMMON.showLoading();
if
(
LOGIN
.
checkValidation
())
{
LOGIN
.
processLogin
();
}
else
{
COMMON
.
closeLoading
();
//
COMMON.closeLoading();
}
};
...
...
@@ -424,14 +424,14 @@ LOGIN.skipPassFunction = function () {
// Open Change Password Dialog
LOGIN
.
OpenChangePasswordDialog
=
function
()
{
$
(
'#password-reset-modal'
).
show
();
COMMON
.
showLoading
();
//
COMMON.showLoading();
console
.
log
(
'password open'
);
};
// Close Chnage Password Dialog
LOGIN
.
CloseChangePasswordDialog
=
function
()
{
$
(
'#main-password-change'
).
hide
();
COMMON
.
closeLoading
();
//
COMMON.closeLoading();
};
// Save Service Option
...
...
abweb/js/operationList/operationList.js
View file @
f0c78053
...
...
@@ -449,7 +449,7 @@ OL.sortOperationList = function (sortNumber) {
* search operarionList
*/
OL
.
search
=
function
()
{
COMMON
.
showLoading
();
//
COMMON.showLoading();
const
searchKeyword
=
$
(
'#searchTaskName'
).
val
();
const
searchStartDate
=
$
(
'#searchStartDate'
).
val
();
const
searchEndDate
=
$
(
'#searchEndDate'
).
val
();
...
...
abweb/js/reportList/reportList.js
View file @
f0c78053
...
...
@@ -16,10 +16,7 @@ RL.init = function () {
RL
.
checkQuickReport
();
RL
.
loadCommon
();
RL
.
initTaskReportList
();
<<<<<<<
HEAD
// COMMON.closeLoading();
=======
>>>>>>>
10
c2cc5b3dcd3a3e569902c5e870db4e067ce037
};
/**
...
...
abweb/js/setting/settings.js
View file @
f0c78053
...
...
@@ -4,18 +4,34 @@
**/
var
SETTINGS
=
{};
// SETTINGS.TOKEN_VALUE = "";
// Init function of page
$
(
document
).
ready
(
function
()
{
//Check if user is logged in
// SETTINGS.TOKEN_VALUE = random;
COMMON
.
checkAuth
(
false
);
SETTINGS
.
getToken
();
SETTINGS
.
initScreen
();
$
(
'#dspPwdUpd1'
).
click
(
SETTINGS
.
dspPwdUpd1_Click
);
COMMON
.
closeLoading
();
//
COMMON.closeLoading();
});
SETTINGS
.
getToken
=
function
()
{
var
params
=
{
sid
:
ClientData
.
userInfo_sid
(),
};
const
url
=
COMMON
.
format
(
ClientData
.
conf_checkApiUrl
(),
ClientData
.
userInfo_accountPath
())
+
CONSTANT
.
URL
.
CMS
.
API
.
PASSWORD_GET_TOKEN
;
COMMON
.
cmsAjax
(
url
,
params
,
false
,
function
(
data
)
{
$
(
'#getToken'
).
val
(
data
);
},
function
(
data
)
{
if
(
data
.
errorMessage
)
{
COMMON
.
displayAlert
(
data
.
errorMessage
);
}
else
{
COMMON
.
displayAlert
(
'msgPwdChangeOK'
);
}
});
};
/**
* Process changing password
* @param {*} e
...
...
@@ -75,17 +91,22 @@ SETTINGS.dspPwdUpd1_Click = function (e) {
}
// Do changing password
if
(
isOK
)
{
var
getToken
=
$
(
"#getToken"
).
val
();
var
params
=
{
sid
:
ClientData
.
userInfo_sid
(),
loginId
:
ClientData
.
userInfo_loginId_session
(),
password
:
SETTINGS
.
getCurrentPassword
(),
newPassword
:
SETTINGS
.
getNewPassword
(),
language
:
I18N
.
getCurrentLanguage
(),
token
:
""
,
token
:
getToken
,
appId
:
4
,
};
// if (SETTINGS.TOKEN_VALUE != getToken) {
// COMMON.displayAlert("error");
// return;
// }
const
url
=
COMMON
.
format
(
ClientData
.
conf_checkApiUrl
(),
ClientData
.
userInfo_accountPath
())
+
CONSTANT
.
URL
.
CMS
.
API
.
PASSWORD_CHANGE
;
COMMON
.
cmsAjax
(
url
,
params
,
false
,
SETTINGS
.
avwCmsApi_passwordChange_success
,
SETTINGS
.
avwCmsApi_passwordChange_fail
);
}
else
{
...
...
abweb/js/template/template.js
View file @
f0c78053
...
...
@@ -5,7 +5,7 @@
var
TEMPLATE
=
{};
/** template load header */
TEMPLATE
.
loadHea
r
der
=
function
(
elmentId
)
{
TEMPLATE
.
loadHeader
=
function
(
elmentId
)
{
// COMMON.showLoading();
$
(
elmentId
).
load
(
'../common/html/header.html'
,
function
()
{
$
(
'#iconHomeDashboard'
).
removeClass
(
'active'
);
...
...
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