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
ca8b685f
Commit
ca8b685f
authored
Oct 25, 2022
by
NGO THI HONG
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/1.0_check_web_dev_50265' into feature/1.0_check_web_dev_50272
parents
79ba6233
3a7adaef
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
293 additions
and
381 deletions
+293
-381
abvw/common/header.html
+17
-14
abvw/common/json/lang/lang-en.json
+22
-1
abvw/common/json/lang/lang-ja.json
+21
-1
abvw/common/json/lang/lang-ko.json
+21
-1
abvw/html/dashboard-setting.html
+39
-55
abvw/html/dashboard.html
+16
-110
abvw/html/index.html
+1
-1
abvw/js/dashboard/check-dashboard.js
+0
-114
abvw/js/dashboard/dashboard.js
+98
-45
abvw/js/dashboardSetting/dashboard-setting.js
+58
-39
No files found.
abvw/common/header.html
View file @
ca8b685f
...
...
@@ -2,35 +2,38 @@
<nav
class=
"navbar navbar-dark shadow-sm px-sm-auto px-0"
>
<div
class=
"container"
>
<a
href=
"dashboard.html"
class=
"navbar-brand"
>
<img
src=
"img/logo.svg"
alt=
"ロゴ"
class=
"img-fluid"
>
<img
src=
"
../common/
img/logo.svg"
alt=
"ロゴ"
class=
"img-fluid"
>
</a>
<ul
class=
"mr-sm-auto ml-sm-0 ml-auto mb-0 pl-0 d-flex"
>
<li
class=
"active nav-link"
>
<a
href=
"dashboard.html"
class=
"d-block text-center text-decoration-none"
>
<img
src=
"img/nav_icon_dashboard.svg"
alt=
"ダッシュボード"
class=
"p-sm-1 p-0 img-fluid"
>
<div
class=
"fs-7 d-sm-block d-none
"
>
ダッシュボード
</div>
<img
src=
"
../common/
img/nav_icon_dashboard.svg"
alt=
"ダッシュボード"
class=
"p-sm-1 p-0 img-fluid"
>
<div
class=
"fs-7 d-sm-block d-none
lang"
lang=
"dashboard"
>
</div>
</a>
</li>
<li
class=
"nav-link"
>
<a
href=
"task-list.html"
class=
"d-block text-center text-decoration-none"
>
<img
src=
"img/nav_icon_task.svg"
alt=
"作業一覧"
class=
"p-sm-1 p-0 img-fluid"
>
<div
class=
"fs-7 d-sm-block d-none
"
>
作業一覧
</div>
<img
src=
"
../common/
img/nav_icon_task.svg"
alt=
"作業一覧"
class=
"p-sm-1 p-0 img-fluid"
>
<div
class=
"fs-7 d-sm-block d-none
lang"
lang=
"workList"
>
</div>
</a>
</li>
</ul>
<div
class=
"dropdown"
>
<a
href=
"#"
class=
"nav-link text-center"
id=
"dropdown-profile"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
>
<img
src=
"img/nav_icon_profile.svg"
alt=
"プロフィール"
class=
"p-sm-1 p-0 img-fluid profile-img"
>
<div
class=
"fs-7 d-sm-block d-none
"
>
プロフィール
</div>
<img
src=
"
../common/
img/nav_icon_profile.svg"
alt=
"プロフィール"
class=
"p-sm-1 p-0 img-fluid profile-img"
>
<div
class=
"fs-7 d-sm-block d-none
lang"
lang=
"profile"
>
</div>
</a>
<div
class=
"dropdown-menu dropdown-menu-right"
data-animation=
"true"
aria-labelledby=
"dropdown-profile"
>
<h6
class=
"dropdown-header"
>
login-id
</h6>
<a
class=
"dropdown-item"
href=
"account-setting.html"
>
<img
src=
"./img/menu_icon_account_setting.svg"
alt=
"アカウント設定"
class=
"navbar-dropdown-icon"
>
アカウント設定
</a>
<a
class=
"dropdown-item"
href=
"#"
data-toggle=
"modal"
data-target=
"#confirm-modal"
>
<img
src=
"./img/menu_icon_logout.svg"
alt=
"ログアウト"
class=
"navbar-dropdown-icon"
>
ログアウト
</a>
<h6
class=
"dropdown-header lang"
lang=
"dspLogin"
></h6>
<a
class=
"dropdown-item "
href=
"account-setting.html"
>
<img
src=
"../common/img/menu_icon_account_setting.svg"
alt=
"アカウント設定"
class=
"navbar-dropdown-icon"
>
<span
class=
"lang"
style=
" color: #6c757d;"
lang=
"account_setting"
></span>
</a>
<a
class=
"dropdown-item "
href=
"#"
data-toggle=
"modal"
data-target=
"#confirm-modal"
>
<img
src=
"../common/img/menu_icon_logout.svg"
alt=
"ログアウト"
class=
"navbar-dropdown-icon"
>
<span
class=
"lang"
style=
" color: #6c757d;"
lang=
"dspLogout"
></span>
</a>
</div>
</div>
</div>
...
...
abvw/common/json/lang/lang-en.json
View file @
ca8b685f
...
...
@@ -34,5 +34,25 @@
"sysLockScrPwdInput"
:
"Input password"
,
"msgPWDNeedChange"
:
"Change password is required. Please back Setting view."
,
"msgAnonymousLoginErr"
:
"Can not login. (Error code: {0})"
,
"msgAnonymousLoginErr2"
:
"Can not login. "
"msgAnonymousLoginErr2"
:
"Can not login. "
,
"dashboard"
:
"Dashboard"
,
"dashboardSettings"
:
"Dashboard Settings"
,
"pickup"
:
"Pick up"
,
"communication"
:
"Communication"
,
"workList"
:
"Work list"
,
"profile"
:
"Profile"
,
"account_setting"
:
"Account setting"
,
"newRegistrationTitle"
:
"New Registration"
,
"continousWorkTitle"
:
"Continous Work"
,
"processWorkTitle"
:
"Process work"
,
"reportWarningTitle"
:
"Report With Warning"
,
"workWithWarningsTitle"
:
"Work with warnings"
,
"messageListTitle"
:
"Message List"
,
"sendMessageTitle"
:
"Send Message"
,
"distanceSupportTitle"
:
"DistanceSupport"
,
"chatTitle"
:
"Chat"
,
"makeDashboardAsHome"
:
"Make dashboard your home screen"
,
"btnKeep"
:
"Keep"
}
\ No newline at end of file
abvw/common/json/lang/lang-ja.json
View file @
ca8b685f
...
...
@@ -34,5 +34,24 @@
"sysLockScrPwdInput"
:
"パスワードを入力してください"
,
"msgPWDNeedChange"
:
"パスワードの変更が必要です。設定変更画面に戻って変更してください。"
,
"msgAnonymousLoginErr"
:
"ログインできません。(エラーコード:{0})"
,
"msgAnonymousLoginErr2"
:
"ログインできません。"
"msgAnonymousLoginErr2"
:
"ログインできません。"
,
"dashboard"
:
"ダッシュボード"
,
"dashboardSettings"
:
"ダッシュボード設定"
,
"pickup"
:
"ピックアップ"
,
"communication"
:
"コミュニケーション"
,
"workList"
:
"作業一覧"
,
"profile"
:
"プロフィール"
,
"account_setting"
:
"アカウント設定"
,
"newRegistrationTitle"
:
"新規報告"
,
"continousWorkTitle"
:
"工程管理"
,
"processWorkTitle"
:
"工程作業"
,
"reportWarningTitle"
:
"警告を含む報告"
,
"workWithWarningsTitle"
:
"警告を含む作業"
,
"messageListTitle"
:
"メッセージ一覧"
,
"sendMessageTitle"
:
"メッセージ送信"
,
"distanceSupportTitle"
:
"遠隔支援"
,
"chatTitle"
:
"チャット"
,
"makeDashboardAsHome"
:
"ダッシュボードをホーム画面にする"
,
"btnKeep"
:
"保存"
}
\ No newline at end of file
abvw/common/json/lang/lang-ko.json
View file @
ca8b685f
...
...
@@ -34,5 +34,24 @@
"sysLockScrPwdInput"
:
"패스워드를 입력해 주십시오."
,
"msgPWDNeedChange"
:
"패스워드를 변경해야 합니다. 환경설정에서 패스워드를 변경해 주십시오."
,
"msgAnonymousLoginErr"
:
"로그인할 수 없습니다. (에러코드 : {0})"
,
"msgAnonymousLoginErr2"
:
"로그인할 수 없습니다."
"msgAnonymousLoginErr2"
:
"로그인할 수 없습니다."
,
"dashboard"
:
"Dashboard"
,
"dashboardSettings"
:
"Dashboard Settings"
,
"pickup"
:
"Pick up"
,
"communication"
:
"Communication"
,
"workList"
:
"Work list"
,
"profile"
:
"Profile"
,
"account_setting"
:
"Account setting"
,
"newRegistrationTitle"
:
"New Registration"
,
"continousWorkTitle"
:
"Continous Work"
,
"processWorkTitle"
:
"Process work"
,
"reportWarningTitle"
:
"Report With Warning"
,
"workWithWarningsTitle"
:
"Work with warnings"
,
"messageListTitle"
:
"Message List"
,
"sendMessageTitle"
:
"Send Message"
,
"distanceSupportTitle"
:
"DistanceSupport"
,
"chatTitle"
:
"Chat"
,
"makeDashboardAsHome"
:
"Make dashboard your home screen"
,
"btnKeep"
:
"Keep"
}
\ No newline at end of file
abvw/html/dashboard-setting.html
View file @
ca8b685f
<!DOCTYPE html>
<html
lang=
"ja-JP"
>
<head>
<meta
charset=
"utf-8"
>
<title>
ダッシュボード設定
</title>
<meta
name=
"robots"
content=
"index, follow"
>
<meta
name=
"viewport"
content=
"width=device-width,minimum-scale=1,initial-scale=1"
>
<meta
name=
"description"
content=
"A Book Check"
>
<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/header.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/abvw/common/css/appCommon/footer.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/abvw/common/css/appCommon/style.css"
>
<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/constant.js?__UPDATEID__"
></script>
<script
src=
"/abvw/common/js/common.js?__UPDATEID__"
></script>
<script
src=
"/abvw/common/js/footer.js"
></script>
<script
src=
"/abvw/js/dashboardSetting/dashboard-setting.js"
></script>
</head>
<body
id=
"dashboard"
onload=
"DashboardSetting.init();"
>
<header>
<nav
class=
"navbar navbar-dark bg-primary position-fixed fixed-top w-100"
>
<a
href=
"javascript:DashboardSetting.goBack();"
class=
"navbar-brand category-btn lht-0"
>
<i
class=
"fas fa-chevron-left fs-12 p-1"
></i>
<span
class=
"d-none d-md-inline fs-10"
>
戻る
</span>
</a>
<h1
class=
"fs-10 font-weight-bold mb-0 text-white multi-lang"
data-msg=
"dashboardSettingHeaderTitle"
>
ダッシュボード設定
</h1>
<div></div>
</nav>
</header>
<!-- setting -->
<section
class=
"container-fluid main-section"
>
<main>
<h2
class=
"fs-8 font-weight-bold mt-4 pb-2 border-bottom text-dark multi-lang"
data-msg=
"dashboardSettingDisplayHeader"
>
表示切替
</h2>
<div
class=
"setting-table-wrap"
>
<table
id=
"displayItems"
>
<!-- dashboard setting modal -->
<div
class=
"modal fade"
id=
"dashboard-setting-modal"
tabindex=
"-1"
role=
"dialog"
>
<div
class=
"modal-dialog modal-dialog-centered"
role=
"document"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header bg-dark10"
>
<h5
class=
"modal-title lang"
lang=
"dashboardSettings"
></h5>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
>
<span
aria-hidden=
"true"
>
×
</span>
</button>
</div>
<div
class=
"modal-body"
>
<table
class=
"w-100"
id=
"dashboardSettingItems"
>
<colgroup>
<col
span=
"1"
class=
"w-120px"
>
</colgroup>
<tbody>
<!-- <tr>
<th><div class="font-weight-normal text-dark multi-lang" data-msg="dashboardSettingNewRegistrationTitle">新規報告</div></th>
<td>
<div class="toggle"><input type="checkbox" name="chk-new" /></div>
</td>
</tr> -->
<tr>
<th
class=
"fs-9 p-2 text-secondary lang"
lang=
"newRegistrationTitle"
></th>
<td
class=
"p-2"
><div
id=
"settingNewReport"
data-key=
"newReport"
class=
"toggle ml-auto"
><input
type=
"checkbox"
name=
"chk-new"
></div></td>
</tr>
<tr>
<th
class=
"fs-9 p-2 text-secondary lang"
lang=
"processWorkTitle"
></th>
<td
class=
"p-2"
><div
id=
"settingContinousWork"
data-key=
"continousWork"
class=
"toggle ml-auto"
><input
type=
"checkbox"
name=
"chk-proccess"
></div></td>
</tr>
<tr>
<th
class=
"fs-9 p-2 text-secondary lang"
lang=
"workWithWarningsTitle"
></th>
<td
class=
"p-2"
><div
id=
"settingReportWarning"
data-key=
"reportWarning"
class=
"toggle ml-auto"
><input
type=
"checkbox"
name=
"chk-alert"
></div></td>
</tr>
<tr>
<th
class=
"fs-9 p-2 text-secondary lang"
lang=
"makeDashboardAsHome"
></th>
<td
class=
"p-2"
><div
id=
"settingDashboardHome"
data-key=
"dashboardHome"
class=
"toggle ml-auto"
><input
type=
"checkbox"
name=
"chk-home"
></div></td>
</tr>
</tbody>
</table>
</div>
</main>
</section>
<div
id=
"footer"
></div>
</body>
</html>
\ No newline at end of file
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-primary lang"
lang=
"btnKeep"
onclick=
"DashboardSetting.onClickSave();"
></button>
<button
type=
"button"
class=
"btn btn-tertiary lang"
lang=
"dspCancel"
data-dismiss=
"modal"
></button>
</div>
</div>
</div>
</div>
\ No newline at end of file
abvw/html/dashboard.html
View file @
ca8b685f
...
...
@@ -15,7 +15,9 @@
<!-- vender css -->
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../common/css/newdash/fontawesome_relative_path.css"
>
<script
src=
"../common/js/jquery/jquery-3.6.0.min.js"
></script>
<script
type=
"text/javascript"
src=
"/abvw/common/js/jquery/jquery-3.6.0.min.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"/abvw/common/js/jquery/jquery-ui.min.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"/abvw/common/js/web/i18n.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../common/js/newdash/app.js"
></script>
<script
type=
"text/javascript"
src=
"../common/js/newdash/common.js"
></script>
...
...
@@ -24,144 +26,47 @@
<script
type=
"text/javascript"
src=
"../js/dashboardSetting/dashboard-setting.js"
></script>
<script
type=
"text/javascript"
src=
"../js/dashboard/dashboard.js"
></script>
</head>
<body
onload=
"DASHBOARD.init();"
>
<!-- header -->
<
?php include('common/header.html');?
>
<
!-- <?php include('common/header.html');?> --
>
<div
id=
"includedHeader"
></div>
<!-- dashboard -->
<main>
<div
class=
"container"
>
<!-- title -->
<div
class=
"d-flex align-items-center"
>
<h1
class=
"fs-14 font-weight-bold pt-4 pb-3 mb-0 mr-auto
"
>
ダッシュボード
</h1>
<h1
class=
"fs-14 font-weight-bold pt-4 pb-3 mb-0 mr-auto
lang"
lang=
"dashboard"
>
</h1>
<a
href=
"#"
data-toggle=
"modal"
data-target=
"#dashboard-setting-modal"
>
<img
src=
"../common/img/icon_dashboard_setting.svg"
alt=
"ダッシュボード設定"
class=
"p-1 w-40px"
>
</a>
</div>
<!-- sub title -->
<h2
class=
"fs-8 font-weight-bold
"
>
ピックアップ
</h2>
<h2
class=
"fs-8 font-weight-bold
lang"
id=
"#pickupHeader"
lang=
"pickup"
>
</h2>
<!-- card -->
<ul
class=
"dashboard-menu p-0 mt-3 d-grid col-gap-10 grid-col-md-4 grid-col-2"
>
<li
class=
"card mb-2"
>
<a
href=
"pickup.html"
class=
"d-block text-dark text-decoration-none mb-1 p-3 text-center"
>
<div
class=
"bg-lightblue p-2 d-inline-block rounded-circle mb-3"
>
<img
src=
"../common/img/dahboard_icon_new.svg"
alt=
"新規報告"
class=
"img-fluid"
>
</div>
<div
class=
"fs-10"
>
新規報告
</div>
</a>
</li>
<li
class=
"card mb-2 position-relative"
>
<a
href=
"pickup.html"
class=
"d-block text-dark text-decoration-none mb-1 p-3 text-center"
>
<div
class=
"bg-lightblue p-2 d-inline-block rounded-circle mb-3"
>
<img
src=
"../common/img/dahboard_icon_proccess.svg"
alt=
"工程管理"
class=
"img-fluid"
>
</div>
<div
class=
"fs-10"
>
工程管理
</div>
<span
class=
"fs-8 circle-tag-danger"
>
10
</span>
</a>
</li>
<li
class=
"card mb-2"
>
<a
href=
"pickup.html"
class=
"d-block text-dark text-decoration-none mb-1 p-3 text-center"
>
<div
class=
"bg-lightblue p-2 d-inline-block rounded-circle mb-3"
>
<img
src=
"../common/img/dahboard_icon_alert.svg"
alt=
"警告を含む報告"
class=
"img-fluid"
>
</div>
<div
class=
"fs-10"
>
警告を含む報告
</div>
</a>
</li>
<ul
class=
"dashboard-menu p-0 mt-3 d-grid col-gap-10 grid-col-md-4 grid-col-2"
id =
"pickupItems"
>
</ul>
<!-- sub title -->
<h2
class=
"fs-8 font-weight-bold
"
>
コミュニケーション
</h2>
<h2
class=
"fs-8 font-weight-bold
lang"
lang=
"communication"
>
</h2>
<!-- card -->
<ul
class=
"dashboard-menu p-0 mt-3 d-grid col-gap-10 grid-col-md-4 grid-col-2"
>
<li
class=
"card mb-2 position-relative"
>
<a
href=
"message-list.html"
class=
"d-block text-dark text-decoration-none mb-1 p-3 text-center"
>
<div
class=
"bg-lightblue p-2 d-inline-block rounded-circle mb-3"
>
<img
src=
"../common/img/dahboard_icon_message_list.svg"
alt=
"メッセージ一覧"
class=
"img-fluid"
>
</div>
<div
class=
"fs-10"
>
メッセージ一覧
</div>
<span
class=
"fs-8 circle-tag-danger"
>
999+
</span>
</a>
</li>
<li
class=
"card mb-2"
>
<a
href=
"send-message.html"
class=
"d-block text-dark text-decoration-none mb-1 p-3 text-center"
>
<div
class=
"bg-lightblue p-2 d-inline-block rounded-circle mb-3"
>
<img
src=
"../common/img/dahboard_icon_send_message.svg"
alt=
"メッセージ送信"
class=
"img-fluid"
>
</div>
<div
class=
"fs-10"
>
メッセージ送信
</div>
</a>
</li>
<li
class=
"card mb-2"
>
<a
href=
"#"
class=
"d-block text-dark text-decoration-none mb-1 p-3 text-center"
>
<div
class=
"bg-lightblue p-2 d-inline-block rounded-circle mb-3"
>
<img
src=
"../common/img/dahboard_icon_remote.svg"
alt=
"遠隔支援"
class=
"img-fluid"
>
</div>
<div
class=
"fs-10"
>
遠隔支援
</div>
</a>
</li>
<li
class=
"card mb-2"
>
<a
href=
"#"
class=
"d-block text-dark text-decoration-none mb-1 p-3 text-center"
>
<div
class=
"bg-lightblue p-2 d-inline-block rounded-circle mb-3"
>
<img
src=
"../common/img/dahboard_icon_chat.svg"
alt=
"チャット"
class=
"img-fluid"
>
</div>
<div
class=
"fs-10"
>
チャット
</div>
</a>
</li>
<ul
class=
"dashboard-menu p-0 mt-3 d-grid col-gap-10 grid-col-md-4 grid-col-2"
id=
"communicationItems"
>
</ul>
</div>
</main>
<!-- dashboard setting modal -->
<div
class=
"modal fade"
id=
"dashboard-setting-modal"
tabindex=
"-1"
role=
"dialog"
>
<div
class=
"modal-dialog modal-dialog-centered"
role=
"document"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header bg-dark10"
>
<h5
class=
"modal-title multi-lang"
data-msg=
"dashboardSettingHeaderTitle"
>
ダッシュボード設定
</h5>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
>
<span
aria-hidden=
"true"
>
×
</span>
</button>
</div>
<div
class=
"modal-body"
>
<table
class=
"w-100"
id=
"dashboardSettingItems"
>
<colgroup>
<col
span=
"1"
class=
"w-120px"
>
</colgroup>
<tbody>
<tr>
<th
class=
"fs-9 p-2 text-secondary multi-lang"
data-msg=
"dashboardSettingNewReportTitle"
>
新規報告
</th>
<td
class=
"p-2"
><div
id=
"newReport"
class=
"toggle ml-auto"
><input
type=
"checkbox"
name=
"chk-new"
></div></td>
</tr>
<tr>
<th
class=
"fs-9 p-2 text-secondary multi-lang"
data-msg=
"dashboardSettingContinousWorkTitle"
>
工程作業
</th>
<td
class=
"p-2"
><div
id=
"continousWork"
class=
"toggle ml-auto"
><input
type=
"checkbox"
name=
"chk-proccess"
></div></td>
</tr>
<tr>
<th
class=
"fs-9 p-2 text-secondary multi-lang"
data-msg=
"dashboardSettingReportWarningTitle"
>
警告を含む作業
</th>
<td
class=
"p-2"
><div
id=
"reportWarning"
class=
"toggle ml-auto"
><input
type=
"checkbox"
name=
"chk-alert"
></div></td>
</tr>
<tr>
<th
class=
"fs-9 p-2 text-secondary multi-lang"
data-msg=
"dashboardSettingDashboardHomeTitle"
>
ダッシュボードをホーム画面にする
</th>
<td
class=
"p-2"
><div
id=
"dashboardHome"
class=
"toggle ml-auto"
><input
type=
"checkbox"
name=
"chk-home"
></div></td>
</tr>
</tbody>
</table>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-primary multi-lang"
data-msg=
"dashboardSettingSaveButton"
onclick=
"DashboardSetting.onClickSave();"
>
保存
</button>
<button
type=
"button"
class=
"btn btn-tertiary multi-lang"
data-msg=
"dashboardSettingCancelButton"
data-dismiss=
"modal"
>
キャンセル
</button>
</div>
</div>
</div>
</div>
<!-- dashboard setting model -->
<div
id=
"includedDashboardSetting"
></div>
<!-- confirm -->
<
?php include('common/confirm-modal.html');?
>
<
!-- <?php include('common/confirm-modal.html');?> --
>
<div
id=
"includedConfirmModal"
></div>
</body>
</html>
\ No newline at end of file
abvw/html/index.html
View file @
ca8b685f
...
...
@@ -23,7 +23,7 @@
<script
src=
"/abvw/js/operationList/operationList.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/dashboard/
check-
dashboard.js?__UPDATEID__"
></script>
<script
src=
"/abvw/js/dashboard/dashboard.js?__UPDATEID__"
></script>
<script
src=
"/abvw/common/js/footer.js?__UPDATEID__"
></script>
<script
src=
"/abvw/common/js/app.js?__UPDATEID__"
defer
></script>
...
...
abvw/js/dashboard/check-dashboard.js
deleted
100644 → 0
View file @
79ba6233
var
CHK_Dashboard
=
{};
CHK_Dashboard
.
pickupItems
=
[
{
id
:
'newReport'
,
href
:
"javascript:CHK_Dashboard.goPickup('newReport');"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'img/icon_new.svg'
},
msg
:
'newRegistrationTitle'
},
{
id
:
'continousWork'
,
href
:
"javascript:CHK_Dashboard.goPickup('continousWork');"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'img/icon_proccess.svg'
},
msg
:
'continousWorkTitle'
},
{
id
:
'reportWarning'
,
href
:
"javascript:CHK_Dashboard.goPickup('reportWarning');"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'img/icon_alert.svg'
},
msg
:
'reportWarningTitle'
},
];
CHK_Dashboard
.
communicationItems
=
[
{
id
:
'messageList'
,
href
:
"javascript:CHK_Dashboard.goMessageList();"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'img/icon_message_lsit.svg'
},
msg
:
'messageListTitle'
},
{
id
:
'sendMessage'
,
href
:
"javascript:CHK.sendAppCommand('goSendMessage');"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'img/icon_send_message.svg'
},
msg
:
'sendMessageTitle'
},
{
id
:
'distanceSupport'
,
href
:
"javascript:CHK.sendAppCommand('goDistanceSupport');"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'img/icon_remote.svg'
},
msg
:
'distanceSupportTitle'
},
{
id
:
'chat'
,
href
:
"javascript:CHK.sendAppCommand('goChat');"
,
count
:
0
,
enabled
:
false
,
img
:
{
src
:
'img/icon_chat.svg'
},
msg
:
'chatTitle'
},
];
//CHK_Dashboard.pickupItemsに設定した情報をhtmlに表示する
CHK_Dashboard
.
initPickups
=
function
()
{
$
(
"#pickupItems"
).
empty
();
CHK_Dashboard
.
pickupItems
.
forEach
(
function
(
item
)
{
if
(
item
.
enabled
==
true
)
{
var
html
=
CHK_Dashboard
.
initHtmlItem
(
item
);
$
(
"#pickupItems"
).
append
(
html
);
}
});
//pickup empty
if
(
$
(
"#pickupItems"
).
children
().
length
>
0
)
{
$
(
"#pickupHeader"
).
removeClass
(
'd-none'
);
}
else
{
$
(
"#pickupHeader"
).
addClass
(
'd-none'
);
}
}
//CHK_Dashboard.communicationItemsに設定した情報をhtmlに表示する
CHK_Dashboard
.
initCommunications
=
function
()
{
$
(
"#communicationItems"
).
empty
();
CHK_Dashboard
.
communicationItems
.
forEach
(
function
(
item
)
{
if
(
item
.
enabled
==
true
)
{
var
html
=
CHK_Dashboard
.
initHtmlItem
(
item
);
$
(
"#communicationItems"
).
append
(
html
);
}
});
}
//設定されている情報からhtmlを表示する
CHK_Dashboard
.
initHtmlItem
=
function
(
item
)
{
var
countText
=
''
+
item
.
count
;
if
(
item
.
count
>=
100
)
{
countText
=
'99+'
;
}
var
countDClass
=
''
;
if
(
typeof
item
.
count
==
'undefined'
||
item
.
count
<
1
)
{
countDClass
=
' d-none'
;
}
var
countSpan
=
'<span class="count fs-7'
+
countDClass
+
'">'
+
countText
+
'</span>'
;
var
html
=
$
(
'<div class="item" id="'
+
item
.
id
+
'">'
+
'<a href="'
+
item
.
href
+
'" class="d-block text-dark text-decoration-none mb-1 p-3">'
+
'<img src="'
+
item
.
img
.
src
+
'">'
+
'<div class="fs-8 multi-lang" data-msg="'
+
item
.
msg
+
'">'
+
getMsg
(
item
.
msg
)
+
'</div>'
+
countSpan
+
'</a>'
+
'</div>'
);
return
html
;
}
//ダッシュボード画面の初期表示
CHK_Dashboard
.
init
=
function
()
{
CHK_Dashboard
.
updateDataPickups
();
CHK_Dashboard
.
initPickups
();
CHK_Dashboard
.
updateDataCommunications
();
CHK_Dashboard
.
initCommunications
();
}
//変数として設定しているガジェットに初期表示で取得したデータを設定
CHK_Dashboard
.
updateDataPickups
=
function
()
{
CHK_Dashboard
.
pickupItems
.
forEach
(
function
(
item
)
{
let
enabled
=
CHK
.
dashboardSetting
[
item
.
id
];
if
(
enabled
==
true
||
enabled
==
false
)
{
item
.
enabled
=
enabled
;
}
item
.
count
=
0
;
if
(
CHK
.
dashboardBatch
[
item
.
id
])
{
item
.
count
=
CHK
.
dashboardBatch
[
item
.
id
];
}
});
}
//変数として設定しているコミュニケーションに初期表示で取得したデータを設定
CHK_Dashboard
.
updateDataCommunications
=
function
()
{
CHK_Dashboard
.
communicationItems
.
forEach
(
function
(
item
)
{
if
(
item
.
id
==
'messageList'
)
{
item
.
count
=
0
;
if
(
typeof
CHK
.
pushMessageList
!==
'undefined'
)
{
//読んでいないメッセージがあればカウントを +1
CHK
.
pushMessageList
.
forEach
(
function
(
message
)
{
if
(
!
message
.
readingFlg
)
{
item
.
count
+=
1
;
}
});
}
}
else
if
(
item
.
id
==
'chat'
)
{
item
.
enabled
=
CHK
.
isChat
;
}
});
}
//ガジェット画面に移動
CHK_Dashboard
.
goPickup
=
function
(
pickupId
)
{
CHK
.
goUrlWithCurrentParams
(
'pickup.html'
,
{
pickupActive
:
pickupId
});
}
//コミュニケーション画面に移動
CHK_Dashboard
.
goMessageList
=
function
()
{
CHK
.
goUrlWithCurrentParams
(
'message-list.html'
,
{});
}
\ No newline at end of file
abvw/js/dashboard/dashboard.js
View file @
ca8b685f
/**
* Dashboard js in dashboard.html
* @since cms:1.4.3.2&1.4.3.3 web:1.0
*/
var
DASHBOARD
=
{};
// pickup dashboard configuration
DASHBOARD
.
pickupItems
=
[
{
id
:
'newReport'
,
href
:
"javascript:DASHBOARD.goPickup('newReport');"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'
img/
icon_new.svg'
},
msg
:
'newRegistrationTitle'
},
{
id
:
'continousWork'
,
href
:
"javascript:DASHBOARD.goPickup('continousWork');"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'
img/
icon_proccess.svg'
},
msg
:
'continousWorkTitle'
},
{
id
:
'reportWarning'
,
href
:
"javascript:DASHBOARD.goPickup('reportWarning');"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'
img/icon_alert.svg'
},
msg
:
'reportWarningTitle'
},
{
id
:
'newReport'
,
href
:
"javascript:DASHBOARD.goPickup('newReport');"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'
../common/img/dahboard_
icon_new.svg'
},
msg
:
'newRegistrationTitle'
},
{
id
:
'continousWork'
,
href
:
"javascript:DASHBOARD.goPickup('continousWork');"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'
../common/img/dahboard_
icon_proccess.svg'
},
msg
:
'continousWorkTitle'
},
{
id
:
'reportWarning'
,
href
:
"javascript:DASHBOARD.goPickup('reportWarning');"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'
../common/img/dahboard_icon_alert.svg'
},
msg
:
'reportWarningTitle'
},
];
// comunication dashboard configuration
DASHBOARD
.
communicationItems
=
[
{
id
:
'messageList'
,
href
:
"javascript:DASHBOARD.goMessageList();"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'
img/icon_message_lsit.svg'
},
msg
:
'messageListTitle'
},
{
id
:
'sendMessage'
,
href
:
"javascript:DASHBOARD.goSendMessage();"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'
img/icon_send_message.svg'
},
msg
:
'sendMessageTitle'
},
{
id
:
'distanceSupport'
,
href
:
"javascript:DASHBOARD.goDistanceSupport();"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'
img/icon_remote.svg'
},
msg
:
'distanceSupportTitle'
},
{
id
:
'chat'
,
href
:
"javascript:DASHBOARD.goChat();"
,
count
:
0
,
enabled
:
false
,
img
:
{
src
:
'img/icon_chat.svg'
},
msg
:
'chatTitle'
},
{
id
:
'messageList'
,
href
:
"javascript:DASHBOARD.goMessageList();"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'
../common/img/dahboard_icon_message_list.svg'
},
msg
:
'messageListTitle'
},
{
id
:
'sendMessage'
,
href
:
"javascript:DASHBOARD.goSendMessage();"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'
../common/img/dahboard_icon_send_message.svg'
},
msg
:
'sendMessageTitle'
},
{
id
:
'distanceSupport'
,
href
:
"javascript:DASHBOARD.goDistanceSupport();"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'
../common/img/dahboard_icon_remote.svg'
},
msg
:
'distanceSupportTitle'
},
{
id
:
'chat'
,
href
:
"javascript:DASHBOARD.goChat();"
,
count
:
0
,
enabled
:
true
,
img
:
{
src
:
'../common/img/dahboard_icon_chat.svg'
},
msg
:
'chatTitle'
},
];
//CHK_Dashboard.pickupItemsに設定した情報をhtmlに表示する
// Default dashboard setting data
DASHBOARD
.
defaultDashboard
=
{
newReport
:
0
,
continousWork
:
0
,
reportWarning
:
0
,
pushMesage
:
0
,
}
DASHBOARD
.
baseApiUrl
=
CONSTANT
.
URL
.
CMS
.
BASE
+
ClientData
.
userInfo_accountPath
()
+
CONSTANT
.
URL
.
CMS
.
API
.
BASE
+
'topScreen/'
;
DASHBOARD
.
getDataApiUrl
=
DashboardSetting
.
baseApiUrl
+
'getAllData'
;
// Call api get data
DASHBOARD
.
getDashboardData
=
function
(
callback
)
{
let
param
=
{
sid
:
COMMON
.
getSid
(),
};
COMMON
.
cmsAjax
(
DASHBOARD
.
getDataApiUrl
,
param
,
false
,
function
(
json
)
{
if
(
callback
)
{
callback
(
json
);
}
},
function
()
{
console
.
log
(
'DASHBOARD.getData error'
);
if
(
callback
)
{
callback
(
DASHBOARD
.
defaultDashboard
);
}
});
};
//Initialization dashboard pickup items html
DASHBOARD
.
initPickups
=
function
()
{
$
(
"#pickupItems"
).
empty
();
DASHBOARD
.
pickupItems
.
forEach
(
function
(
item
)
{
if
(
item
.
enabled
==
true
)
{
if
(
item
.
enabled
==
true
)
{
var
html
=
DASHBOARD
.
initHtmlItem
(
item
);
$
(
"#pickupItems"
).
append
(
html
);
}
...
...
@@ -29,85 +65,102 @@ DASHBOARD.initPickups = function() {
}
}
//
CHK_Dashboard.communicationItemsに設定した情報をhtmlに表示する
//
Initialization dashboard communication items html
DASHBOARD
.
initCommunications
=
function
()
{
$
(
"#communicationItems"
).
empty
();
DASHBOARD
.
communicationItems
.
forEach
(
function
(
item
)
{
if
(
item
.
enabled
==
true
)
{
var
html
=
DASHBOARD
.
initHtmlItem
(
item
);
const
html
=
DASHBOARD
.
initHtmlItem
(
item
);
$
(
"#communicationItems"
).
append
(
html
);
}
});
}
//
設定されている情報からhtmlを表示する
//
Initialization dashboard items html
DASHBOARD
.
initHtmlItem
=
function
(
item
)
{
var
countText
=
''
+
item
.
count
;
let
countText
=
''
+
item
.
count
;
if
(
item
.
count
>=
100
)
{
countText
=
'99+'
;
}
var
countDClass
=
''
;
if
(
typeof
item
.
count
==
'undefined'
||
item
.
count
<
1
)
{
countDClass
=
' d-none'
;
let
countDClass
=
''
;
let
countSpan
=
''
if
(
typeof
item
.
count
!=
'undefined'
&&
item
.
count
>
0
)
{
countDClass
=
' '
;
countSpan
=
'<span class="fs-8 circle-tag-danger'
+
countDClass
+
'">'
+
countText
+
'</span>'
;
}
var
countSpan
=
'<span class="count fs-7'
+
countDClass
+
'">'
+
countText
+
'</span>'
;
var
html
=
$
(
'<div class="item" id="'
+
item
.
id
+
'
">'
+
'<
a href="'
+
item
.
href
+
'" class="d-block text-dark text-decoration-none mb-1 p
-3">'
+
'<img src="'
+
item
.
img
.
src
+
'">'
+
'<div class="fs-
8 multi-lang" data-msg="'
+
item
.
msg
+
'">'
+
getMsg
(
item
.
msg
)
+
'</div>'
let
html
=
$
(
'<li class="card mb-2 position-relative" id="'
+
item
.
id
+
'">'
+
'<a href="'
+
item
.
href
+
'" class="d-block text-dark text-decoration-none mb-1 p-3 text-center
">'
+
'<
div class="bg-lightblue p-2 d-inline-block rounded-circle mb
-3">'
+
'<img src="'
+
item
.
img
.
src
+
'"
alt="'
+
I18N
.
i18nText
(
item
.
msg
)
+
'" class="img-fluid"> </div
>'
+
'<div class="fs-
10 lang" lang="'
+
item
.
msg
+
'">'
+
I18N
.
i18nText
(
item
.
msg
)
+
'</div>'
+
countSpan
+
'</a>'
+
'</
div
>'
);
+
'</
li
>'
);
return
html
;
}
//
ダッシュボード画面の初期表示
//
Initialization dashboard screen
DASHBOARD
.
init
=
function
()
{
DASHBOARD
.
updateDataPickups
();
DASHBOARD
.
loadCommon
();
DashboardSetting
.
getSettingData
(
function
(
settings
)
{
DASHBOARD
.
getDashboardData
(
function
(
dataDashboard
)
{
DASHBOARD
.
updateDataPickups
(
settings
,
dataDashboard
);
DASHBOARD
.
initPickups
();
DASHBOARD
.
updateDataCommunications
(
);
DASHBOARD
.
updateDataCommunications
(
dataDashboard
);
DASHBOARD
.
initCommunications
();
});
});
}
// load common data
DASHBOARD
.
loadCommon
=
function
()
{
$
(
"#includedHeader"
).
load
(
"../common/header.html"
,
function
()
{
I18N
.
initi18n
();
});
$
(
"#includedDashboardSetting"
).
load
(
"dashboard-setting.html"
,
function
()
{
DashboardSetting
.
init
();
I18N
.
initi18n
();
});
$
(
"#includedConfirmModal"
).
load
(
"../common/confirm-modal.html"
,
function
()
{
I18N
.
initi18n
();
});
}
//
変数として設定しているガジェットに初期表示で取得したデータを設定
DASHBOARD
.
updateDataPickups
=
function
()
{
//
Update pickup config from setting dashboard data
DASHBOARD
.
updateDataPickups
=
function
(
settings
,
dataDashboard
)
{
DASHBOARD
.
pickupItems
.
forEach
(
function
(
item
)
{
let
enabled
=
CHK
.
dashboardSetting
[
item
.
id
];
const
enabled
=
settings
[
item
.
id
];
if
(
enabled
==
true
||
enabled
==
false
)
{
item
.
enabled
=
enabled
;
}
item
.
count
=
0
;
if
(
CHK
.
dashboardBatch
[
item
.
id
])
{
item
.
count
=
CHK
.
dashboardBatch
[
item
.
id
];
if
(
dataDashboard
[
item
.
id
])
{
item
.
count
=
dataDashboard
[
item
.
id
];
}
});
}
//
変数として設定しているコミュニケーションに初期表示で取得したデータを設定
DASHBOARD
.
updateDataCommunications
=
function
()
{
//
Update communication setting from dashboard data
DASHBOARD
.
updateDataCommunications
=
function
(
dataDashboard
)
{
DASHBOARD
.
communicationItems
.
forEach
(
function
(
item
)
{
if
(
item
.
id
==
'messageList'
)
{
item
.
count
=
0
;
if
(
typeof
CHK
.
pushMessageList
!==
'undefined'
)
{
//読んでいないメッセージがあればカウントを +1
CHK
.
pushMessageList
.
forEach
(
function
(
message
)
{
if
(
!
message
.
readingFlg
)
{
item
.
count
+=
1
;
}
});
if
(
dataDashboard
[
'pushMesage'
])
{
item
.
count
=
dataDashboard
[
'pushMesage'
];
}
}
else
if
(
item
.
id
==
'chat'
)
{
item
.
enabled
=
CHK
.
isChat
;
}
// else if (item.id == 'chat') {
// item.enabled = CHK.isChat;
// }
});
}
//
ガジェット画面に移動
//
Direct to pickup screen
DASHBOARD
.
goPickup
=
function
(
pickupId
)
{
C
HK
.
goUrlWithCurrentParams
(
'pickup.html'
,
{
pickupActive
:
pickupId
});
C
OMMON
.
goUrlWithCurrentParams
(
'pickup.html'
,
{
pickupActive
:
pickupId
});
}
//
コミュニケーション画面に移動
//
Direct to Message list screen
DASHBOARD
.
goMessageList
=
function
()
{
C
HK
.
goUrlWithCurrentParams
(
'message-list.html'
,
{});
C
OMMON
.
goUrlWithCurrentParams
(
'message-list.html'
,
{});
}
abvw/js/dashboardSetting/dashboard-setting.js
View file @
ca8b685f
/**
* Dashboard Setting js in dashboard.html
*
* @since 1.0 check web
*/
var
DashboardSetting
=
{};
DashboardSetting
.
elementItems
=
[
{
id
:
'newReport'
,
name
:
'chk-new'
,
enabled
:
true
},
{
id
:
'continousWork'
,
name
:
'chk-proccess'
,
enabled
:
true
},
{
id
:
'reportWarning'
,
name
:
'chk-alert'
,
enabled
:
true
},
{
id
:
'dashboardHome'
,
name
:
'chk-home'
,
enabled
:
false
},
];
//setting html elements, map with json key from setting data API
DashboardSetting
.
elementItems
=
{
newReport
:
{
id
:
'settingNewReport'
,
name
:
'chk-new'
,
enabled
:
true
},
continousWork
:
{
id
:
'settingContinousWork'
,
name
:
'chk-proccess'
,
enabled
:
true
},
reportWarning
:
{
id
:
'settingReportWarning'
,
name
:
'chk-alert'
,
enabled
:
true
},
dashboardHome
:
{
id
:
'settingDashboardHome'
,
name
:
'chk-home'
,
enabled
:
false
},
};
DashboardSetting
.
baseApiUrl
=
CONSTANT
.
URL
.
CMS
.
BASE
+
ClientData
.
userInfo_accountPath
()
+
CONSTANT
.
URL
.
CMS
.
API
.
BASE
+
'dashboardSetting/'
;
DashboardSetting
.
saveSettingApiUrl
=
DashboardSetting
.
baseApiUrl
+
'saveSetting'
;
DashboardSetting
.
getSettingApiUrl
=
DashboardSetting
.
baseApiUrl
+
'getAllSettingData'
;
DashboardSetting
.
d
ummy
SettingJson
=
{
DashboardSetting
.
d
efault
SettingJson
=
{
newReport
:
1
,
continousWork
:
1
,
reportWarning
:
1
,
...
...
@@ -21,60 +26,70 @@ DashboardSetting.getSettingData = function (callback) {
let
param
=
{
sid
:
COMMON
.
getSid
(),
};
COMMON
.
cmsAjax
(
DashboardSetting
.
getSettingApiUrl
,
param
,
false
,
function
(
json
)
{
const
url
=
DashboardSetting
.
baseApiUrl
+
'getAllSettingData'
;
COMMON
.
cmsAjax
(
url
,
param
,
false
,
function
(
json
)
{
if
(
callback
)
{
callback
(
json
);
}
},
function
()
{
console
.
log
(
'DashboardSetting.getSettingData error'
);
if
(
callback
)
{
callback
(
DashboardSetting
.
defaultSettingJson
);
}
});
};
DashboardSetting
.
applySettings
=
function
(
settings
)
{
DashboardSetting
.
elementItems
.
forEach
(
function
(
item
)
{
let
enabled
=
settings
[
item
.
id
];
if
(
typeof
enabled
!==
'undefined'
)
{
item
.
enabled
=
enabled
;
let
itemElement
=
$
(
'#'
+
item
.
id
);
if
(
item
.
enabled
)
{
itemElement
.
addClass
(
'checked'
);
for
(
const
key
in
settings
)
{
const
enabled
=
settings
[
key
];
if
(
DashboardSetting
.
elementItems
.
hasOwnProperty
(
key
))
{
//apply enabled, disabled setting
let
elementItem
=
DashboardSetting
.
elementItems
[
key
];
elementItem
.
enabled
=
enabled
;
let
element
=
$
(
'#'
+
elementItem
.
id
);
if
(
element
)
{
if
(
enabled
)
{
element
.
addClass
(
'checked'
);
}
else
{
itemElement
.
removeClass
(
'checked'
);
element
.
removeClass
(
'checked'
);
}
}
}
}
});
};
//CHK_DashboardSetting.displayItemsに設定を書き込む
DashboardSetting
.
saveSetting
=
function
(
key
,
enabled
)
{
DashboardSetting
.
elementItems
.
forEach
(
function
(
item
)
{
if
(
item
.
id
==
key
)
{
item
.
enabled
=
enabled
;
}
});
DashboardSetting
.
saveSetting
=
function
()
{
let
param
=
{};
param
.
sid
=
COMMON
.
getSid
();
param
[
key
]
=
enabled
;
COMMON
.
cmsAjax
(
DashboardSetting
.
saveSettingApiUrl
,
param
,
false
,
function
(
json
)
{
for
(
const
key
in
DashboardSetting
.
elementItems
)
{
const
element
=
DashboardSetting
.
elementItems
[
key
];
param
[
key
]
=
element
.
enabled
;
}
const
url
=
DashboardSetting
.
baseApiUrl
+
'saveSetting'
;
COMMON
.
cmsAjax
(
url
,
param
,
false
,
function
(
json
)
{
DashboardSetting
.
closeModal
();
},
function
()
{
console
.
log
(
'DashboardSetting.saveSetting error'
);
DashboardSetting
.
closeModal
();
});
};
//設定画面でクリックされてた時の処理
//
//handle click on/off of setting item
DashboardSetting
.
bindToggleClick
=
function
()
{
$
(
'.toggle'
).
on
(
'click'
,
function
()
{
$
(
this
).
toggleClass
(
'checked'
);
// var id = $(this).attr('id');
// var enabled = false;
// if ($(this).hasClass('checked')) {
// enabled = true;
// }
// DashboardSetting.saveSetting(id, enabled);
const
key
=
$
(
this
).
attr
(
'data-key'
);
let
enabled
=
false
;
if
(
$
(
this
).
hasClass
(
'checked'
))
{
enabled
=
true
;
}
if
(
DashboardSetting
.
elementItems
.
hasOwnProperty
(
key
))
{
let
elementItem
=
DashboardSetting
.
elementItems
[
key
];
elementItem
.
enabled
=
enabled
;
}
});
};
//設定画面の初期処理
DashboardSetting
.
init
=
function
()
{
DashboardSetting
.
getSettingData
(
function
(
settings
)
{
DashboardSetting
.
applySettings
(
settings
);
...
...
@@ -83,5 +98,9 @@ DashboardSetting.init = function () {
};
DashboardSetting
.
onClickSave
=
function
()
{
console
.
log
(
"DashboardSetting.save"
);
DashboardSetting
.
saveSetting
();
};
DashboardSetting
.
closeModal
=
function
()
{
$
(
'#dashboard-setting-modal .close'
).
click
();
};
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