Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
design
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
abookCheck
design
Commits
123f0d71
Commit
123f0d71
authored
Aug 21, 2022
by
NGUYEN HOANG SON
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement init session parameter
parent
0e078919
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
9 deletions
+70
-9
app/index.html
+8
-2
app/script/check-footer.js
+6
-3
app/script/check.js
+56
-4
No files found.
app/index.html
View file @
123f0d71
...
...
@@ -212,10 +212,16 @@
<script>
$
(
document
).
ready
(
function
()
{
$
(
"#footer"
).
load
(
"main-footer.html"
,
function
()
{
if
(
CHK_DashboardSetting
.
isSettingEnabled
(
CHK_Dashboard
.
settingKey
.
dashboardHome
)
)
{
if
(
location
.
hash
===
'#dashboard'
)
{
CHK_Footer
.
goDashboard
();
}
else
{
}
else
if
(
location
.
hash
===
'#operationList'
)
{
CHK_Footer
.
goOperationList
();
}
else
{
if
(
CHK_DashboardSetting
.
isSettingEnabled
(
CHK_Dashboard
.
settingKey
.
dashboardHome
))
{
CHK_Footer
.
goDashboard
();
}
else
{
CHK_Footer
.
goOperationList
();
}
}
});
});
...
...
app/script/check-footer.js
View file @
123f0d71
...
...
@@ -49,8 +49,9 @@ CHK_Footer.isIndexPage = function() {
return
false
;
}
CHK_Footer
.
goIndexPage
=
function
()
{
location
.
href
=
'index.html'
;
CHK_Footer
.
goIndexPage
=
function
(
param
)
{
var
href
=
'index.html'
+
param
;
location
.
href
=
href
;
}
CHK_Footer
.
activeDashboardBottomNav
=
function
()
{
...
...
@@ -64,7 +65,7 @@ CHK_Footer.goDashboard = function() {
CHK_Footer
.
showPage
(
'dashboard'
);
return
;
}
CHK_Footer
.
goIndexPage
();
CHK_Footer
.
goIndexPage
(
'#dashboard'
);
}
CHK_Footer
.
goOperationList
=
function
()
{
...
...
@@ -74,4 +75,5 @@ CHK_Footer.goOperationList = function() {
CHK_Footer
.
showPage
(
'operationList'
);
return
;
}
CHK_Footer
.
goIndexPage
(
'#operationList'
);
}
\ No newline at end of file
app/script/check.js
View file @
123f0d71
...
...
@@ -313,6 +313,48 @@ CHK.hasAddTaskAuthority = function() {
});
};
CHK
.
sessionKeys
=
[
'reportType'
,
'isCms'
,
'isWeb'
,
'isWindows'
,
'isAndroid'
,
'isIOS'
,
'isRFIDBarcodeScan'
,
'isOperationGroupMaster'
,
'lang'
,
'debug'
,
'isMobile'
,
];
CHK
.
loadSessionData
=
function
()
{
if
(
typeof
sessionStorage
.
CHK
===
'undefined'
)
{
return
{};
}
let
sessionData
=
JSON
.
parse
(
sessionStorage
.
CHK
);
if
(
typeof
sessionData
!==
'object'
)
{
return
{};
}
return
sessionData
;
}
CHK
.
loadSessionKey
=
function
(
key
)
{
let
sessionData
=
CHK
.
loadSessionData
();
if
(
typeof
sessionData
[
key
]
!==
'undefined'
&&
typeof
CHK
[
key
]
===
'undefined'
)
{
CHK
[
key
]
=
sessionData
[
key
];
}
}
CHK
.
loadInitSession
=
function
()
{
let
sessionData
=
CHK
.
loadSessionData
();
CHK
.
sessionKeys
.
forEach
(
function
(
key
)
{
if
(
typeof
sessionData
[
key
]
!==
'undefined'
&&
typeof
CHK
[
key
]
===
'undefined'
)
{
CHK
[
key
]
=
sessionData
[
key
];
}
});
}
CHK
.
saveInitSession
=
function
()
{
var
sessionData
=
{};
CHK
.
sessionKeys
.
forEach
(
function
(
key
)
{
if
(
typeof
CHK
[
key
]
!==
'undefined'
)
{
sessionData
[
key
]
=
CHK
[
key
];
}
});
sessionStorage
.
CHK
=
JSON
.
stringify
(
sessionData
);
}
// 共通初期処理
CHK
.
initCommon
=
function
()
{
//JSON初期化
...
...
@@ -333,6 +375,14 @@ CHK.initCommon = function() {
CHK
.
isOperationGroupMaster
=
urlParam
.
isOperationGroupMaster
&&
urlParam
.
isOperationGroupMaster
==
"1"
;
if
(
typeof
CHK
.
sortIndex
==
'undefined'
)
CHK
.
sortIndex
=
urlParam
.
sortIndex
;
CHK
.
lang
=
urlParam
.
lang
;
CHK
.
debug
=
urlParam
.
debug
;
CHK
.
isMobile
=
urlParam
.
mobile_flg
&&
urlParam
.
mobile_flg
==
"1"
;
CHK
.
loadInitSession
();
if
(
typeof
location
.
pathname
===
'string'
&&
location
.
pathname
.
includes
(
'index.html'
)
==
true
)
{
//save url parameter of top page
CHK
.
saveInitSession
();
}
// ウェブの場合、作業一覧の表示広さを変更
if
(
CHK
.
isWeb
)
{
...
...
@@ -351,8 +401,6 @@ CHK.initCommon = function() {
$
(
"#operationGroupMasterButton"
).
removeClass
(
"d-none"
);
}
CHK
.
debug
=
urlParam
.
debug
;
CHK
.
isMobile
=
urlParam
.
mobile_flg
&&
urlParam
.
mobile_flg
==
"1"
;
if
(
CHK
.
isCms
)
{
CHK
.
setBeforeunload
();
}
...
...
@@ -2036,7 +2084,7 @@ CHK.generateUuid = function() {
*
*/
CHK
.
getUrlParameter
=
function
()
{
var
ret
;
var
ret
=
{}
;
if
(
location
.
search
)
{
var
param
=
{};
location
.
search
.
substring
(
1
).
split
(
'&'
).
forEach
(
function
(
val
)
{
...
...
@@ -3288,9 +3336,13 @@ CHK.openCategory = function() {
$
(
document
).
ready
(
function
()
{
var
urlParam
=
CHK
.
getUrlParameter
();
CHK
.
lang
=
'ja'
;
if
(
typeof
urlParam
!==
'undefined'
&&
typeof
urlParam
.
lang
!==
'undefined'
)
{
CHK
.
lang
=
urlParam
.
lang
;
}
else
{
CHK
.
loadSessionKey
(
'lang'
);
}
if
(
typeof
CHK
.
lang
===
'undefined'
)
{
CHK
.
lang
=
'ja'
;
}
console
.
log
(
"CHK.lang:"
+
CHK
.
lang
);
...
...
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