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
0a93e7e8
Commit
0a93e7e8
authored
Oct 11, 2022
by
Takumi Imai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "constant footer operationLIst topPageの名前を変更"
This reverts commit
88d0aff8
.
parent
88d0aff8
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
268 additions
and
256 deletions
+268
-256
abvw/common/js/appCommon/app.js
+0
-0
abvw/common/js/appCommon/check-common.js
+14
-14
abvw/common/js/appCommon/check-footer.js
+68
-66
abvw/common/js/appCommon/constant.js
+11
-11
abvw/html/index.html
+12
-12
abvw/html/main-footer.html
+2
-2
abvw/js/dashboardSetting/check-dashboard-setting.js
+36
-32
abvw/js/operationList/operationList.js
+106
-104
abvw/js/topPage/topPage.js
+19
-15
No files found.
abvw/common/js/app.js
→
abvw/common/js/app
Common/app
.js
View file @
0a93e7e8
File moved
abvw/common/js/appCommon/check-common.js
View file @
0a93e7e8
...
@@ -21,12 +21,12 @@ CHK_Common.lang;
...
@@ -21,12 +21,12 @@ CHK_Common.lang;
*/
*/
CHK_Common
.
setLangCodeWeb
=
function
()
{
CHK_Common
.
setLangCodeWeb
=
function
()
{
let
lang
=
CHK_Common
.
getLangWeb
();
let
lang
=
CHK_Common
.
getLangWeb
();
if
(
lang
.
split
(
'-'
)[
0
]
==
CONSTANT
.
LANG
.
English
)
{
if
(
lang
.
split
(
'-'
)[
0
]
==
C
HK_C
ONSTANT
.
LANG
.
English
)
{
lang
=
CONSTANT
.
LANG
.
ENGLISH
;
lang
=
C
HK_C
ONSTANT
.
LANG
.
ENGLISH
;
}
else
if
(
lang
.
split
(
'-'
)[
0
]
==
CONSTANT
.
LANG
.
KOREA
)
{
}
else
if
(
lang
.
split
(
'-'
)[
0
]
==
C
HK_C
ONSTANT
.
LANG
.
KOREA
)
{
lang
=
CONSTANT
.
LANG
.
KOREA
;
lang
=
C
HK_C
ONSTANT
.
LANG
.
KOREA
;
}
else
{
}
else
{
lang
=
CONSTANT
.
LANG
.
JAPAN
;
lang
=
C
HK_C
ONSTANT
.
LANG
.
JAPAN
;
}
}
CHK_Common
.
lang
=
lang
;
CHK_Common
.
lang
=
lang
;
};
};
...
@@ -39,11 +39,11 @@ CHK_Common.setLangCodeWeb = function () {
...
@@ -39,11 +39,11 @@ CHK_Common.setLangCodeWeb = function () {
CHK_Common
.
getLangWeb
=
function
()
{
CHK_Common
.
getLangWeb
=
function
()
{
if
(
!
CHK_Common
.
lang
)
{
if
(
!
CHK_Common
.
lang
)
{
let
pageLang
;
let
pageLang
;
if
(
localStorage
[
CONSTANT
.
LANG
.
SAVE_NAME
])
{
if
(
localStorage
[
C
HK_C
ONSTANT
.
LANG
.
SAVE_NAME
])
{
pageLang
=
localStorage
[
CONSTANT
.
LANG
.
SAVE_NAME
];
pageLang
=
localStorage
[
C
HK_C
ONSTANT
.
LANG
.
SAVE_NAME
];
}
else
{
}
else
{
pageLang
=
(
window
.
navigator
.
languages
&&
window
.
navigator
.
languages
[
0
])
||
window
.
navigator
.
language
||
window
.
navigator
.
userLanguage
||
window
.
navigator
.
browserLanguage
;
pageLang
=
(
window
.
navigator
.
languages
&&
window
.
navigator
.
languages
[
0
])
||
window
.
navigator
.
language
||
window
.
navigator
.
userLanguage
||
window
.
navigator
.
browserLanguage
;
localStorage
[
CONSTANT
.
LANG
.
SAVE_NAME
]
=
pageLang
;
localStorage
[
C
HK_C
ONSTANT
.
LANG
.
SAVE_NAME
]
=
pageLang
;
}
}
return
pageLang
;
return
pageLang
;
}
else
{
}
else
{
...
@@ -81,7 +81,7 @@ CHK_Common.updateLang = function () {
...
@@ -81,7 +81,7 @@ CHK_Common.updateLang = function () {
* @returns String msg
* @returns String msg
*/
*/
CHK_Common
.
getMsg
=
function
(
key
)
{
CHK_Common
.
getMsg
=
function
(
key
)
{
const
msg
=
CONSTANT
.
MSG_MAP
[
key
];
const
msg
=
C
HK_C
ONSTANT
.
MSG_MAP
[
key
];
if
(
!
msg
)
{
if
(
!
msg
)
{
return
''
;
return
''
;
}
}
...
@@ -165,7 +165,7 @@ CHK_Common.alertClose = function () {
...
@@ -165,7 +165,7 @@ CHK_Common.alertClose = function () {
*/
*/
CHK_Common
.
goUrlWithCurrentParams
=
function
(
url
,
params
)
{
CHK_Common
.
goUrlWithCurrentParams
=
function
(
url
,
params
)
{
if
(
!
params
)
{
if
(
!
params
)
{
location
.
href
=
CONSTANT
.
URL
.
BASE_WEB
+
url
;
location
.
href
=
C
HK_C
ONSTANT
.
URL
.
BASE_WEB
+
url
;
}
}
const
mixParams
=
Object
.
assign
(
CHK_Common
.
getUrlParameter
(),
params
);
const
mixParams
=
Object
.
assign
(
CHK_Common
.
getUrlParameter
(),
params
);
...
@@ -203,7 +203,7 @@ CHK_Common.getUrlParameter = function () {
...
@@ -203,7 +203,7 @@ CHK_Common.getUrlParameter = function () {
* @returns sid
* @returns sid
*/
*/
CHK_Common
.
getSid
=
function
()
{
CHK_Common
.
getSid
=
function
()
{
return
ClientData
.
userInfo_sid_local
();
return
ClientData
.
userInfo_sid_local
();
};
};
/**
/**
...
@@ -228,7 +228,7 @@ CHK_Common.cmsAjax = function (url, param, async = true, callback, errorCallback
...
@@ -228,7 +228,7 @@ CHK_Common.cmsAjax = function (url, param, async = true, callback, errorCallback
if
(
result
.
status
==
'200'
)
{
if
(
result
.
status
==
'200'
)
{
if
(
callback
)
callback
(
result
);
if
(
callback
)
callback
(
result
);
}
else
if
(
result
.
status
==
'401'
)
{
}
else
if
(
result
.
status
==
'401'
)
{
CHK_Common
.
goUrlWithCurrentParams
(
CONSTANT
.
PAGE_NAME
.
LOGIN
);
CHK_Common
.
goUrlWithCurrentParams
(
C
HK_C
ONSTANT
.
PAGE_NAME
.
LOGIN
);
}
else
if
(
errorCallback
)
{
}
else
if
(
errorCallback
)
{
errorCallback
();
errorCallback
();
}
else
{
}
else
{
...
@@ -289,8 +289,8 @@ CHK_Common.postCommunication = function (url, params, method = 'post') {
...
@@ -289,8 +289,8 @@ CHK_Common.postCommunication = function (url, params, method = 'post') {
CHK_Common
.
checkAuth
=
function
(
async
=
true
)
{
CHK_Common
.
checkAuth
=
function
(
async
=
true
)
{
let
params
=
{};
let
params
=
{};
params
.
sid
=
CHK_Common
.
getSid
;
params
.
sid
=
CHK_Common
.
getSid
;
const
url
=
C
ONSTANT
.
URL
.
BASE_CMS
+
CONSTANT
.
URL
.
AUTH_SESSION
;
const
url
=
C
HK_CONSTANT
.
URL
.
BASE_CMS
+
CHK_
CONSTANT
.
URL
.
AUTH_SESSION
;
CHK_Common
.
cmsAjax
(
url
,
params
,
async
,
null
,
function
()
{
CHK_Common
.
cmsAjax
(
url
,
params
,
async
,
null
,
function
()
{
CHK_Common
.
goUrlWithCurrentParams
(
CONSTANT
.
PAGE_NAME
.
LOGIN
);
CHK_Common
.
goUrlWithCurrentParams
(
C
HK_C
ONSTANT
.
PAGE_NAME
.
LOGIN
);
});
});
};
};
abvw/common/js/footer.js
→
abvw/common/js/
appCommon/check-
footer.js
View file @
0a93e7e8
/**
/**
* Common js for footer.
* Common js for footer.
* ※Code is written mainly for dashboard and operationList.
* ※Code is written mainly for dashboard and operationList.
*
*
* @since cms:1.4.3.2&1.4.3.3 web:1.0
* @since cms:1.4.3.2&1.4.3.3 web:1.0
*/
*/
var
FOOTER
=
{};
var
CHK_Footer
=
{};
/**
/**
* Change specific footer bottom to active.
* Change specific footer bottom to active.
*
*
* @param {String} bottomNavId
* @param {String} bottomNavId
*/
*/
FOOTER
.
activeBottomNav
=
function
(
bottomNavId
)
{
CHK_Footer
.
activeBottomNav
=
function
(
bottomNavId
)
{
let
elm
=
$
(
'#'
+
bottomNavId
);
let
elm
=
$
(
"#"
+
bottomNavId
);
if
(
typeof
elm
!==
'object'
)
{
if
(
typeof
elm
!==
'object'
)
{
console
.
log
(
'
FOOTER
.activeBottomNav:elm !== object:'
+
bottomNavId
);
console
.
log
(
'
CHK_Footer
.activeBottomNav:elm !== object:'
+
bottomNavId
);
return
;
return
;
}
}
elm
.
removeClass
(
'text-secondary'
);
elm
.
removeClass
(
'text-secondary'
);
elm
.
addClass
(
'text-primary'
);
elm
.
addClass
(
"text-primary"
);
let
img
=
elm
.
find
(
'img'
)[
0
];
let
img
=
elm
.
find
(
"img"
)[
0
];
if
(
img
&&
img
.
getAttribute
(
'data-src'
))
{
if
(
img
&&
img
.
getAttribute
(
"data-src"
))
{
img
.
src
=
img
.
getAttribute
(
'data-src'
);
img
.
src
=
img
.
getAttribute
(
"data-src"
);
}
}
}
;
}
/**
/**
* change inactive all footer bottom
* change inactive all footer bottom
*/
*/
FOOTER
.
inactiveAllBottomNav
=
function
()
{
CHK_Footer
.
inactiveAllBottomNav
=
function
()
{
let
navs
=
document
.
getElementsByClassName
(
'bottom-nav'
);
let
navs
=
document
.
getElementsByClassName
(
"bottom-nav"
);
for
(
i
=
0
;
i
<
navs
.
length
;
i
++
)
{
for
(
i
=
0
;
i
<
navs
.
length
;
i
++
)
{
navs
[
i
].
className
=
navs
[
i
].
className
.
replace
(
'text-primary'
,
'text-secondary'
);
navs
[
i
].
className
=
navs
[
i
].
className
.
replace
(
"text-primary"
,
"text-secondary"
);
let
img
=
navs
[
i
].
querySelector
(
'img'
);
let
img
=
navs
[
i
].
querySelector
(
"img"
);
if
(
img
&&
img
.
getAttribute
(
'data-inactive-src'
))
{
if
(
img
&&
img
.
getAttribute
(
'data-inactive-src'
))
{
img
.
src
=
img
.
getAttribute
(
'data-inactive-src'
);
img
.
src
=
img
.
getAttribute
(
'data-inactive-src'
);
}
}
}
}
}
;
}
/**
/**
* Go page of index.html.
* Go page of index.html.
* Store tab id in session for want to show display.
* Store tab id in session for want to show display.
*
*
* @param {String} tabId
* @param {String} tabId
*/
*/
FOOTER
.
goIndexPage
=
function
(
tabId
)
{
CHK_Footer
.
goIndexPage
=
function
(
tabId
)
{
sessionStorage
.
activeTab
=
tabId
;
sessionStorage
.
activeTab
=
tabId
;
CHK_Common
.
goUrlWithCurrentParams
(
DAFAULT_PAGE
);
CHK_Common
.
goUrlWithCurrentParams
(
DAFAULT_PAGE
);
}
;
}
/**
/**
* is the url index.html?
* is the url index.html?
*/
*/
FOOTER
.
isIndexPage
=
function
()
{
CHK_Footer
.
isIndexPage
=
function
()
{
if
(
typeof
location
===
'object'
&&
typeof
location
.
pathname
===
'string'
)
{
if
(
typeof
location
===
'object'
&&
typeof
location
.
pathname
===
'string'
)
{
if
(
location
.
pathname
.
includes
(
CONSTANT
.
PAGE_NAME
.
DEFAULT
)
==
true
)
{
if
(
location
.
pathname
.
includes
(
C
HK_C
ONSTANT
.
PAGE_NAME
.
DEFAULT
)
==
true
)
{
return
true
;
return
true
;
}
}
}
}
return
false
;
return
false
;
}
;
}
/**
/**
* Initialize with any navigation
* Initialize with any navigation
*
*
* @param {String} bottomNav
* @param {String} bottomNav
*/
*/
FOOTER
.
activeInitBottomNav
=
function
(
bottomNav
)
{
CHK_Footer
.
activeInitBottomNav
=
function
(
bottomNav
)
{
FOOTER
.
inactiveAllBottomNav
();
CHK_Footer
.
inactiveAllBottomNav
();
FOOTER
.
activeBottomNav
(
bottomNav
);
CHK_Footer
.
activeBottomNav
(
bottomNav
);
}
;
}
/**
/**
* Go page of dashboard
* Go page of dashboard
*/
*/
FOOTER
.
goDashboard
=
function
()
{
CHK_Footer
.
goDashboard
=
function
()
{
sessionStorage
.
activeTab
=
CONSTANT
.
PAGE_TAB
.
DASHBOARD
;
sessionStorage
.
activeTab
=
C
HK_C
ONSTANT
.
PAGE_TAB
.
DASHBOARD
;
FOOTER
.
activeInitBottomNav
(
'dashboardBottomNav'
);
CHK_Footer
.
activeInitBottomNav
(
'dashboardBottomNav'
);
if
(
FOOTER
.
isIndexPage
())
{
if
(
CHK_Footer
.
isIndexPage
())
{
TOP
.
showPage
(
CONSTANT
.
PAGE_NAME
.
DASHBOARD
);
CHK_TOP
.
showPage
(
CHK_
CONSTANT
.
PAGE_NAME
.
DASHBOARD
);
return
;
return
;
}
}
FOOTER
.
goIndexPage
(
CONSTANT
.
PAGE_NAME
.
DASHBOARD
);
CHK_Footer
.
goIndexPage
(
CHK_
CONSTANT
.
PAGE_NAME
.
DASHBOARD
);
}
;
}
/**
/**
* Go page of operationList
* Go page of operationList
*/
*/
FOOTER
.
goOperationList
=
function
()
{
CHK_Footer
.
goOperationList
=
function
()
{
sessionStorage
.
activeTab
=
CONSTANT
.
PAGE_TAB
.
OPERATION_LIST
;
sessionStorage
.
activeTab
=
C
HK_C
ONSTANT
.
PAGE_TAB
.
OPERATION_LIST
;
FOOTER
.
activeInitBottomNav
(
'operationListBottomNav'
);
CHK_Footer
.
activeInitBottomNav
(
'operationListBottomNav'
);
if
(
FOOTER
.
isIndexPage
())
{
if
(
CHK_Footer
.
isIndexPage
())
{
TOP
.
showPage
(
CONSTANT
.
PAGE_NAME
.
OPERATION_LIST
);
CHK_TOP
.
showPage
(
CHK_
CONSTANT
.
PAGE_NAME
.
OPERATION_LIST
);
return
;
return
;
}
}
FOOTER
.
goIndexPage
(
CONSTANT
.
PAGE_NAME
.
OPERATION_LIST
);
CHK_Footer
.
goIndexPage
(
CHK_
CONSTANT
.
PAGE_NAME
.
OPERATION_LIST
);
}
;
}
/**
/**
* Go to active tab when footer was loaded.
* Go to active tab when footer was loaded.
* If it is no active tab, go to page in settings.
* If it is no active tab, go to page in settings.
*/
*/
FOOTER
.
initFooter
=
function
()
{
CHK_Footer
.
initFooter
=
function
()
{
$
(
'#footer'
).
load
(
CONSTANT
.
PAGE_NAME
.
FOOTER
,
function
()
{
$
(
"#footer"
).
load
(
CHK_CONSTANT
.
PAGE_NAME
.
FOOTER
,
function
()
{
if
(
typeof
sessionStorage
!=
'undefined'
&&
typeof
sessionStorage
.
activeTab
!=
'undefined'
)
{
if
(
sessionStorage
.
activeTab
==
CONSTANT
.
PAGE_TAB
.
DASHBOARD
)
{
if
(
typeof
sessionStorage
!=
'undefined'
&&
typeof
sessionStorage
.
activeTab
!=
'undefined'
)
{
FOOTER
.
goDashboard
();
if
(
sessionStorage
.
activeTab
==
CHK_CONSTANT
.
PAGE_TAB
.
DASHBOARD
)
{
}
else
{
CHK_Footer
.
goDashboard
();
FOOTER
.
goOperationList
();
}
else
{
}
CHK_Footer
.
goOperationList
();
return
;
}
}
return
;
}
FOOTER
.
goOperationList
();
// CHK.loadDashboardSetting(function() {
CHK_Footer
.
goOperationList
();
// if (CHK.dashboardSetting.dashboardHome) {
// CHK.loadDashboardSetting(function() {
// FOOTER.goDashboard();
// if (CHK.dashboardSetting.dashboardHome) {
// } else {
// CHK_Footer.goDashboard();
// FOOTER.goOperationList();
// } else {
// }
// CHK_Footer.goOperationList();
// });
// }
});
// });
};
});
}
\ No newline at end of file
abvw/common/js/constant.js
→
abvw/common/js/
appCommon/
constant.js
View file @
0a93e7e8
/**
/**
* constant js
* constant js
*
*
* @since
cms:1.4.3.2&1.4.3.3 web:1.0
* @since
1.4.3.2 & 1.4.3.3
*/
*/
const
CONSTANT
=
{};
const
C
HK_C
ONSTANT
=
{};
CONSTANT
.
SORT_TYPE
=
{
C
HK_C
ONSTANT
.
SORT_TYPE
=
{
NAME
:
0
,
NAME
:
0
,
START_DATE_DESC
:
1
,
START_DATE_DESC
:
1
,
START_DATE_ASC
:
2
,
START_DATE_ASC
:
2
,
...
@@ -13,7 +13,7 @@ CONSTANT.SORT_TYPE = {
...
@@ -13,7 +13,7 @@ CONSTANT.SORT_TYPE = {
LAST_EDIT_DATE
:
4
,
LAST_EDIT_DATE
:
4
,
};
};
CONSTANT
.
PAGE_NAME
=
{
C
HK_C
ONSTANT
.
PAGE_NAME
=
{
DASHBOARD
:
'dashboard'
,
DASHBOARD
:
'dashboard'
,
OPERATION_LIST
:
'operationList'
,
OPERATION_LIST
:
'operationList'
,
FOOTER
:
'main-footer.html'
,
FOOTER
:
'main-footer.html'
,
...
@@ -21,45 +21,45 @@ CONSTANT.PAGE_NAME = {
...
@@ -21,45 +21,45 @@ CONSTANT.PAGE_NAME = {
LOGIN
:
'login.html'
,
LOGIN
:
'login.html'
,
};
};
CONSTANT
.
PAGE_TAB
=
{
C
HK_C
ONSTANT
.
PAGE_TAB
=
{
DASHBOARD
:
'dashboard'
,
DASHBOARD
:
'dashboard'
,
OPERATION_LIST
:
'operationList'
,
OPERATION_LIST
:
'operationList'
,
};
};
CONSTANT
.
OPERATION_TYPE
=
{
C
HK_C
ONSTANT
.
OPERATION_TYPE
=
{
LIST
:
'0'
,
LIST
:
'0'
,
DRAWING
:
'1'
,
DRAWING
:
'1'
,
VTOUR
:
'2'
,
VTOUR
:
'2'
,
PDF
:
'3'
,
PDF
:
'3'
,
};
};
CONSTANT
.
REPORT_TYPE
=
{
C
HK_C
ONSTANT
.
REPORT_TYPE
=
{
REPORTONLY
:
'0'
,
REPORTONLY
:
'0'
,
INSPECT
:
'1'
,
INSPECT
:
'1'
,
WITHREPLY
:
'2'
,
WITHREPLY
:
'2'
,
WORKFLOW
:
'3'
,
WORKFLOW
:
'3'
,
};
};
CONSTANT
.
ADD_REPORT_FLG
=
{
C
HK_C
ONSTANT
.
ADD_REPORT_FLG
=
{
UNABLE
:
'0'
,
UNABLE
:
'0'
,
ABLE
:
'1'
,
ABLE
:
'1'
,
};
};
CONSTANT
.
URL
=
{
C
HK_C
ONSTANT
.
URL
=
{
BASE_CMS
:
'https://'
+
location
.
host
+
'/checkapi/web/'
,
BASE_CMS
:
'https://'
+
location
.
host
+
'/checkapi/web/'
,
BASE_WEB
:
'abvw/html/'
,
BASE_WEB
:
'abvw/html/'
,
ALL_OPERATION_LIST
:
'operationLIstWeb/getOperationList'
,
ALL_OPERATION_LIST
:
'operationLIstWeb/getOperationList'
,
AUTH_SESSION
:
'getsession/checkAuthUser'
,
AUTH_SESSION
:
'getsession/checkAuthUser'
,
};
};
CONSTANT
.
LANG
=
{
C
HK_C
ONSTANT
.
LANG
=
{
SAVE_NAME
:
'lang'
,
SAVE_NAME
:
'lang'
,
JAPAN
:
'ja'
,
JAPAN
:
'ja'
,
KOREA
:
'ko'
,
KOREA
:
'ko'
,
ENGLISH
:
'en'
,
ENGLISH
:
'en'
,
};
};
CONSTANT
.
MSG_MAP
=
{
C
HK_C
ONSTANT
.
MSG_MAP
=
{
all
:
{
ja
:
'全て'
,
ko
:
'전체'
,
en
:
'All'
},
all
:
{
ja
:
'全て'
,
ko
:
'전체'
,
en
:
'All'
},
dateError
:
{
ja
:
'開始日は終了日の前に設定してください。'
,
ko
:
'잘못된 검색일입니다.'
,
en
:
'Please enter correct search date.'
},
dateError
:
{
ja
:
'開始日は終了日の前に設定してください。'
,
ko
:
'잘못된 검색일입니다.'
,
en
:
'Please enter correct search date.'
},
operationListTitle
:
{
ja
:
'トップページ|A Book Check'
,
ko
:
'톱 페이지|A Book Check'
,
en
:
'Top Page|A Book Check'
},
operationListTitle
:
{
ja
:
'トップページ|A Book Check'
,
ko
:
'톱 페이지|A Book Check'
,
en
:
'Top Page|A Book Check'
},
...
...
abvw/html/index.html
View file @
0a93e7e8
...
@@ -14,22 +14,22 @@
...
@@ -14,22 +14,22 @@
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/abvw/common/css/appCommon/app.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/abvw/common/css/appCommon/app.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/abvw/common/css/appCommon/fontawesome_relative_path.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/abvw/common/css/appCommon/fontawesome_relative_path.css"
>
<script
src=
"/abvw/common/js/constant.js?__UPDATEID__"
></script>
<script
src=
"/abvw/common/js/
appCommon/
constant.js?__UPDATEID__"
></script>
<script
src=
"/abvw/common/js/jquery/jquery-3.6.0.min.js?__UPDATEID__"
></script>
<script
src=
"/abvw/common/js/jquery/jquery-3.6.0.min.js?__UPDATEID__"
></script>
<script
src=
"/abvw/common/js/jquery/jquery-ui.min.js?__UPDATEID__"
></script>
<script
src=
"/abvw/common/js/jquery/jquery-ui.min.js?__UPDATEID__"
></script>
<script
src=
"/abvw/js/operationList/operationList.js?__UPDATEID__"
></script>
<script
src=
"/abvw/js/operationList/operationList.js?__UPDATEID__"
></script>
<script
src=
"/abvw/js/topPage/topPage.js?__UPDATEID__"
></script>
<script
src=
"/abvw/js/topPage/topPage.js?__UPDATEID__"
></script>
<script
src=
"/abvw/js/dashboardSetting/check-dashboard-setting.js?__UPDATEID__"
></script>
<script
src=
"/abvw/js/dashboardSetting/check-dashboard-setting.js?__UPDATEID__"
></script>
<script
src=
"/abvw/js/dashboard/check-dashboard.js?__UPDATEID__"
></script>
<script
src=
"/abvw/js/dashboard/check-dashboard.js?__UPDATEID__"
></script>
<script
src=
"/abvw/common/js/footer.js?__UPDATEID__"
></script>
<script
src=
"/abvw/common/js/
appCommon/check-
footer.js?__UPDATEID__"
></script>
<script
src=
"/abvw/common/js/appCommon/check-common.js?__UPDATEID__"
></script>
<script
src=
"/abvw/common/js/appCommon/check-common.js?__UPDATEID__"
></script>
<script
src=
"/abvw/common/js/web/common.js?__UPDATEID__"
></script>
<script
src=
"/abvw/common/js/web/common.js?__UPDATEID__"
></script>
<script
src=
"/abvw/common/js/web/avweb.js?__UPDATEID__"
></script>
<script
src=
"/abvw/common/js/web/avweb.js?__UPDATEID__"
></script>
<script
src=
"/abvw/common/js/app.js?__UPDATEID__"
defer
></script>
<script
src=
"/abvw/common/js/app
Common/app
.js?__UPDATEID__"
defer
></script>
</head>
</head>
<body
onload=
"TOP.init();"
style=
"position: relative; margin-top: 53px;"
>
<body
onload=
"
CHK_
TOP.init();"
style=
"position: relative; margin-top: 53px;"
>
<!--作業一覧画面-->
<!--作業一覧画面-->
<section
id=
"operationList"
class=
"page-content"
style=
"display: none;"
>
<section
id=
"operationList"
class=
"page-content"
style=
"display: none;"
>
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
<header
style=
"position: fixed; width: 100%; top: 0px; left: 0; z-index: 999;"
>
<header
style=
"position: fixed; width: 100%; top: 0px; left: 0; z-index: 999;"
>
<nav
class=
"navbar navbar-dark bg-primary"
>
<nav
class=
"navbar navbar-dark bg-primary"
>
<div>
<div>
<a
class=
"navbar-brand category-btn lht-0 d-none"
onclick=
"OL.openCategory();"
id=
"operationGroupMasterButton"
>
<a
class=
"navbar-brand category-btn lht-0 d-none"
onclick=
"
CHK_
OL.openCategory();"
id=
"operationGroupMasterButton"
>
<i
class=
"fa fa-folder fs-12 p-1"
id=
"category-toggle-button"
></i>
<i
class=
"fa fa-folder fs-12 p-1"
id=
"category-toggle-button"
></i>
<span
class=
"d-none d-md-inline fs-10 multi-lang"
data-msg=
"buttonCategory"
></span>
<span
class=
"d-none d-md-inline fs-10 multi-lang"
data-msg=
"buttonCategory"
></span>
</a>
</a>
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
<nav
id=
"category-menu"
class=
"drawer-menu"
>
<nav
id=
"category-menu"
class=
"drawer-menu"
>
<div
class=
"d-flex justifyfont-weight-bold fs-13 p-3 mb-0 multi-lang"
data-msg=
"buttonCategory"
></h2>
<div
class=
"d-flex justifyfont-weight-bold fs-13 p-3 mb-0 multi-lang"
data-msg=
"buttonCategory"
></h2>
<a
class=
"category-content-between border-bottom"
>
<a
class=
"category-content-between border-bottom"
>
<h2
class=
"text-nowrap -btn p-3"
onclick=
"OL.openCategory();"
href=
"#"
><i
class=
"fa fa-times"
></i></a>
<h2
class=
"text-nowrap -btn p-3"
onclick=
"
CHK_
OL.openCategory();"
href=
"#"
><i
class=
"fa fa-times"
></i></a>
</div>
</div>
</nav>
</nav>
</section>
</section>
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
<div
class=
"form-group has-search input-group"
>
<div
class=
"form-group has-search input-group"
>
<input
type=
"text"
class=
"form-control multi-lang"
data-msg=
"placeholderOperationName"
placeholder=
"placeholderOperationName"
id=
"searchTaskName"
>
<input
type=
"text"
class=
"form-control multi-lang"
data-msg=
"placeholderOperationName"
placeholder=
"placeholderOperationName"
id=
"searchTaskName"
>
<div
class=
"input-group-append"
>
<div
class=
"input-group-append"
>
<i
class=
"fas fa-search input-group-text"
onclick=
"OL.search();"
></i>
<i
class=
"fas fa-search input-group-text"
onclick=
"
CHK_
OL.search();"
></i>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -124,12 +124,12 @@
...
@@ -124,12 +124,12 @@
<span
class=
"d-none d-md-inline text-dark fs-10 align-middle multi-lang"
data-msg=
"labelSort"
></span>
<span
class=
"d-none d-md-inline text-dark fs-10 align-middle multi-lang"
data-msg=
"labelSort"
></span>
</a>
</a>
<div
class=
"dropdown-menu"
aria-labelledby=
"dropdownMenuButton"
>
<div
class=
"dropdown-menu"
aria-labelledby=
"dropdownMenuButton"
>
<a
class=
"dropdown-item sort-type multi-lang"
data-msg=
"labelSortName"
data-sort=
"0"
onclick=
"OL.changeSortType(this);"
></a>
<a
class=
"dropdown-item sort-type multi-lang"
data-msg=
"labelSortName"
data-sort=
"0"
onclick=
"
CHK_
OL.changeSortType(this);"
></a>
<a
class=
"dropdown-item sort-type active multi-lang"
data-msg=
"labelSortNew"
data-sort=
"1"
id=
"defaultSort"
onclick=
"OL.changeSortType(this);"
></a>
<a
class=
"dropdown-item sort-type active multi-lang"
data-msg=
"labelSortNew"
data-sort=
"1"
id=
"defaultSort"
onclick=
"
CHK_
OL.changeSortType(this);"
></a>
<a
class=
"dropdown-item sort-type multi-lang"
data-msg=
"labelSortOld"
data-sort=
"2"
onclick=
"OL.changeSortType(this);"
></a>
<a
class=
"dropdown-item sort-type multi-lang"
data-msg=
"labelSortOld"
data-sort=
"2"
onclick=
"
CHK_
OL.changeSortType(this);"
></a>
<a
class=
"dropdown-item sort-type multi-lang"
data-msg=
"labelSortOpen"
data-sort=
"4"
onclick=
"OL.changeSortType(this);"
></a>
<a
class=
"dropdown-item sort-type multi-lang"
data-msg=
"labelSortOpen"
data-sort=
"4"
onclick=
"
CHK_
OL.changeSortType(this);"
></a>
</div>
</div>
<a
href=
"javascript:OL.resetSearch();"
class=
"text-decoration-none py-2 lht-0 d-inline-block ml-3"
>
<a
href=
"javascript:
CHK_
OL.resetSearch();"
class=
"text-decoration-none py-2 lht-0 d-inline-block ml-3"
>
<img
class=
"icon"
src=
"/abvw/img/operationList/icon_clear.svg"
>
<img
class=
"icon"
src=
"/abvw/img/operationList/icon_clear.svg"
>
<span
class=
"d-none d-md-inline text-dark fs-10 align-middle multi-lang"
data-msg=
"labelReset"
lnag=
"labelReset"
></span>
<span
class=
"d-none d-md-inline text-dark fs-10 align-middle multi-lang"
data-msg=
"labelReset"
lnag=
"labelReset"
></span>
</a>
</a>
...
...
abvw/html/main-footer.html
View file @
0a93e7e8
...
@@ -2,12 +2,12 @@
...
@@ -2,12 +2,12 @@
<nav
class=
"d-flex justify-content-around"
>
<nav
class=
"d-flex justify-content-around"
>
<!--ダッシュボード-->
<!--ダッシュボード-->
<a
id=
"dashboardBottomNav"
class=
"d-block w-100 text-center py-2 text-decoration-none text-secondary bottom-nav"
href=
"javascript:
FOOTER
.goDashboard();"
>
<a
id=
"dashboardBottomNav"
class=
"d-block w-100 text-center py-2 text-decoration-none text-secondary bottom-nav"
href=
"javascript:
CHK_Footer
.goDashboard();"
>
<img
src=
"/abvw/img/dashboard/icon_dashboard_inactive.svg"
data-inactive-src=
"/abvw/img/dashboard/icon_dashboard_inactive.svg"
data-src=
"/abvw/img/dashboard/icon_dashboard.svg"
alt=
"buttonDashboard"
class=
"p-1"
>
<img
src=
"/abvw/img/dashboard/icon_dashboard_inactive.svg"
data-inactive-src=
"/abvw/img/dashboard/icon_dashboard_inactive.svg"
data-src=
"/abvw/img/dashboard/icon_dashboard.svg"
alt=
"buttonDashboard"
class=
"p-1"
>
<div
class=
"fs-7 multi-lang"
data-msg=
"buttonDashboard"
></div>
<div
class=
"fs-7 multi-lang"
data-msg=
"buttonDashboard"
></div>
</a>
</a>
<!--作業一覧-->
<!--作業一覧-->
<a
id=
"operationListBottomNav"
class=
"d-block w-100 text-center py-2 text-decoration-none text-primary bottom-nav"
href=
"javascript:
FOOTER
.goOperationList();"
>
<a
id=
"operationListBottomNav"
class=
"d-block w-100 text-center py-2 text-decoration-none text-primary bottom-nav"
href=
"javascript:
CHK_Footer
.goOperationList();"
>
<i
class=
"fas fa-tasks fs-14 p-1"
></i>
<i
class=
"fas fa-tasks fs-14 p-1"
></i>
<div
class=
"fs-7 multi-lang"
data-msg=
"buttonOperationList"
></div>
<div
class=
"fs-7 multi-lang"
data-msg=
"buttonOperationList"
></div>
</a>
</a>
...
...
abvw/js/dashboardSetting/check-dashboard-setting.js
View file @
0a93e7e8
var
CHK_DashboardSetting
=
{};
var
CHK_DashboardSetting
=
{};
CHK_DashboardSetting
.
displayItems
=
[
CHK_DashboardSetting
.
displayItems
=
[
{
id
:
'newReport'
,
name
:
'chk-new'
,
enabled
:
true
,
title
:
'新規報告'
,
msg
:
'dashboardSettingNewRegistrationTitle'
},
{
id
:
'newReport'
,
name
:
'chk-new'
,
enabled
:
true
,
title
:
'新規報告'
,
msg
:
'dashboardSettingNewRegistrationTitle'
},
{
id
:
'continousWork'
,
name
:
'chk-proccess'
,
enabled
:
true
,
title
:
'工程作業'
,
msg
:
'dashboardSettingContinousWorkTitle'
},
{
id
:
'continousWork'
,
name
:
'chk-proccess'
,
enabled
:
true
,
title
:
'工程作業'
,
msg
:
'dashboardSettingContinousWorkTitle'
},
{
id
:
'reportWarning'
,
name
:
'chk-alert'
,
enabled
:
true
,
title
:
'警告を含む作業'
,
msg
:
'dashboardSettingReportWarningTitle'
},
{
id
:
'reportWarning'
,
name
:
'chk-alert'
,
enabled
:
true
,
title
:
'警告を含む作業'
,
msg
:
'dashboardSettingReportWarningTitle'
},
{
id
:
'dashboardHome'
,
name
:
'chk-home'
,
enabled
:
false
,
title
:
'ダッシュボードをホーム画面にする'
,
msg
:
'dashboardSettingDashboardHomeTitle'
},
{
id
:
'dashboardHome'
,
name
:
'chk-home'
,
enabled
:
false
,
title
:
'ダッシュボードをホーム画面にする'
,
msg
:
'dashboardSettingDashboardHomeTitle'
},
];
];
//CHK_DashboardSetting.displayItemsに設定されている情報から✓されている項目をhtml上に設定する
//CHK_DashboardSetting.displayItemsに設定されている情報から✓されている項目をhtml上に設定する
CHK_DashboardSetting
.
loadSettings
=
function
()
{
CHK_DashboardSetting
.
loadSettings
=
function
()
{
CHK_DashboardSetting
.
displayItems
.
forEach
(
function
(
item
)
{
CHK_DashboardSetting
.
displayItems
.
forEach
(
function
(
item
)
{
let
enabled
=
CHK
.
dashboardSetting
[
item
.
id
];
let
enabled
=
CHK
.
dashboardSetting
[
item
.
id
];
if
(
typeof
enabled
!==
'undefined'
)
{
if
(
typeof
enabled
!==
'undefined'
)
{
item
.
enabled
=
enabled
;
item
.
enabled
=
enabled
;
...
@@ -17,47 +17,50 @@ CHK_DashboardSetting.loadSettings = function () {
...
@@ -17,47 +17,50 @@ CHK_DashboardSetting.loadSettings = function () {
itemElement
.
addClass
(
'checked'
);
itemElement
.
addClass
(
'checked'
);
}
else
{
}
else
{
itemElement
.
removeClass
(
'checked'
);
itemElement
.
removeClass
(
'checked'
);
}
}
}
}
});
});
}
;
}
//CHK_DashboardSetting.displayItemsに設定を書き込む
//CHK_DashboardSetting.displayItemsに設定を書き込む
CHK_DashboardSetting
.
saveSetting
=
function
(
key
,
enabled
)
{
CHK_DashboardSetting
.
saveSetting
=
function
(
key
,
enabled
)
{
CHK_DashboardSetting
.
displayItems
.
forEach
(
function
(
item
)
{
CHK_DashboardSetting
.
displayItems
.
forEach
(
function
(
item
)
{
if
(
item
.
id
==
key
)
{
if
(
item
.
id
==
key
)
{
item
.
enabled
=
enabled
;
item
.
enabled
=
enabled
;
}
}
});
});
CHK
.
saveDashboardSetting
(
key
,
enabled
);
CHK
.
saveDashboardSetting
(
key
,
enabled
);
}
;
}
//CHK_DashboardSetting.displayItemsからhtmlに設定画面を表示する
//CHK_DashboardSetting.displayItemsからhtmlに設定画面を表示する
CHK_DashboardSetting
.
initDisplays
=
function
()
{
CHK_DashboardSetting
.
initDisplays
=
function
()
{
$
(
'#displayItems tbody'
).
empty
();
$
(
"#displayItems tbody"
).
empty
();
CHK_DashboardSetting
.
displayItems
.
forEach
(
function
(
item
)
{
CHK_DashboardSetting
.
displayItems
.
forEach
(
function
(
item
)
{
var
html
=
CHK_DashboardSetting
.
initHtmlItem
(
item
);
var
html
=
CHK_DashboardSetting
.
initHtmlItem
(
item
);
$
(
'#displayItems tbody'
).
append
(
html
);
$
(
"#displayItems tbody"
).
append
(
html
);
});
});
}
;
}
//設定画面に表示するhtmlを生成する
//設定画面に表示するhtmlを生成する
CHK_DashboardSetting
.
initHtmlItem
=
function
(
item
)
{
CHK_DashboardSetting
.
initHtmlItem
=
function
(
item
)
{
var
titleDiv
=
'<div class="font-weight-normal text-dark multi-lang" data-msg="'
+
item
.
msg
+
'">'
+
item
.
title
+
'</div>'
;
var
titleDiv
=
'<div class="font-weight-normal text-dark multi-lang" data-msg="'
+
item
.
msg
+
'">'
+
item
.
title
+
'</div>'
;
var
toggleClass
=
'toggle'
;
var
toggleClass
=
'toggle'
;
if
(
item
.
enabled
)
{
if
(
item
.
enabled
)
{
toggleClass
+=
' checked'
;
toggleClass
+=
' checked'
;
}
}
var
toggleDiv
=
'<div id="'
+
item
.
id
+
'" class="'
+
toggleClass
+
'"><input type="checkbox" name="'
+
item
.
name
+
'" /></div>'
;
var
toggleDiv
=
'<div id="'
+
item
.
id
+
'" class="'
+
toggleClass
+
'"><input type="checkbox" name="'
+
item
.
name
+
'" /></div>'
;
var
html
=
$
(
'<tr>'
+
'<th>'
+
titleDiv
+
'</th>'
+
'<td>'
+
toggleDiv
+
'</td>'
+
'</tr>'
);
var
html
=
$
(
'<tr>'
+
'<th>'
+
titleDiv
+
'</th>'
+
'<td>'
+
toggleDiv
+
'</td>'
+
'</tr>'
);
return
html
;
return
html
;
}
;
}
//設定画面でクリックされてた時の処理
//設定画面でクリックされてた時の処理
//
//
CHK_DashboardSetting
.
bindToggleClick
=
function
()
{
CHK_DashboardSetting
.
bindToggleClick
=
function
()
{
$
(
'.toggle'
).
on
(
'click'
,
function
()
{
$
(
".toggle"
).
on
(
"click"
,
function
()
{
$
(
this
).
toggleClass
(
'checked'
);
$
(
this
).
toggleClass
(
"checked"
);
var
id
=
$
(
this
).
attr
(
'id'
);
var
id
=
$
(
this
).
attr
(
'id'
);
var
enabled
=
false
;
var
enabled
=
false
;
if
(
$
(
this
).
hasClass
(
'checked'
))
{
if
(
$
(
this
).
hasClass
(
'checked'
))
{
...
@@ -65,22 +68,22 @@ CHK_DashboardSetting.bindToggleClick = function () {
...
@@ -65,22 +68,22 @@ CHK_DashboardSetting.bindToggleClick = function () {
}
}
CHK_DashboardSetting
.
saveSetting
(
id
,
enabled
);
CHK_DashboardSetting
.
saveSetting
(
id
,
enabled
);
});
});
}
;
}
//設定画面の初期処理
//設定画面の初期処理
CHK_DashboardSetting
.
init
=
function
()
{
CHK_DashboardSetting
.
init
=
function
()
{
CHK
.
initCommon
();
CHK
.
initCommon
();
$
(
'#footer'
).
load
(
'main-footer.html'
,
function
()
{
$
(
"#footer"
).
load
(
"main-footer.html"
,
function
()
{
FOOTER
.
activeDashboardBottomNav
();
CHK_Footer
.
activeDashboardBottomNav
();
});
});
CHK
.
loadDashboardSetting
(
function
()
{
CHK
.
loadDashboardSetting
(
function
()
{
CHK_DashboardSetting
.
loadSettings
();
CHK_DashboardSetting
.
loadSettings
();
CHK_DashboardSetting
.
initDisplays
();
CHK_DashboardSetting
.
initDisplays
();
CHK_DashboardSetting
.
bindToggleClick
();
CHK_DashboardSetting
.
bindToggleClick
();
});
});
}
;
}
//戻るボタン
//戻るボタン
CHK_DashboardSetting
.
goBack
=
function
()
{
CHK_DashboardSetting
.
goBack
=
function
()
{
FOOTER
.
goDashboard
();
CHK_Footer
.
goDashboard
();
}
;
}
\ No newline at end of file
abvw/js/operationList/operationList.js
View file @
0a93e7e8
...
@@ -5,15 +5,15 @@
...
@@ -5,15 +5,15 @@
* @since cms:1.4.3.2&1.4.3.3 web:1.0
* @since cms:1.4.3.2&1.4.3.3 web:1.0
*/
*/
var
OL
=
{};
var
CHK_
OL
=
{};
OL
.
operationList
;
//Operation json data
CHK_
OL
.
operationList
;
//Operation json data
OL
.
operationGroupMaster
;
//category(operationGroupMaster) json data
CHK_
OL
.
operationGroupMaster
;
//category(operationGroupMaster) json data
OL
.
isOperationGroupMaster
=
0
;
//0: category(operationGroupMaster) not exist 1: category(operationGroupMaster) exist
CHK_
OL
.
isOperationGroupMaster
=
0
;
//0: category(operationGroupMaster) not exist 1: category(operationGroupMaster) exist
OL
.
operationSearchCriteria
;
CHK_
OL
.
operationSearchCriteria
;
OL
.
sortIndex
;
CHK_
OL
.
sortIndex
;
OL
.
operationGroupMasterId
;
CHK_
OL
.
operationGroupMasterId
;
/**
/**
* process on page load.
* process on page load.
...
@@ -21,17 +21,17 @@ OL.operationGroupMasterId;
...
@@ -21,17 +21,17 @@ OL.operationGroupMasterId;
* 2.show operationList.
* 2.show operationList.
* 3.show category(operationGroupMaster).
* 3.show category(operationGroupMaster).
*/
*/
OL
.
init
=
function
()
{
CHK_
OL
.
init
=
function
()
{
console
.
log
(
'OperationList start'
);
console
.
log
(
'OperationList start'
);
//get all data of operation list scene
//get all data of operation list scene
OL
.
getAllDataWeb
();
CHK_
OL
.
getAllDataWeb
();
//show operation list
//show operation list
OL
.
createOperationList
(
OL
.
operationList
);
CHK_OL
.
createOperationList
(
CHK_
OL
.
operationList
);
//show category(operationGroupMaster)
//show category(operationGroupMaster)
OL
.
createCategory
();
CHK_
OL
.
createCategory
();
};
};
/**
/**
...
@@ -45,7 +45,7 @@ OL.init = function () {
...
@@ -45,7 +45,7 @@ OL.init = function () {
* @param {String} searchEndDate
* @param {String} searchEndDate
* @param {Number} operationGroupMasterId
* @param {Number} operationGroupMasterId
*/
*/
OL
.
getAllDataWeb
=
function
(
searchKeyword
,
sortIndex
,
searchStartDate
,
searchEndDate
,
operationGroupMasterId
)
{
CHK_
OL
.
getAllDataWeb
=
function
(
searchKeyword
,
sortIndex
,
searchStartDate
,
searchEndDate
,
operationGroupMasterId
)
{
let
param
=
{};
let
param
=
{};
param
.
sid
=
CHK_Common
.
getSid
();
param
.
sid
=
CHK_Common
.
getSid
();
param
.
operationGroupMasterId
=
searchKeyword
;
param
.
operationGroupMasterId
=
searchKeyword
;
...
@@ -54,14 +54,14 @@ OL.getAllDataWeb = function (searchKeyword, sortIndex, searchStartDate, searchEn
...
@@ -54,14 +54,14 @@ OL.getAllDataWeb = function (searchKeyword, sortIndex, searchStartDate, searchEn
param
.
endDate
=
searchEndDate
;
param
.
endDate
=
searchEndDate
;
param
.
operationGroupMasterId
=
operationGroupMasterId
;
param
.
operationGroupMasterId
=
operationGroupMasterId
;
const
url
=
C
ONSTANT
.
URL
.
BASE_CMS
+
CONSTANT
.
URL
.
ALL_OPERATION_LIST
;
const
url
=
C
HK_CONSTANT
.
URL
.
BASE_CMS
+
CHK_
CONSTANT
.
URL
.
ALL_OPERATION_LIST
;
CHK_Common
.
cmsAjax
(
url
,
param
,
false
,
function
(
json
)
{
CHK_Common
.
cmsAjax
(
url
,
param
,
false
,
function
(
json
)
{
OL
.
operationList
=
json
.
operationList
;
CHK_
OL
.
operationList
=
json
.
operationList
;
OL
.
operationGroupMaster
=
json
.
operationGroupMasterList
;
CHK_
OL
.
operationGroupMaster
=
json
.
operationGroupMasterList
;
OL
.
isOperationGroupMaster
=
json
.
isOperationGroupMaster
;
CHK_
OL
.
isOperationGroupMaster
=
json
.
isOperationGroupMaster
;
OL
.
operationSearchCriteria
=
json
.
operationSearchCriteria
;
CHK_
OL
.
operationSearchCriteria
=
json
.
operationSearchCriteria
;
OL
.
setSearchInfoWeb
();
CHK_
OL
.
setSearchInfoWeb
();
console
.
log
(
'json.operationList'
,
JSON
.
stringify
(
json
.
operationList
));
console
.
log
(
'json.operationList'
,
JSON
.
stringify
(
json
.
operationList
));
});
});
};
};
...
@@ -69,20 +69,20 @@ OL.getAllDataWeb = function (searchKeyword, sortIndex, searchStartDate, searchEn
...
@@ -69,20 +69,20 @@ OL.getAllDataWeb = function (searchKeyword, sortIndex, searchStartDate, searchEn
/**
/**
* set search criteria when Initial display.
* set search criteria when Initial display.
*/
*/
OL
.
setSearchInfoWeb
=
function
()
{
CHK_
OL
.
setSearchInfoWeb
=
function
()
{
OL
.
sortIndex
=
OL
.
operationSearchCriteria
.
sort
;
CHK_OL
.
sortIndex
=
CHK_
OL
.
operationSearchCriteria
.
sort
;
$
(
'#searchTaskName'
).
val
(
OL
.
operationSearchCriteria
.
operationName
);
$
(
'#searchTaskName'
).
val
(
CHK_
OL
.
operationSearchCriteria
.
operationName
);
$
(
'#searchStartDate'
).
val
(
OL
.
operationSearchCriteria
.
startDate
);
$
(
'#searchStartDate'
).
val
(
CHK_
OL
.
operationSearchCriteria
.
startDate
);
$
(
'#searchEndDate'
).
val
(
OL
.
operationSearchCriteria
.
endDate
);
$
(
'#searchEndDate'
).
val
(
CHK_
OL
.
operationSearchCriteria
.
endDate
);
OL
.
operationGroupMasterId
=
OL
.
operationSearchCriteria
.
operationGroupMasterId
;
CHK_OL
.
operationGroupMasterId
=
CHK_
OL
.
operationSearchCriteria
.
operationGroupMasterId
;
};
};
/**
/**
* create operation list
* create operation list
*/
*/
OL
.
createOperationList
=
function
(
operationList
)
{
CHK_
OL
.
createOperationList
=
function
(
operationList
)
{
//Initialization
//Initialization
OL
.
initActiveSortIndex
();
CHK_
OL
.
initActiveSortIndex
();
$
(
'#operationTable'
).
empty
();
$
(
'#operationTable'
).
empty
();
if
(
!
operationList
)
{
if
(
!
operationList
)
{
...
@@ -96,7 +96,7 @@ OL.createOperationList = function (operationList) {
...
@@ -96,7 +96,7 @@ OL.createOperationList = function (operationList) {
const
operationNameTd
=
$
(
const
operationNameTd
=
$
(
"<td class='operationId_"
+
"<td class='operationId_"
+
operationList
[
i
].
operationId
+
operationList
[
i
].
operationId
+
"'><a href=
\"
javascript:OL.sendOperation('goOperation', '"
+
"'><a href=
\"
javascript:
CHK_
OL.sendOperation('goOperation', '"
+
operationList
[
i
].
operationId
+
operationList
[
i
].
operationId
+
"', '"
+
"', '"
+
operationList
[
i
].
operationType
+
operationList
[
i
].
operationType
+
...
@@ -105,13 +105,13 @@ OL.createOperationList = function (operationList) {
...
@@ -105,13 +105,13 @@ OL.createOperationList = function (operationList) {
"');
\"
class='d-block text-black text-decoration-none mb-1'>"
+
"');
\"
class='d-block text-black text-decoration-none mb-1'>"
+
operationList
[
i
].
operationName
+
operationList
[
i
].
operationName
+
"</a><div class='fa-sm mobile_operation_date'><i class='far fa-clock fa-blue' style='color:blue;margin-right:10px'></i>"
+
"</a><div class='fa-sm mobile_operation_date'><i class='far fa-clock fa-blue' style='color:blue;margin-right:10px'></i>"
+
OL
.
setOperationDate
(
operationList
[
i
].
operationStartDate
)
+
CHK_
OL
.
setOperationDate
(
operationList
[
i
].
operationStartDate
)
+
' ~ '
+
' ~ '
+
OL
.
setOperationDate
(
operationList
[
i
].
operationEndDate
)
+
CHK_
OL
.
setOperationDate
(
operationList
[
i
].
operationEndDate
)
+
'</div></td>'
,
'</div></td>'
,
);
);
const
operationStartDateTd
=
$
(
'<td/>'
,
{
class
:
'operationStartDate'
}).
text
(
OL
.
setOperationDate
(
operationList
[
i
].
operationStartDate
));
const
operationStartDateTd
=
$
(
'<td/>'
,
{
class
:
'operationStartDate'
}).
text
(
CHK_
OL
.
setOperationDate
(
operationList
[
i
].
operationStartDate
));
const
operationEndDateTd
=
$
(
'<td/>'
,
{
class
:
'operationEndDate'
}).
text
(
OL
.
setOperationDate
(
operationList
[
i
].
operationEndDate
));
const
operationEndDateTd
=
$
(
'<td/>'
,
{
class
:
'operationEndDate'
}).
text
(
CHK_
OL
.
setOperationDate
(
operationList
[
i
].
operationEndDate
));
operationTR
.
append
(
operationNameTd
);
operationTR
.
append
(
operationNameTd
);
operationTR
.
append
(
operationStartDateTd
);
operationTR
.
append
(
operationStartDateTd
);
...
@@ -126,14 +126,14 @@ OL.createOperationList = function (operationList) {
...
@@ -126,14 +126,14 @@ OL.createOperationList = function (operationList) {
*
*
* @param {Number} sortIndex
* @param {Number} sortIndex
*/
*/
OL
.
initActiveSortIndex
=
function
(
sortIndex
)
{
CHK_
OL
.
initActiveSortIndex
=
function
(
sortIndex
)
{
if
(
!
sortIndex
&&
!
OL
.
sortIndex
)
{
if
(
!
sortIndex
&&
!
CHK_
OL
.
sortIndex
)
{
OL
.
sortIndex
=
CONSTANT
.
SORT_TYPE
.
START_DATE_DESC
;
CHK_OL
.
sortIndex
=
CHK_
CONSTANT
.
SORT_TYPE
.
START_DATE_DESC
;
}
}
$
(
'.sort-type'
).
each
(
function
()
{
$
(
'.sort-type'
).
each
(
function
()
{
const
sortType
=
$
(
this
).
data
(
'sort'
);
const
sortType
=
$
(
this
).
data
(
'sort'
);
if
(
sortType
==
OL
.
sortIndex
)
{
if
(
sortType
==
CHK_
OL
.
sortIndex
)
{
$
(
'.sort-type'
).
removeClass
(
'active'
);
$
(
'.sort-type'
).
removeClass
(
'active'
);
$
(
this
).
addClass
(
'active'
);
$
(
this
).
addClass
(
'active'
);
}
}
...
@@ -146,7 +146,7 @@ OL.initActiveSortIndex = function (sortIndex) {
...
@@ -146,7 +146,7 @@ OL.initActiveSortIndex = function (sortIndex) {
* @param {String} date
* @param {String} date
* @returns operationDate
* @returns operationDate
*/
*/
OL
.
setOperationDate
=
function
(
date
)
{
CHK_
OL
.
setOperationDate
=
function
(
date
)
{
const
operationDate
=
date
.
replace
(
/-/g
,
'/'
).
substring
(
0
,
10
);
const
operationDate
=
date
.
replace
(
/-/g
,
'/'
).
substring
(
0
,
10
);
return
operationDate
;
return
operationDate
;
};
};
...
@@ -154,35 +154,35 @@ OL.setOperationDate = function (date) {
...
@@ -154,35 +154,35 @@ OL.setOperationDate = function (date) {
/**
/**
* create category(operationGroupMaster).
* create category(operationGroupMaster).
*/
*/
OL
.
createCategory
=
function
()
{
CHK_
OL
.
createCategory
=
function
()
{
if
(
!
OL
.
isOperationGroupMaster
)
{
if
(
!
CHK_
OL
.
isOperationGroupMaster
)
{
return
;
return
;
}
}
OL
.
initCategory
();
CHK_
OL
.
initCategory
();
OL
.
createBreadcrumbList
();
CHK_
OL
.
createBreadcrumbList
();
OL
.
createCategoryList
();
CHK_
OL
.
createCategoryList
();
OL
.
acdMenu
();
CHK_
OL
.
acdMenu
();
};
};
/**
/**
* Initial processing of category(operationGroupMaster).
* Initial processing of category(operationGroupMaster).
*/
*/
OL
.
initCategory
=
function
()
{
CHK_
OL
.
initCategory
=
function
()
{
if
(
!
OL
.
isOperationGroupMaster
)
{
if
(
!
CHK_
OL
.
isOperationGroupMaster
)
{
return
;
return
;
}
}
$
(
'#operationGroupMasterButton'
).
removeClass
(
'd-none'
);
$
(
'#operationGroupMasterButton'
).
removeClass
(
'd-none'
);
$
(
window
).
resize
(
function
()
{
$
(
window
).
resize
(
function
()
{
OL
.
setCategoryHeight
();
CHK_
OL
.
setCategoryHeight
();
});
});
};
};
/**
/**
* change height category(operationGroupMaster)
* change height category(operationGroupMaster)
*/
*/
OL
.
setCategoryHeight
=
function
()
{
CHK_
OL
.
setCategoryHeight
=
function
()
{
const
CATEGORY_HEIGHT
=
$
(
'footer'
).
offset
().
top
-
$
(
'#category-menu'
).
offset
().
top
;
const
CATEGORY_HEIGHT
=
$
(
'footer'
).
offset
().
top
-
$
(
'#category-menu'
).
offset
().
top
;
console
.
log
(
CATEGORY_HEIGHT
);
console
.
log
(
CATEGORY_HEIGHT
);
$
(
'#category-menu'
).
css
(
'overflow'
,
'scroll'
);
$
(
'#category-menu'
).
css
(
'overflow'
,
'scroll'
);
...
@@ -193,21 +193,21 @@ OL.setCategoryHeight = function () {
...
@@ -193,21 +193,21 @@ OL.setCategoryHeight = function () {
/**
/**
* create Breadcrumb List
* create Breadcrumb List
*/
*/
OL
.
createBreadcrumbList
=
function
()
{
CHK_
OL
.
createBreadcrumbList
=
function
()
{
if
(
!
OL
.
isOperationGroupMaster
)
{
if
(
!
CHK_
OL
.
isOperationGroupMaster
)
{
return
;
return
;
}
}
$
(
'#groupMasterPath'
).
empty
();
$
(
'#groupMasterPath'
).
empty
();
if
(
typeof
OL
.
operationGroupMasterId
==
'undefined'
||
OL
.
operationGroupMasterId
==
0
)
{
if
(
typeof
CHK_OL
.
operationGroupMasterId
==
'undefined'
||
CHK_
OL
.
operationGroupMasterId
==
0
)
{
$
(
'#groupMasterPath'
).
append
(
'<li class="breadcrumb-item"><a href="#" class="text-decoration-none text-dark">'
+
CHK_Common
.
getMsg
(
'all'
)
+
'</a></li>'
);
$
(
'#groupMasterPath'
).
append
(
'<li class="breadcrumb-item"><a href="#" class="text-decoration-none text-dark">'
+
CHK_Common
.
getMsg
(
'all'
)
+
'</a></li>'
);
}
else
{
}
else
{
const
groupMaster
=
OL
.
operationGroupMaster
.
filter
(
it
=>
it
.
operationGroupMasterId
==
OL
.
operationGroupMasterId
)[
0
];
const
groupMaster
=
CHK_OL
.
operationGroupMaster
.
filter
(
it
=>
it
.
operationGroupMasterId
==
CHK_
OL
.
operationGroupMasterId
)[
0
];
const
groupMasterPathIdlist
=
groupMaster
.
treePath
.
split
(
'/'
);
const
groupMasterPathIdlist
=
groupMaster
.
treePath
.
split
(
'/'
);
groupMasterPathIdlist
.
forEach
(
function
(
parentId
)
{
groupMasterPathIdlist
.
forEach
(
function
(
parentId
)
{
const
pathOperationGroupMaster
=
OL
.
operationGroupMaster
.
filter
(
it
=>
it
.
operationGroupMasterId
==
parentId
)[
0
];
const
pathOperationGroupMaster
=
CHK_
OL
.
operationGroupMaster
.
filter
(
it
=>
it
.
operationGroupMasterId
==
parentId
)[
0
];
$
(
'#groupMasterPath'
).
append
(
$
(
'#groupMasterPath'
).
append
(
'<li class="breadcrumb-item"><a onclick="OL.changeOperationGroupMaster('
+
'<li class="breadcrumb-item"><a onclick="
CHK_
OL.changeOperationGroupMaster('
+
pathOperationGroupMaster
.
operationGroupMasterId
+
pathOperationGroupMaster
.
operationGroupMasterId
+
');" class="text-decoration-none text-dark">'
+
');" class="text-decoration-none text-dark">'
+
pathOperationGroupMaster
.
operationGroupMasterName
+
pathOperationGroupMaster
.
operationGroupMasterName
+
...
@@ -220,65 +220,67 @@ OL.createBreadcrumbList = function () {
...
@@ -220,65 +220,67 @@ OL.createBreadcrumbList = function () {
/**
/**
* create category(operationGroupMaster) structure
* create category(operationGroupMaster) structure
*/
*/
OL
.
createCategoryList
=
function
()
{
CHK_
OL
.
createCategoryList
=
function
()
{
if
(
!
OL
.
isOperationGroupMaster
)
{
if
(
!
CHK_
OL
.
isOperationGroupMaster
)
{
return
;
return
;
}
}
//Create a side menu category structure
//Create a side menu category structure
$
(
'.group-category-list'
).
remove
();
$
(
'.group-category-list'
).
remove
();
OL
.
operationGroupMaster
.
sort
(
function
(
a
,
b
)
{
CHK_
OL
.
operationGroupMaster
.
sort
(
function
(
a
,
b
)
{
if
(
a
.
operationGroupMasterLevel
<
b
.
operationGroupMasterLevel
)
return
-
1
;
if
(
a
.
operationGroupMasterLevel
<
b
.
operationGroupMasterLevel
)
return
-
1
;
if
(
a
.
operationGroupMasterLevel
>
b
.
operationGroupMasterLevel
)
return
1
;
if
(
a
.
operationGroupMasterLevel
>
b
.
operationGroupMasterLevel
)
return
1
;
return
1
;
return
1
;
});
});
//common
//common
const
noCategory
=
$
(
"<dl id='groupMasterId_0' class='group-category-list'><dt><a onclick='OL.changeOperationGroupMaster(0);'>"
+
CHK_Common
.
getMsg
(
CONSTANT
.
MSG_MAP
.
all
)
+
'</a></dt></dl>'
);
const
noCategory
=
$
(
"<dl id='groupMasterId_0' class='group-category-list'><dt><a onclick='CHK_OL.changeOperationGroupMaster(0);'>"
+
CHK_Common
.
getMsg
(
CHK_CONSTANT
.
MSG_MAP
.
all
)
+
'</a></dt></dl>'
,
);
$
(
'#category-menu'
).
append
(
noCategory
);
$
(
'#category-menu'
).
append
(
noCategory
);
//create category(operationGroupMaster) structure
//create category(operationGroupMaster) structure
for
(
let
i
=
0
;
i
<
OL
.
operationGroupMaster
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
CHK_
OL
.
operationGroupMaster
.
length
;
i
++
)
{
if
(
OL
.
operationGroupMaster
[
i
].
operationGroupMasterLevel
==
0
)
{
if
(
CHK_
OL
.
operationGroupMaster
[
i
].
operationGroupMasterLevel
==
0
)
{
const
categoryParent
=
$
(
const
categoryParent
=
$
(
'<dl id=groupMasterId_'
+
'<dl id=groupMasterId_'
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterId
+
CHK_
OL
.
operationGroupMaster
[
i
].
operationGroupMasterId
+
" class='group-category-list' style='overflow-x:auto;'><dt class='menu-ttl'><a onclick='OL.changeOperationGroupMaster("
+
" class='group-category-list' style='overflow-x:auto;'><dt class='menu-ttl'><a onclick='
CHK_
OL.changeOperationGroupMaster("
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterId
+
CHK_
OL
.
operationGroupMaster
[
i
].
operationGroupMasterId
+
");'>"
+
");'>"
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterName
+
CHK_
OL
.
operationGroupMaster
[
i
].
operationGroupMasterName
+
'</a></dt></dl>'
,
'</a></dt></dl>'
,
);
);
$
(
'#category-menu'
).
append
(
categoryParent
);
$
(
'#category-menu'
).
append
(
categoryParent
);
}
else
{
}
else
{
if
(
$
(
'#groupMasterId_'
+
OL
.
operationGroupMaster
[
i
].
parentOperationGroupMasterId
+
'>ul'
).
length
>
0
)
{
if
(
$
(
'#groupMasterId_'
+
CHK_
OL
.
operationGroupMaster
[
i
].
parentOperationGroupMasterId
+
'>ul'
).
length
>
0
)
{
const
categoryChild
=
$
(
const
categoryChild
=
$
(
"<li id='groupMasterId_"
+
"<li id='groupMasterId_"
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterId
+
CHK_
OL
.
operationGroupMaster
[
i
].
operationGroupMasterId
+
"' class=''><p class='category-li group-level-"
+
"' class=''><p class='category-li group-level-"
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterLevel
+
CHK_
OL
.
operationGroupMaster
[
i
].
operationGroupMasterLevel
+
"'><a class='category-a' onclick='OL.changeOperationGroupMaster("
+
"'><a class='category-a' onclick='
CHK_
OL.changeOperationGroupMaster("
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterId
+
CHK_
OL
.
operationGroupMaster
[
i
].
operationGroupMasterId
+
");'>"
+
");'>"
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterName
+
CHK_
OL
.
operationGroupMaster
[
i
].
operationGroupMasterName
+
'</a></p></li>'
,
'</a></p></li>'
,
);
);
$
(
'#groupMasterId_'
+
OL
.
operationGroupMaster
[
i
].
parentOperationGroupMasterId
+
' >ul'
).
append
(
categoryChild
);
$
(
'#groupMasterId_'
+
CHK_
OL
.
operationGroupMaster
[
i
].
parentOperationGroupMasterId
+
' >ul'
).
append
(
categoryChild
);
}
else
{
}
else
{
const
groupParents
=
'#groupMasterId_'
+
OL
.
operationGroupMaster
[
i
].
parentOperationGroupMasterId
;
const
groupParents
=
'#groupMasterId_'
+
CHK_
OL
.
operationGroupMaster
[
i
].
parentOperationGroupMasterId
;
$
(
groupParents
+
' > p'
).
addClass
(
'sub-menu-ttl'
);
$
(
groupParents
+
' > p'
).
addClass
(
'sub-menu-ttl'
);
const
categoryChild
=
$
(
const
categoryChild
=
$
(
"<ul style='display:none;' class=''><li class='' id='groupMasterId_"
+
"<ul style='display:none;' class=''><li class='' id='groupMasterId_"
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterId
+
CHK_
OL
.
operationGroupMaster
[
i
].
operationGroupMasterId
+
"' class=''><p class='category-li group-level-"
+
"' class=''><p class='category-li group-level-"
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterLevel
+
CHK_
OL
.
operationGroupMaster
[
i
].
operationGroupMasterLevel
+
"'><a class='category-a' onclick='OL.changeOperationGroupMaster("
+
"'><a class='category-a' onclick='
CHK_
OL.changeOperationGroupMaster("
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterId
+
CHK_
OL
.
operationGroupMaster
[
i
].
operationGroupMasterId
+
");'>"
+
");'>"
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterName
+
CHK_
OL
.
operationGroupMaster
[
i
].
operationGroupMasterName
+
'</a></p></li></ul>'
,
'</a></p></li></ul>'
,
);
);
$
(
'#groupMasterId_'
+
OL
.
operationGroupMaster
[
i
].
parentOperationGroupMasterId
).
append
(
categoryChild
);
$
(
'#groupMasterId_'
+
CHK_
OL
.
operationGroupMaster
[
i
].
parentOperationGroupMasterId
).
append
(
categoryChild
);
}
}
}
}
}
}
...
@@ -287,7 +289,7 @@ OL.createCategoryList = function () {
...
@@ -287,7 +289,7 @@ OL.createCategoryList = function () {
/**
/**
* Open/close category(operationGroupMaster) drawer menu
* Open/close category(operationGroupMaster) drawer menu
*/
*/
OL
.
acdMenu
=
function
()
{
CHK_
OL
.
acdMenu
=
function
()
{
//Hide accordion contents by default
//Hide accordion contents by default
$
(
'.drawer-menu dd'
).
css
(
'display'
,
'none'
);
$
(
'.drawer-menu dd'
).
css
(
'display'
,
'none'
);
$
(
'.drawer-menu2 ul'
).
css
(
'display'
,
'none'
);
$
(
'.drawer-menu2 ul'
).
css
(
'display'
,
'none'
);
...
@@ -311,12 +313,12 @@ OL.acdMenu = function () {
...
@@ -311,12 +313,12 @@ OL.acdMenu = function () {
*
*
* @param {Object} sortType
* @param {Object} sortType
*/
*/
OL
.
changeSortType
=
function
(
sortType
)
{
CHK_
OL
.
changeSortType
=
function
(
sortType
)
{
$
(
'.sort-type'
).
removeClass
(
'active'
);
$
(
'.sort-type'
).
removeClass
(
'active'
);
$
(
sortType
).
addClass
(
'active'
);
$
(
sortType
).
addClass
(
'active'
);
OL
.
sortIndex
=
$
(
sortType
).
attr
(
'data-sort'
);
CHK_
OL
.
sortIndex
=
$
(
sortType
).
attr
(
'data-sort'
);
OL
.
sortOperationList
(
sortType
);
CHK_
OL
.
sortOperationList
(
sortType
);
OL
.
createOperationList
(
OL
.
operationList
);
CHK_OL
.
createOperationList
(
CHK_
OL
.
operationList
);
};
};
/**
/**
...
@@ -324,39 +326,39 @@ OL.changeSortType = function (sortType) {
...
@@ -324,39 +326,39 @@ OL.changeSortType = function (sortType) {
*
*
* @param {Number} sortType
* @param {Number} sortType
*/
*/
OL
.
sortOperationList
=
function
(
sortType
)
{
CHK_
OL
.
sortOperationList
=
function
(
sortType
)
{
switch
(
sortType
)
{
switch
(
sortType
)
{
case
CONSTANT
.
SORT_TYPE
.
NAME
:
case
C
HK_C
ONSTANT
.
SORT_TYPE
.
NAME
:
OL
.
operationList
.
sort
(
function
(
a
,
b
)
{
CHK_
OL
.
operationList
.
sort
(
function
(
a
,
b
)
{
if
(
a
.
operationName
>
b
.
operationName
)
return
1
;
if
(
a
.
operationName
>
b
.
operationName
)
return
1
;
if
(
a
.
operationName
<
b
.
operationName
)
return
-
1
;
if
(
a
.
operationName
<
b
.
operationName
)
return
-
1
;
return
0
;
return
0
;
});
});
break
;
break
;
case
CONSTANT
.
SORT_TYPE
.
START_DATE_DESC
:
case
C
HK_C
ONSTANT
.
SORT_TYPE
.
START_DATE_DESC
:
OL
.
operationList
.
sort
(
function
(
a
,
b
)
{
CHK_
OL
.
operationList
.
sort
(
function
(
a
,
b
)
{
if
(
setOperationDate
(
a
.
operationStartDate
)
<
setOperationDate
(
b
.
operationStartDate
))
return
1
;
if
(
setOperationDate
(
a
.
operationStartDate
)
<
setOperationDate
(
b
.
operationStartDate
))
return
1
;
if
(
setOperationDate
(
a
.
operationStartDate
)
>
setOperationDate
(
b
.
operationStartDate
))
return
-
1
;
if
(
setOperationDate
(
a
.
operationStartDate
)
>
setOperationDate
(
b
.
operationStartDate
))
return
-
1
;
return
0
;
return
0
;
});
});
break
;
break
;
case
CONSTANT
.
SORT_TYPE
.
START_DATE_ASC
:
case
C
HK_C
ONSTANT
.
SORT_TYPE
.
START_DATE_ASC
:
OL
.
operationList
.
sort
(
function
(
a
,
b
)
{
CHK_
OL
.
operationList
.
sort
(
function
(
a
,
b
)
{
if
(
setOperationDate
(
a
.
operationStartDate
)
>
setOperationDate
(
b
.
operationStartDate
))
return
1
;
if
(
setOperationDate
(
a
.
operationStartDate
)
>
setOperationDate
(
b
.
operationStartDate
))
return
1
;
if
(
setOperationDate
(
a
.
operationStartDate
)
<
setOperationDate
(
b
.
operationStartDate
))
return
-
1
;
if
(
setOperationDate
(
a
.
operationStartDate
)
<
setOperationDate
(
b
.
operationStartDate
))
return
-
1
;
return
0
;
return
0
;
});
});
break
;
break
;
case
CONSTANT
.
SORT_TYPE
.
TYPE
:
case
C
HK_C
ONSTANT
.
SORT_TYPE
.
TYPE
:
OL
.
operationList
.
sort
(
function
(
a
,
b
)
{
CHK_
OL
.
operationList
.
sort
(
function
(
a
,
b
)
{
if
(
a
.
operationType
<
b
.
operationType
)
return
1
;
if
(
a
.
operationType
<
b
.
operationType
)
return
1
;
if
(
a
.
operationType
>
b
.
operationType
)
return
-
1
;
if
(
a
.
operationType
>
b
.
operationType
)
return
-
1
;
return
0
;
return
0
;
});
});
break
;
break
;
case
CONSTANT
.
SORT_TYPE
.
LAST_EDIT_DATE
:
case
C
HK_C
ONSTANT
.
SORT_TYPE
.
LAST_EDIT_DATE
:
const
defaultDate
=
'1900-01-01 09:00:00'
;
const
defaultDate
=
'1900-01-01 09:00:00'
;
OL
.
operationList
.
sort
(
function
(
a
,
b
)
{
CHK_
OL
.
operationList
.
sort
(
function
(
a
,
b
)
{
if
(
!
a
.
operationOpenDate
)
{
if
(
!
a
.
operationOpenDate
)
{
a
.
operationOpenDate
=
defaultDate
;
a
.
operationOpenDate
=
defaultDate
;
}
}
...
@@ -374,7 +376,7 @@ OL.sortOperationList = function (sortType) {
...
@@ -374,7 +376,7 @@ OL.sortOperationList = function (sortType) {
/**
/**
* search operarionList
* search operarionList
*/
*/
OL
.
search
=
function
()
{
CHK_
OL
.
search
=
function
()
{
CHK_Common
.
showLoading
();
CHK_Common
.
showLoading
();
const
searchKeyword
=
$
(
'#searchTaskName'
).
val
();
const
searchKeyword
=
$
(
'#searchTaskName'
).
val
();
const
searchStartDate
=
$
(
'#searchStartDate'
).
val
();
const
searchStartDate
=
$
(
'#searchStartDate'
).
val
();
...
@@ -386,8 +388,8 @@ OL.search = function () {
...
@@ -386,8 +388,8 @@ OL.search = function () {
return
;
return
;
}
}
OL
.
getAllDataWeb
(
searchKeyword
,
OL
.
sortIndex
,
searchStartDate
,
searchEndDate
,
OL
.
operationGroupMasterId
);
CHK_OL
.
getAllDataWeb
(
searchKeyword
,
CHK_OL
.
sortIndex
,
searchStartDate
,
searchEndDate
,
CHK_
OL
.
operationGroupMasterId
);
OL
.
createOperationList
(
OL
.
operationList
);
CHK_OL
.
createOperationList
(
CHK_
OL
.
operationList
);
CHK_Common
.
closeLoading
();
CHK_Common
.
closeLoading
();
};
};
...
@@ -395,19 +397,19 @@ OL.search = function () {
...
@@ -395,19 +397,19 @@ OL.search = function () {
* change the operationList by select the category(OperationGroupMaster)
* change the operationList by select the category(OperationGroupMaster)
* @param {Number} operationGroupMasterId
* @param {Number} operationGroupMasterId
*/
*/
OL
.
changeOperationGroupMaster
=
function
(
operationGroupMasterId
)
{
CHK_
OL
.
changeOperationGroupMaster
=
function
(
operationGroupMasterId
)
{
if
(
$
(
'#category-menu'
).
hasClass
(
'open'
))
{
if
(
$
(
'#category-menu'
).
hasClass
(
'open'
))
{
$
(
'#category-toggle-button'
).
click
();
$
(
'#category-toggle-button'
).
click
();
$
(
'body'
).
css
(
'overflow'
,
'visible'
);
$
(
'body'
).
css
(
'overflow'
,
'visible'
);
}
}
OL
.
operationGroupMasterId
=
operationGroupMasterId
;
CHK_
OL
.
operationGroupMasterId
=
operationGroupMasterId
;
OL
.
search
();
CHK_
OL
.
search
();
};
};
/**
/**
* open the category(OperationGroupMaster)
* open the category(OperationGroupMaster)
*/
*/
OL
.
openCategory
=
function
()
{
CHK_
OL
.
openCategory
=
function
()
{
window
.
scrollTo
(
0
,
0
);
window
.
scrollTo
(
0
,
0
);
if
(
$
(
'#category-menu'
).
hasClass
(
'open'
))
{
if
(
$
(
'#category-menu'
).
hasClass
(
'open'
))
{
$
(
'body'
).
css
(
'overflow'
,
'visible'
);
$
(
'body'
).
css
(
'overflow'
,
'visible'
);
...
@@ -419,11 +421,11 @@ OL.openCategory = function () {
...
@@ -419,11 +421,11 @@ OL.openCategory = function () {
/**
/**
* reset search
* reset search
*/
*/
OL
.
resetSearch
=
function
()
{
CHK_
OL
.
resetSearch
=
function
()
{
$
(
'#searchTaskName'
).
val
(
''
);
$
(
'#searchTaskName'
).
val
(
''
);
$
(
'#searchStartDate'
).
val
(
''
);
$
(
'#searchStartDate'
).
val
(
''
);
$
(
'#searchEndDate'
).
val
(
''
);
$
(
'#searchEndDate'
).
val
(
''
);
OL
.
changeSortType
(
$
(
'#defaultSort'
));
CHK_
OL
.
changeSortType
(
$
(
'#defaultSort'
));
};
};
/**
/**
...
@@ -431,11 +433,11 @@ OL.resetSearch = function () {
...
@@ -431,11 +433,11 @@ OL.resetSearch = function () {
*
*
* @param {String} operationId
* @param {String} operationId
*/
*/
OL
.
sendOperation
=
function
(
operationId
,
operationType
,
reportType
)
{
CHK_
OL
.
sendOperation
=
function
(
operationId
,
operationType
,
reportType
)
{
//save operation logs. needed for sorting
//save operation logs. needed for sorting
let
saveParams
=
{};
let
saveParams
=
{};
saveParams
.
sid
=
CHK_Common
.
getSid
();
saveParams
.
sid
=
CHK_Common
.
getSid
();
saveParams
.
cmd
=
CONSTANT
.
ACT_CMD
.
saveOperationLog
;
saveParams
.
cmd
=
C
HK_C
ONSTANT
.
ACT_CMD
.
saveOperationLog
;
saveParams
.
deviceType
=
4
;
saveParams
.
deviceType
=
4
;
saveParams
.
operationType
=
operationType
;
saveParams
.
operationType
=
operationType
;
saveParams
.
reportType
=
reportType
;
saveParams
.
reportType
=
reportType
;
...
@@ -447,7 +449,7 @@ OL.sendOperation = function (operationId, operationType, reportType) {
...
@@ -447,7 +449,7 @@ OL.sendOperation = function (operationId, operationType, reportType) {
//Transition to the report form or operation list screen
//Transition to the report form or operation list screen
let
postParams
=
{};
let
postParams
=
{};
postParams
.
sid
=
CHK_Common
.
getSid
();
postParams
.
sid
=
CHK_Common
.
getSid
();
postParams
.
cmd
=
CONSTANT
.
ACT_CMD
.
goOperation
;
postParams
.
cmd
=
C
HK_C
ONSTANT
.
ACT_CMD
.
goOperation
;
postParams
.
operationId
=
operationId
;
postParams
.
operationId
=
operationId
;
const
url
=
CHK_Common
.
getUrlWeb
(
postParams
.
cmd
);
const
url
=
CHK_Common
.
getUrlWeb
(
postParams
.
cmd
);
postCommunication
(
url
,
postParams
);
postCommunication
(
url
,
postParams
);
...
...
abvw/js/topPage/topPage.js
View file @
0a93e7e8
/**
/**
* common js of top page.
* common js of top page.
* top page is dashboard and operationList.
* top page is dashboard and operationList.
*
*
* @since cms:1.4.3.2&1.4.3.3 web:1.0
* @since cms:1.4.3.2&1.4.3.3 web:1.0
*/
*/
var
TOP
=
{};
var
CHK_
TOP
=
{};
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
//setting lang info
//setting lang info
CHK_Common
.
setLangCodeWeb
();
CHK_Common
.
setLangCodeWeb
();
//Check if user is logged in
//Check if user is logged in
CHK_Common
.
checkAuth
(
false
);
CHK_Common
.
checkAuth
(
false
);
...
@@ -21,32 +22,34 @@ $(document).ready(function () {
...
@@ -21,32 +22,34 @@ $(document).ready(function () {
/**
/**
* show page
* show page
*/
*/
TOP
.
init
=
function
()
{
CHK_TOP
.
init
=
function
()
{
CHK_Common
.
showLoading
();
CHK_Common
.
showLoading
();
FOOTER
.
initFooter
();
//app should get data after initFooter
CHK_Footer
.
initFooter
();
//app should get data after initFooter
CHK_Common
.
closeLoading
();
CHK_Common
.
closeLoading
();
};
};
/**
/**
* Show page by arbitrary id
* Show page by arbitrary id
*
*
* @param {String} pageId
* @param {String} pageId
*/
*/
TOP
.
showPage
=
function
(
pageId
)
{
CHK_TOP
.
showPage
=
function
(
pageId
)
{
//get data
//get data
if
(
pageId
==
CONSTANT
.
PAGE_NAME
.
OPERATION_LIST
)
{
if
(
pageId
==
C
HK_C
ONSTANT
.
PAGE_NAME
.
OPERATION_LIST
)
{
OL
.
init
();
CHK_
OL
.
init
();
}
else
if
(
pageId
==
CONSTANT
.
PAGE_NAME
.
DASHBOARD
)
{
}
else
if
(
pageId
==
C
HK_C
ONSTANT
.
PAGE_NAME
.
DASHBOARD
)
{
CHK_Dashboard
.
init
();
CHK_Dashboard
.
init
();
}
}
//show page
//show page
const
pages
=
document
.
getElementsByClassName
(
'page-content'
);
const
pages
=
document
.
getElementsByClassName
(
"page-content"
);
for
(
let
i
=
0
;
i
<
pages
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
pages
.
length
;
i
++
)
{
if
(
pages
[
i
].
id
==
pageId
)
{
if
(
pages
[
i
].
id
==
pageId
)
{
pages
[
i
].
style
.
display
=
'block'
;
pages
[
i
].
style
.
display
=
"block"
;
}
else
{
}
else
{
pages
[
i
].
style
.
display
=
'none'
;
pages
[
i
].
style
.
display
=
"none"
;
}
}
}
}
}
;
}
\ No newline at end of file
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