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
f235a516
Commit
f235a516
authored
Oct 12, 2022
by
Takumi Imai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#49764 ファイル整理
parent
5175b176
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
145 additions
and
155 deletions
+145
-155
abvw/common/js/appCommon/check-common.js
+13
-13
abvw/common/js/appCommon/check-footer.js
+66
-68
abvw/common/js/appCommon/constant.js
+10
-10
abvw/html/index.html
+8
-8
abvw/html/main-footer.html
+2
-2
abvw/js/dashboardSetting/check-dashboard-setting.js
+32
-36
abvw/js/operationList/operationList.js
+0
-0
abvw/js/topPage/topPage.js
+14
-18
No files found.
abvw/common/js/appCommon/check-common.js
View file @
f235a516
...
...
@@ -21,12 +21,12 @@ CHK_Common.lang;
*/
CHK_Common
.
setLangCodeWeb
=
function
()
{
let
lang
=
CHK_Common
.
getLangWeb
();
if
(
lang
.
split
(
'-'
)[
0
]
==
C
HK_C
ONSTANT
.
LANG
.
English
)
{
lang
=
C
HK_C
ONSTANT
.
LANG
.
ENGLISH
;
}
else
if
(
lang
.
split
(
'-'
)[
0
]
==
C
HK_C
ONSTANT
.
LANG
.
KOREA
)
{
lang
=
C
HK_C
ONSTANT
.
LANG
.
KOREA
;
if
(
lang
.
split
(
'-'
)[
0
]
==
CONSTANT
.
LANG
.
English
)
{
lang
=
CONSTANT
.
LANG
.
ENGLISH
;
}
else
if
(
lang
.
split
(
'-'
)[
0
]
==
CONSTANT
.
LANG
.
KOREA
)
{
lang
=
CONSTANT
.
LANG
.
KOREA
;
}
else
{
lang
=
C
HK_C
ONSTANT
.
LANG
.
JAPAN
;
lang
=
CONSTANT
.
LANG
.
JAPAN
;
}
CHK_Common
.
lang
=
lang
;
};
...
...
@@ -39,11 +39,11 @@ CHK_Common.setLangCodeWeb = function () {
CHK_Common
.
getLangWeb
=
function
()
{
if
(
!
CHK_Common
.
lang
)
{
let
pageLang
;
if
(
localStorage
[
C
HK_C
ONSTANT
.
LANG
.
SAVE_NAME
])
{
pageLang
=
localStorage
[
C
HK_C
ONSTANT
.
LANG
.
SAVE_NAME
];
if
(
localStorage
[
CONSTANT
.
LANG
.
SAVE_NAME
])
{
pageLang
=
localStorage
[
CONSTANT
.
LANG
.
SAVE_NAME
];
}
else
{
pageLang
=
(
window
.
navigator
.
languages
&&
window
.
navigator
.
languages
[
0
])
||
window
.
navigator
.
language
||
window
.
navigator
.
userLanguage
||
window
.
navigator
.
browserLanguage
;
localStorage
[
C
HK_C
ONSTANT
.
LANG
.
SAVE_NAME
]
=
pageLang
;
localStorage
[
CONSTANT
.
LANG
.
SAVE_NAME
]
=
pageLang
;
}
return
pageLang
;
}
else
{
...
...
@@ -81,7 +81,7 @@ CHK_Common.updateLang = function () {
* @returns String msg
*/
CHK_Common
.
getMsg
=
function
(
key
)
{
const
msg
=
C
HK_C
ONSTANT
.
MSG_MAP
[
key
];
const
msg
=
CONSTANT
.
MSG_MAP
[
key
];
if
(
!
msg
)
{
return
''
;
}
...
...
@@ -165,7 +165,7 @@ CHK_Common.alertClose = function () {
*/
CHK_Common
.
goUrlWithCurrentParams
=
function
(
url
,
params
)
{
if
(
!
params
)
{
location
.
href
=
C
HK_C
ONSTANT
.
URL
.
BASE_WEB
+
url
;
location
.
href
=
CONSTANT
.
URL
.
BASE_WEB
+
url
;
}
const
mixParams
=
Object
.
assign
(
CHK_Common
.
getUrlParameter
(),
params
);
...
...
@@ -237,7 +237,7 @@ CHK_Common.cmsAjax = function (url, param, async = true, callback, errorCallback
}
else
if
(
errorCallback
)
{
errorCallback
();
}
else
if
(
result
.
httpStatus
==
'401'
)
{
CHK_Common
.
goUrlWithCurrentParams
(
C
HK_C
ONSTANT
.
PAGE_NAME
.
LOGIN
);
CHK_Common
.
goUrlWithCurrentParams
(
CONSTANT
.
PAGE_NAME
.
LOGIN
);
}
else
if
(
result
.
httpStatus
==
'403'
)
{
CHK_Common
.
closeLoading
();
CHK_Common
.
displayAlert
(
'errorOccurred'
);
...
...
@@ -300,8 +300,8 @@ CHK_Common.checkAuth = function (async = true) {
let
params
=
{};
params
.
sid
=
CHK_Common
.
getSid
;
var
urlPath
=
ClientData
.
userInfo_accountPath
();
const
url
=
C
HK_CONSTANT
.
URL
.
BASE_CMS
+
urlPath
+
CHK_CONSTANT
.
URL
.
BASE_CHECKAPI
+
CHK_
CONSTANT
.
URL
.
AUTH_SESSION
;
const
url
=
C
ONSTANT
.
URL
.
BASE_CMS
+
urlPath
+
CONSTANT
.
URL
.
BASE_CHECKAPI
+
CONSTANT
.
URL
.
AUTH_SESSION
;
CHK_Common
.
cmsAjax
(
url
,
params
,
async
,
null
,
function
()
{
CHK_Common
.
goUrlWithCurrentParams
(
C
HK_C
ONSTANT
.
PAGE_NAME
.
LOGIN
);
CHK_Common
.
goUrlWithCurrentParams
(
CONSTANT
.
PAGE_NAME
.
LOGIN
);
});
};
abvw/common/js/appCommon/check-footer.js
View file @
f235a516
/**
* Common js for footer.
* ※Code is written mainly for dashboard and operationList.
*
*
* @since cms:1.4.3.2&1.4.3.3 web:1.0
*/
var
CHK_Footer
=
{};
var
FOOTER
=
{};
/**
* Change specific footer bottom to active.
*
* @param {String} bottomNavId
*
* @param {String} bottomNavId
*/
CHK_Footer
.
activeBottomNav
=
function
(
bottomNavId
)
{
let
elm
=
$
(
"#"
+
bottomNavId
);
FOOTER
.
activeBottomNav
=
function
(
bottomNavId
)
{
let
elm
=
$
(
'#'
+
bottomNavId
);
if
(
typeof
elm
!==
'object'
)
{
console
.
log
(
'
CHK_Footer
.activeBottomNav:elm !== object:'
+
bottomNavId
);
console
.
log
(
'
FOOTER
.activeBottomNav:elm !== object:'
+
bottomNavId
);
return
;
}
elm
.
removeClass
(
'text-secondary'
);
elm
.
addClass
(
"text-primary"
);
let
img
=
elm
.
find
(
"img"
)[
0
];
if
(
img
&&
img
.
getAttribute
(
"data-src"
))
{
img
.
src
=
img
.
getAttribute
(
"data-src"
);
elm
.
addClass
(
'text-primary'
);
let
img
=
elm
.
find
(
'img'
)[
0
];
if
(
img
&&
img
.
getAttribute
(
'data-src'
))
{
img
.
src
=
img
.
getAttribute
(
'data-src'
);
}
}
}
;
/**
* change inactive all footer bottom
*/
CHK_Footer
.
inactiveAllBottomNav
=
function
()
{
let
navs
=
document
.
getElementsByClassName
(
"bottom-nav"
);
FOOTER
.
inactiveAllBottomNav
=
function
()
{
let
navs
=
document
.
getElementsByClassName
(
'bottom-nav'
);
for
(
i
=
0
;
i
<
navs
.
length
;
i
++
)
{
navs
[
i
].
className
=
navs
[
i
].
className
.
replace
(
"text-primary"
,
"text-secondary"
);
let
img
=
navs
[
i
].
querySelector
(
"img"
);
navs
[
i
].
className
=
navs
[
i
].
className
.
replace
(
'text-primary'
,
'text-secondary'
);
let
img
=
navs
[
i
].
querySelector
(
'img'
);
if
(
img
&&
img
.
getAttribute
(
'data-inactive-src'
))
{
img
.
src
=
img
.
getAttribute
(
'data-inactive-src'
);
}
}
}
}
}
;
/**
* Go page of index.html.
* Store tab id in session for want to show display.
*
* @param {String} tabId
*
* @param {String} tabId
*/
CHK_Footer
.
goIndexPage
=
function
(
tabId
)
{
FOOTER
.
goIndexPage
=
function
(
tabId
)
{
sessionStorage
.
activeTab
=
tabId
;
CHK_Common
.
goUrlWithCurrentParams
(
DAFAULT_PAGE
);
}
}
;
/**
* is the url index.html?
*/
CHK_Footer
.
isIndexPage
=
function
()
{
FOOTER
.
isIndexPage
=
function
()
{
if
(
typeof
location
===
'object'
&&
typeof
location
.
pathname
===
'string'
)
{
if
(
location
.
pathname
.
includes
(
C
HK_C
ONSTANT
.
PAGE_NAME
.
DEFAULT
)
==
true
)
{
if
(
location
.
pathname
.
includes
(
CONSTANT
.
PAGE_NAME
.
DEFAULT
)
==
true
)
{
return
true
;
}
}
return
false
;
}
}
;
/**
* Initialize with any navigation
*
* @param {String} bottomNav
*
* @param {String} bottomNav
*/
CHK_Footer
.
activeInitBottomNav
=
function
(
bottomNav
)
{
CHK_Footer
.
inactiveAllBottomNav
();
CHK_Footer
.
activeBottomNav
(
bottomNav
);
}
FOOTER
.
activeInitBottomNav
=
function
(
bottomNav
)
{
FOOTER
.
inactiveAllBottomNav
();
FOOTER
.
activeBottomNav
(
bottomNav
);
}
;
/**
* Go page of dashboard
*/
CHK_Footer
.
goDashboard
=
function
()
{
sessionStorage
.
activeTab
=
C
HK_C
ONSTANT
.
PAGE_TAB
.
DASHBOARD
;
CHK_Footer
.
activeInitBottomNav
(
'dashboardBottomNav'
);
if
(
CHK_Footer
.
isIndexPage
())
{
CHK_TOP
.
showPage
(
C
HK_C
ONSTANT
.
PAGE_NAME
.
DASHBOARD
);
FOOTER
.
goDashboard
=
function
()
{
sessionStorage
.
activeTab
=
CONSTANT
.
PAGE_TAB
.
DASHBOARD
;
FOOTER
.
activeInitBottomNav
(
'dashboardBottomNav'
);
if
(
FOOTER
.
isIndexPage
())
{
CHK_TOP
.
showPage
(
CONSTANT
.
PAGE_NAME
.
DASHBOARD
);
return
;
}
CHK_Footer
.
goIndexPage
(
CHK_
CONSTANT
.
PAGE_NAME
.
DASHBOARD
);
}
FOOTER
.
goIndexPage
(
CONSTANT
.
PAGE_NAME
.
DASHBOARD
);
}
;
/**
* Go page of operationList
*/
CHK_Footer
.
goOperationList
=
function
()
{
sessionStorage
.
activeTab
=
C
HK_C
ONSTANT
.
PAGE_TAB
.
OPERATION_LIST
;
CHK_Footer
.
activeInitBottomNav
(
'operationListBottomNav'
);
if
(
CHK_Footer
.
isIndexPage
())
{
CHK_TOP
.
showPage
(
C
HK_C
ONSTANT
.
PAGE_NAME
.
OPERATION_LIST
);
FOOTER
.
goOperationList
=
function
()
{
sessionStorage
.
activeTab
=
CONSTANT
.
PAGE_TAB
.
OPERATION_LIST
;
FOOTER
.
activeInitBottomNav
(
'operationListBottomNav'
);
if
(
FOOTER
.
isIndexPage
())
{
CHK_TOP
.
showPage
(
CONSTANT
.
PAGE_NAME
.
OPERATION_LIST
);
return
;
}
CHK_Footer
.
goIndexPage
(
CHK_
CONSTANT
.
PAGE_NAME
.
OPERATION_LIST
);
}
FOOTER
.
goIndexPage
(
CONSTANT
.
PAGE_NAME
.
OPERATION_LIST
);
}
;
/**
* Go to active tab when footer was loaded.
* If it is no active tab, go to page in settings.
*/
CHK_Footer
.
initFooter
=
function
()
{
$
(
"#footer"
).
load
(
CHK_CONSTANT
.
PAGE_NAME
.
FOOTER
,
function
()
{
if
(
typeof
sessionStorage
!=
'undefined'
&&
typeof
sessionStorage
.
activeTab
!=
'undefined'
)
{
if
(
sessionStorage
.
activeTab
==
CHK_CONSTANT
.
PAGE_TAB
.
DASHBOARD
)
{
CHK_Footer
.
goDashboard
();
}
else
{
CHK_Footer
.
goOperationList
();
}
return
;
}
CHK_Footer
.
goOperationList
();
// CHK.loadDashboardSetting(function() {
// if (CHK.dashboardSetting.dashboardHome) {
// CHK_Footer.goDashboard();
// } else {
// CHK_Footer.goOperationList();
// }
// });
});
}
\ No newline at end of file
FOOTER
.
initFooter
=
function
()
{
$
(
'#footer'
).
load
(
CONSTANT
.
PAGE_NAME
.
FOOTER
,
function
()
{
if
(
typeof
sessionStorage
!=
'undefined'
&&
typeof
sessionStorage
.
activeTab
!=
'undefined'
)
{
if
(
sessionStorage
.
activeTab
==
CONSTANT
.
PAGE_TAB
.
DASHBOARD
)
{
FOOTER
.
goDashboard
();
}
else
{
FOOTER
.
goOperationList
();
}
return
;
}
FOOTER
.
goOperationList
();
// CHK.loadDashboardSetting(function() {
// if (CHK.dashboardSetting.dashboardHome) {
// FOOTER.goDashboard();
// } else {
// FOOTER.goOperationList();
// }
// });
});
};
abvw/common/js/appCommon/constant.js
View file @
f235a516
...
...
@@ -3,9 +3,9 @@
*
* @since 1.4.3.2 & 1.4.3.3
*/
const
C
HK_C
ONSTANT
=
{};
const
CONSTANT
=
{};
C
HK_C
ONSTANT
.
SORT_TYPE
=
{
CONSTANT
.
SORT_TYPE
=
{
NAME
:
0
,
START_DATE_DESC
:
1
,
START_DATE_ASC
:
2
,
...
...
@@ -13,7 +13,7 @@ CHK_CONSTANT.SORT_TYPE = {
LAST_EDIT_DATE
:
4
,
};
C
HK_C
ONSTANT
.
PAGE_NAME
=
{
CONSTANT
.
PAGE_NAME
=
{
DASHBOARD
:
'dashboard'
,
OPERATION_LIST
:
'operationList'
,
FOOTER
:
'main-footer.html'
,
...
...
@@ -21,31 +21,31 @@ CHK_CONSTANT.PAGE_NAME = {
LOGIN
:
'login.html'
,
};
C
HK_C
ONSTANT
.
PAGE_TAB
=
{
CONSTANT
.
PAGE_TAB
=
{
DASHBOARD
:
'dashboard'
,
OPERATION_LIST
:
'operationList'
,
};
C
HK_C
ONSTANT
.
OPERATION_TYPE
=
{
CONSTANT
.
OPERATION_TYPE
=
{
LIST
:
'0'
,
DRAWING
:
'1'
,
VTOUR
:
'2'
,
PDF
:
'3'
,
};
C
HK_C
ONSTANT
.
REPORT_TYPE
=
{
CONSTANT
.
REPORT_TYPE
=
{
REPORTONLY
:
'0'
,
INSPECT
:
'1'
,
WITHREPLY
:
'2'
,
WORKFLOW
:
'3'
,
};
C
HK_C
ONSTANT
.
ADD_REPORT_FLG
=
{
CONSTANT
.
ADD_REPORT_FLG
=
{
UNABLE
:
'0'
,
ABLE
:
'1'
,
};
C
HK_C
ONSTANT
.
URL
=
{
CONSTANT
.
URL
=
{
// BASE_CMS: 'https://' + location.host + '/checkapi/web/',
BASE_CMS
:
'http://localhost:8080/acms/'
,
BASE_CHECKAPI
:
'/checkapi/web/'
,
...
...
@@ -54,14 +54,14 @@ CHK_CONSTANT.URL = {
AUTH_SESSION
:
'getSession/checkAuthUser'
,
};
C
HK_C
ONSTANT
.
LANG
=
{
CONSTANT
.
LANG
=
{
SAVE_NAME
:
'lang'
,
JAPAN
:
'ja'
,
KOREA
:
'ko'
,
ENGLISH
:
'en'
,
};
C
HK_C
ONSTANT
.
MSG_MAP
=
{
CONSTANT
.
MSG_MAP
=
{
all
:
{
ja
:
'全て'
,
ko
:
'전체'
,
en
:
'All'
},
dateError
:
{
ja
:
'開始日は終了日の前に設定してください。'
,
ko
:
'잘못된 검색일입니다.'
,
en
:
'Please enter correct search date.'
},
operationListTitle
:
{
ja
:
'トップページ|A Book Check'
,
ko
:
'톱 페이지|A Book Check'
,
en
:
'Top Page|A Book Check'
},
...
...
abvw/html/index.html
View file @
f235a516
...
...
@@ -38,7 +38,7 @@
<header
style=
"position: fixed; width: 100%; top: 0px; left: 0; z-index: 999;"
>
<nav
class=
"navbar navbar-dark bg-primary"
>
<div>
<a
class=
"navbar-brand category-btn lht-0 d-none"
onclick=
"
CHK_
OL.openCategory();"
id=
"operationGroupMasterButton"
>
<a
class=
"navbar-brand category-btn lht-0 d-none"
onclick=
"OL.openCategory();"
id=
"operationGroupMasterButton"
>
<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>
</a>
...
...
@@ -53,7 +53,7 @@
<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>
<a
class=
"category-content-between border-bottom"
>
<h2
class=
"text-nowrap -btn p-3"
onclick=
"
CHK_
OL.openCategory();"
href=
"#"
><i
class=
"fa fa-times"
></i></a>
<h2
class=
"text-nowrap -btn p-3"
onclick=
"OL.openCategory();"
href=
"#"
><i
class=
"fa fa-times"
></i></a>
</div>
</nav>
</section>
...
...
@@ -74,7 +74,7 @@
<div
class=
"form-group has-search input-group"
>
<input
type=
"text"
class=
"form-control multi-lang"
data-msg=
"placeholderOperationName"
placeholder=
"placeholderOperationName"
id=
"searchTaskName"
>
<div
class=
"input-group-append"
>
<i
class=
"fas fa-search input-group-text"
onclick=
"
CHK_
OL.search();"
></i>
<i
class=
"fas fa-search input-group-text"
onclick=
"OL.search();"
></i>
</div>
</div>
</div>
...
...
@@ -124,12 +124,12 @@
<span
class=
"d-none d-md-inline text-dark fs-10 align-middle multi-lang"
data-msg=
"labelSort"
></span>
</a>
<div
class=
"dropdown-menu"
aria-labelledby=
"dropdownMenuButton"
>
<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=
"
CHK_
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=
"
CHK_
OL.changeSortType(this);"
></a>
<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 active multi-lang"
data-msg=
"labelSortNew"
data-sort=
"1"
id=
"defaultSort"
onclick=
"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=
"labelSortOpen"
data-sort=
"4"
onclick=
"OL.changeSortType(this);"
></a>
</div>
<a
href=
"javascript:
CHK_
OL.resetSearch();"
class=
"text-decoration-none py-2 lht-0 d-inline-block ml-3"
>
<a
href=
"javascript: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"
>
<span
class=
"d-none d-md-inline text-dark fs-10 align-middle multi-lang"
data-msg=
"labelReset"
lnag=
"labelReset"
></span>
</a>
...
...
abvw/html/main-footer.html
View file @
f235a516
...
...
@@ -2,12 +2,12 @@
<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:
CHK_Footer
.goDashboard();"
>
<a
id=
"dashboardBottomNav"
class=
"d-block w-100 text-center py-2 text-decoration-none text-secondary bottom-nav"
href=
"javascript:
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"
>
<div
class=
"fs-7 multi-lang"
data-msg=
"buttonDashboard"
></div>
</a>
<!--作業一覧-->
<a
id=
"operationListBottomNav"
class=
"d-block w-100 text-center py-2 text-decoration-none text-primary bottom-nav"
href=
"javascript:
CHK_Footer
.goOperationList();"
>
<a
id=
"operationListBottomNav"
class=
"d-block w-100 text-center py-2 text-decoration-none text-primary bottom-nav"
href=
"javascript:
FOOTER
.goOperationList();"
>
<i
class=
"fas fa-tasks fs-14 p-1"
></i>
<div
class=
"fs-7 multi-lang"
data-msg=
"buttonOperationList"
></div>
</a>
...
...
abvw/js/dashboardSetting/check-dashboard-setting.js
View file @
f235a516
var
CHK_DashboardSetting
=
{};
CHK_DashboardSetting
.
displayItems
=
[
{
id
:
'newReport'
,
name
:
'chk-new'
,
enabled
:
true
,
title
:
'新規報告'
,
msg
:
'dashboardSettingNewRegistrationTitle'
},
{
id
:
'continousWork'
,
name
:
'chk-proccess'
,
enabled
:
true
,
title
:
'工程作業'
,
msg
:
'dashboardSettingContinousWorkTitle'
},
{
id
:
'reportWarning'
,
name
:
'chk-alert'
,
enabled
:
true
,
title
:
'警告を含む作業'
,
msg
:
'dashboardSettingReportWarningTitle'
},
{
id
:
'dashboardHome'
,
name
:
'chk-home'
,
enabled
:
false
,
title
:
'ダッシュボードをホーム画面にする'
,
msg
:
'dashboardSettingDashboardHomeTitle'
},
{
id
:
'newReport'
,
name
:
'chk-new'
,
enabled
:
true
,
title
:
'新規報告'
,
msg
:
'dashboardSettingNewRegistrationTitle'
},
{
id
:
'continousWork'
,
name
:
'chk-proccess'
,
enabled
:
true
,
title
:
'工程作業'
,
msg
:
'dashboardSettingContinousWorkTitle'
},
{
id
:
'reportWarning'
,
name
:
'chk-alert'
,
enabled
:
true
,
title
:
'警告を含む作業'
,
msg
:
'dashboardSettingReportWarningTitle'
},
{
id
:
'dashboardHome'
,
name
:
'chk-home'
,
enabled
:
false
,
title
:
'ダッシュボードをホーム画面にする'
,
msg
:
'dashboardSettingDashboardHomeTitle'
},
];
//CHK_DashboardSetting.displayItemsに設定されている情報から✓されている項目をhtml上に設定する
CHK_DashboardSetting
.
loadSettings
=
function
()
{
CHK_DashboardSetting
.
displayItems
.
forEach
(
function
(
item
)
{
CHK_DashboardSetting
.
loadSettings
=
function
()
{
CHK_DashboardSetting
.
displayItems
.
forEach
(
function
(
item
)
{
let
enabled
=
CHK
.
dashboardSetting
[
item
.
id
];
if
(
typeof
enabled
!==
'undefined'
)
{
item
.
enabled
=
enabled
;
...
...
@@ -17,50 +17,47 @@ CHK_DashboardSetting.loadSettings = function() {
itemElement
.
addClass
(
'checked'
);
}
else
{
itemElement
.
removeClass
(
'checked'
);
}
}
}
});
}
}
;
//CHK_DashboardSetting.displayItemsに設定を書き込む
CHK_DashboardSetting
.
saveSetting
=
function
(
key
,
enabled
)
{
CHK_DashboardSetting
.
displayItems
.
forEach
(
function
(
item
)
{
CHK_DashboardSetting
.
saveSetting
=
function
(
key
,
enabled
)
{
CHK_DashboardSetting
.
displayItems
.
forEach
(
function
(
item
)
{
if
(
item
.
id
==
key
)
{
item
.
enabled
=
enabled
;
}
});
CHK
.
saveDashboardSetting
(
key
,
enabled
);
}
}
;
//CHK_DashboardSetting.displayItemsからhtmlに設定画面を表示する
CHK_DashboardSetting
.
initDisplays
=
function
()
{
$
(
"#displayItems tbody"
).
empty
();
CHK_DashboardSetting
.
displayItems
.
forEach
(
function
(
item
)
{
CHK_DashboardSetting
.
initDisplays
=
function
()
{
$
(
'#displayItems tbody'
).
empty
();
CHK_DashboardSetting
.
displayItems
.
forEach
(
function
(
item
)
{
var
html
=
CHK_DashboardSetting
.
initHtmlItem
(
item
);
$
(
"#displayItems tbody"
).
append
(
html
);
$
(
'#displayItems tbody'
).
append
(
html
);
});
}
}
;
//設定画面に表示するhtmlを生成する
CHK_DashboardSetting
.
initHtmlItem
=
function
(
item
)
{
var
titleDiv
=
'<div class="font-weight-normal text-dark multi-lang" data-msg="'
+
item
.
msg
+
'">'
+
item
.
title
+
'</div>'
;
CHK_DashboardSetting
.
initHtmlItem
=
function
(
item
)
{
var
titleDiv
=
'<div class="font-weight-normal text-dark multi-lang" data-msg="'
+
item
.
msg
+
'">'
+
item
.
title
+
'</div>'
;
var
toggleClass
=
'toggle'
;
if
(
item
.
enabled
)
{
toggleClass
+=
' checked'
;
}
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
;
}
}
;
//設定画面でクリックされてた時の処理
//
CHK_DashboardSetting
.
bindToggleClick
=
function
()
{
$
(
".toggle"
).
on
(
"click"
,
function
()
{
$
(
this
).
toggleClass
(
"checked"
);
CHK_DashboardSetting
.
bindToggleClick
=
function
()
{
$
(
'.toggle'
).
on
(
'click'
,
function
()
{
$
(
this
).
toggleClass
(
'checked'
);
var
id
=
$
(
this
).
attr
(
'id'
);
var
enabled
=
false
;
if
(
$
(
this
).
hasClass
(
'checked'
))
{
...
...
@@ -68,22 +65,22 @@ CHK_DashboardSetting.bindToggleClick = function() {
}
CHK_DashboardSetting
.
saveSetting
(
id
,
enabled
);
});
}
}
;
//設定画面の初期処理
CHK_DashboardSetting
.
init
=
function
()
{
CHK_DashboardSetting
.
init
=
function
()
{
CHK
.
initCommon
();
$
(
"#footer"
).
load
(
"main-footer.html"
,
function
()
{
CHK_Footer
.
activeDashboardBottomNav
();
$
(
'#footer'
).
load
(
'main-footer.html'
,
function
()
{
FOOTER
.
activeDashboardBottomNav
();
});
CHK
.
loadDashboardSetting
(
function
()
{
CHK
.
loadDashboardSetting
(
function
()
{
CHK_DashboardSetting
.
loadSettings
();
CHK_DashboardSetting
.
initDisplays
();
CHK_DashboardSetting
.
bindToggleClick
();
});
}
}
;
//戻るボタン
CHK_DashboardSetting
.
goBack
=
function
()
{
CHK_Footer
.
goDashboard
();
}
\ No newline at end of file
CHK_DashboardSetting
.
goBack
=
function
()
{
FOOTER
.
goDashboard
();
};
abvw/js/operationList/operationList.js
View file @
f235a516
This diff is collapsed.
Click to expand it.
abvw/js/topPage/topPage.js
View file @
f235a516
/**
* common js of top page.
* top page is dashboard and operationList.
*
*
* @since cms:1.4.3.2&1.4.3.3 web:1.0
*/
var
CHK_TOP
=
{};
$
(
document
).
ready
(
function
()
{
//setting lang info
CHK_Common
.
setLangCodeWeb
();
//Check if user is logged in
CHK_Common
.
checkAuth
(
false
);
...
...
@@ -22,34 +21,32 @@ $(document).ready(function () {
/**
* show page
*/
CHK_TOP
.
init
=
function
()
{
CHK_TOP
.
init
=
function
()
{
CHK_Common
.
showLoading
();
CHK_Footer
.
initFooter
();
//app should get data after initFooter
FOOTER
.
initFooter
();
//app should get data after initFooter
CHK_Common
.
closeLoading
();
};
/**
* Show page by arbitrary id
*
* @param {String} pageId
*
* @param {String} pageId
*/
CHK_TOP
.
showPage
=
function
(
pageId
)
{
CHK_TOP
.
showPage
=
function
(
pageId
)
{
//get data
if
(
pageId
==
C
HK_C
ONSTANT
.
PAGE_NAME
.
OPERATION_LIST
)
{
CHK_
OL
.
init
();
}
else
if
(
pageId
==
C
HK_C
ONSTANT
.
PAGE_NAME
.
DASHBOARD
)
{
if
(
pageId
==
CONSTANT
.
PAGE_NAME
.
OPERATION_LIST
)
{
OL
.
init
();
}
else
if
(
pageId
==
CONSTANT
.
PAGE_NAME
.
DASHBOARD
)
{
CHK_Dashboard
.
init
();
}
//show page
const
pages
=
document
.
getElementsByClassName
(
"page-content"
);
const
pages
=
document
.
getElementsByClassName
(
'page-content'
);
for
(
let
i
=
0
;
i
<
pages
.
length
;
i
++
)
{
if
(
pages
[
i
].
id
==
pageId
)
{
pages
[
i
].
style
.
display
=
"block"
;
pages
[
i
].
style
.
display
=
'block'
;
}
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