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
deff63f5
Commit
deff63f5
authored
Nov 16, 2022
by
Kang Donghun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check login information in window.sessionStorage
parent
99c621b6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
95 additions
and
215 deletions
+95
-215
abweb/common/css/loading.css
+1
-1
abweb/common/js/common.js
+86
-1
abweb/common/js/header.js
+4
-196
abweb/common/json/sys/conf.json
+1
-1
abweb/html/pdfPrint.html
+1
-14
abweb/js/setting/settings.js
+1
-1
env.sh
+1
-1
No files found.
abweb/common/css/loading.css
View file @
deff63f5
...
...
@@ -5,7 +5,7 @@
height
:
100vh
;
width
:
100vw
;
display
:
block
;
background
:
rgb
(
255
,
255
,
255
,
.
5
);
background
:
rgb
(
255
,
255
,
25
5
);
background-position
:
center
;
background-image
:
url("../img/loading.gif")
;
background-repeat
:
no-repeat
;
...
...
abweb/common/js/common.js
View file @
deff63f5
...
...
@@ -13,8 +13,34 @@
*/
var
COMMON
=
{};
CONSTANT
.
PAGE_NAME
=
{
DASHBOARD
:
'dashboard'
,
OPERATION_LIST
:
'workList'
,
REPORT_LIST
:
'reportList'
,
REPORT_FORM
:
'reportForm'
,
MESSAGE_DETAIL
:
'pushMessageDetail'
,
MESSAGE_LIST
:
'pushMessageList'
,
SEND_MESSAGE
:
'sendMessage'
,
SETTING
:
'accountSetting'
,
PICKUP
:
'pickup'
,
PDF_PRINT
:
'pdfPrint'
,
DEFAULT
:
'index'
,
LOGIN
:
'./login.html'
,
};
COMMON
.
loginCheckPageList
=
[
CONSTANT
.
PAGE_NAME
.
DEFAULT
,
CONSTANT
.
PAGE_NAME
.
DASHBOARD
,
CONSTANT
.
PAGE_NAME
.
REPORT_LIST
,
CONSTANT
.
PAGE_NAME
.
REPORT_FORM
,
CONSTANT
.
PAGE_NAME
.
MESSAGE_DETAIL
,
CONSTANT
.
PAGE_NAME
.
MESSAGE_LIST
,
CONSTANT
.
PAGE_NAME
.
SEND_MESSAGE
,
CONSTANT
.
PAGE_NAME
.
SETTING
,
CONSTANT
.
PAGE_NAME
.
PICKUP
,
CONSTANT
.
PAGE_NAME
.
PDF_PRINT
];
COMMON
.
hasErrorKey
=
'AVW_HASERR'
;
$
(
document
).
ready
(
function
()
{
if
(
location
.
href
.
includes
(
COMMON
.
loginCheckPageList
))
{
if
(
!
COMMON
.
checkLogin
(
CONSTANT
.
PAGE_NAME
.
LOGIN
)){
return
;
}
}
})
/**
* page transition without outputting a warning message
* @param {*} url
...
...
@@ -557,13 +583,17 @@ var UserSession = function () {
*/
UserSession
.
prototype
.
init
=
function
(
option
)
{
this
.
available
=
false
;
console
.
log
(
"kdh check userSession init option : "
+
option
);
if
(
option
==
'restore'
)
{
var
value
=
null
;
try
{
value
=
this
.
_get
(
'init'
);
console
.
log
(
"kdh check userSession init value : "
+
value
);
}
catch
(
e
)
{
value
=
null
;
console
.
log
(
"kdh check userSession init catch : "
+
e
);
}
finally
{
console
.
log
(
"kdh check userSession init final : "
+
value
);
if
(
value
)
{
this
.
available
=
true
;
}
...
...
@@ -600,6 +630,7 @@ UserSession.prototype.set = function (key, value) {
* @returns
*/
UserSession
.
prototype
.
get
=
function
(
key
)
{
console
.
log
(
"kdh check userSession get"
);
var
value
=
null
;
if
(
this
.
available
)
{
value
=
this
.
_get
(
key
);
...
...
@@ -745,13 +776,16 @@ COMMON.setErrorState = function () {
/* get user session object */
COMMON
.
userSession
=
function
()
{
if
(
!
COMMON
.
userSessionObj
)
{
console
.
log
(
"kdh check userSession : COMMON.userSessionObj null"
);
var
obj
=
new
UserSession
();
obj
.
init
(
'restore'
);
if
(
obj
.
available
)
{
console
.
log
(
"kdh check userSession : COMMON.userSessionObj available"
);
COMMON
.
userSessionObj
=
obj
;
return
COMMON
.
userSessionObj
;
}
else
{
return
null
;
console
.
log
(
"kdh check userSession : COMMON.userSessionObj unavailable"
);
return
CO
;
}
}
return
COMMON
.
userSessionObj
;
...
...
@@ -793,6 +827,7 @@ var SessionStorageUtils = {
}
},
get
:
function
(
strKey
)
{
console
.
log
(
"kdh check SessionStorageUtils get : "
+
strKey
);
return
COMMON
.
userSession
().
get
(
strKey
);
},
set
:
function
(
strKey
,
objValue
)
{
...
...
@@ -962,6 +997,56 @@ COMMON.currentTime = function () {
return
Date
.
now
();
};
/**
* check login information in window.sessionStorage
*
* @returns boolean
*/
COMMON
.
checkLogin
=
function
(
option
)
{
var
userSession
=
COMMON
.
userSession
();
if
(
!
userSession
)
{
/* エラー画面を表示 */
var
tags
=
'<div id="avw-auth-error">'
+
'<div style="display:table; width:100%; height:100%;">'
+
'<div style="display:table-cell; text-align:center; vertical-align:middle;">'
+
'<p><h4>Authentication error</h4>Please use it after login.</p>'
+
'<div><button id="avw-unauth-ok">OK</button></div>'
+
'</div></div></div>'
;
$
(
'body'
).
prepend
(
tags
);
$
(
'#avw-auth-error'
).
css
({
'opacity'
:
1
,
'position'
:
'fixed'
,
'top'
:
'0'
,
'left'
:
'0'
,
'width'
:
$
(
window
).
width
(),
'height'
:
$
(
window
).
height
(),
'zIndex'
:
'10000'
});
// resize error page
$
(
window
).
resize
(
function
()
{
$
(
'#avw-auth-error'
).
css
(
{
'width'
:
$
(
window
).
width
(),
'height'
:
$
(
window
).
height
()
});
});
var
returnPage
;
if
(
option
)
{
returnPage
=
option
}
else
{
var
sysSetting
=
COMMON
.
sysSetting
();
returnPage
=
sysSetting
.
loginPage
;
}
/* ログイン画面に戻る */
$
(
'#avw-unauth-ok'
).
click
(
function
()
{
window
.
location
=
returnPage
;
});
return
false
;
}
return
true
;
}
/*
* Operations for session storage [ end ]
*/
...
...
abweb/common/js/header.js
View file @
deff63f5
This diff is collapsed.
Click to expand it.
abweb/common/json/sys/conf.json
View file @
deff63f5
...
...
@@ -13,7 +13,7 @@
"pushPageCount"
:
5
,
"pushTimePeriod"
:
60
,
"debug"
:
true
,
"loginPage"
:
"
index
.html"
,
"loginPage"
:
"
login
.html"
,
"anonymousLoginFlg"
:
false
,
"anonymousLoginPath"
:
"test"
,
"anonymousLoginId"
:
"nologin"
,
...
...
abweb/html/pdfPrint.html
View file @
deff63f5
...
...
@@ -42,20 +42,7 @@
<div
id=
"includedHeader"
></div>
<!-- title -->
<div
id=
"main-ttl"
>
<div
class=
"container-wrap"
>
<!-- breadcrumb -->
<nav
aria-label=
"breadcrumb"
>
<ol
class=
"breadcrumb px-0 mb-0"
>
<li
class=
"breadcrumb-item"
><a
href=
"task-list.html"
class=
"text-decoration-none text-underline"
>
作業一覧
</a></li>
<li
class=
"breadcrumb-item"
><a
href=
"report-list.html"
class=
"text-decoration-none text-underline"
>
報告一覧
</a></li>
<li
class=
"breadcrumb-item active"
aria-current=
"page"
><span>
pdf出力
</span></li>
</ol>
</nav>
<!-- title -->
<h1
class=
"fs-14 font-weight-bold pt-sm-4 pt-2 pb-3 mb-0"
>
pdf出力
</h1>
</div>
</div>
<div
id=
"includedMainTitle"
></div>
<!-- ↓↓↓ ここから共通HTML ↓↓↓ -->
<div
class=
"container-wrap mb-5"
id=
"pdfPrintDiv"
></div>
...
...
abweb/js/setting/settings.js
View file @
deff63f5
...
...
@@ -35,7 +35,7 @@ SETTINGS.getToken = function () {
if
(
data
.
errorMessage
)
{
COMMON
.
displayAlert
(
data
.
errorMessage
);
}
else
{
COMMON
.
displayAlert
(
'msgPwdChange
OK
'
);
COMMON
.
displayAlert
(
'msgPwdChange
NG
'
);
}
});
};
...
...
env.sh
View file @
deff63f5
...
...
@@ -32,7 +32,7 @@ modify_api()
"pushPageCount" : 5,
"pushTimePeriod" : 60,
"debug" : false,
"loginPage" : "
index
.html",
"loginPage" : "
login
.html",
"anonymousLoginFlg" : false,
"anonymousLoginPath" : "test",
"anonymousLoginId" : "nologin",
...
...
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