Commit 0a9ab603 by Kang Donghun

Merge branch 'feature/1.0_check_web_dev' into feature/1.0_check_web_dev_kdh_2

# Conflicts:
#	abweb/js/reportList/reportList.js
#	abweb/js/template/template.js
parents d2c8d0c8 7ead4d21
<div class="modal fade" id="category-modal" tabindex="-1" role="dialog">
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable overflow-auto" role="document">
<div class="modal-content">
<div class="modal-header bg-dark10">
<h5 class="modal-title lang" lang="categorySelection"></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<ul class="list-menu" id="categoryListMenu">
<!-- <ul>
<li>
<label>
<input type="radio" name="category" checked>
<span class="lang" lang="categoryAll"></span>
</label>
</li>
</ul>
<li class="accordion" id="accordion1">
<div id="heading1">
<a href="#" class="list-menu-link">
<button type="button" class="collapsed" data-toggle="collapse" data-target="#collapse1" aria-expanded="true" aria-controls="collapse1">
<div class="arrow-icon"></div>
</button>
<label>
<input type="radio" name="category">
<span class="lang" lang="">全社</span>
</label>
</a>
</div>
<div id="collapse1" class="collapse" aria-labelledby="heading1" data-parent="#accordion1">
<ul>
<li>
<label>
<input type="radio" name="category">
<span>カテゴリー</span>
</label>
</li>
<li>
<label>
<input type="radio" name="category">
<span>カテゴリー</span>
</label>
</li>
<li class="accordion" id="accordion1-1">
<div id="heading1-1">
<a href="#" class="list-menu-link">
<button type="button" class="collapsed" data-toggle="collapse" data-target="#collapse1-1" aria-expanded="true" aria-controls="collapse1-1">
<div class="arrow-icon"></div>
</button>
<label>
<input type="radio" name="category">
<span>カテゴリー</span>
</label>
</a>
</div>
<div id="collapse1-1" class="collapse" aria-labelledby="heading1-1" data-parent="#accordion1-1">
<ul>
<li class="accordion" id="accordion1-2">
<div id="heading1-2">
<a href="#" class="list-menu-link">
<button type="button" class="collapsed" data-toggle="collapse" data-target="#collapse1-2" aria-expanded="true" aria-controls="collapse1-2">
<div class="arrow-icon"></div>
</button>
<label>
<input type="radio" name="category">
<span>カテゴリー</span>
</label>
</a>
</div>
<div id="collapse1-2" class="collapse" aria-labelledby="heading1-2" data-parent="#accordion1-2">
<ul>
<li class="accordion" id="accordion1-3">
<div id="heading1-3">
<a href="#" class="list-menu-link">
<button type="button" class="collapsed" data-toggle="collapse" data-target="#collapse1-3" aria-expanded="true" aria-controls="collapse1-3">
<div class="arrow-icon"></div>
</button>
<label>
<input type="radio" name="category">
<span>カテゴリー</span>
</label>
</a>
</div>
</li>
</ul>
</div>
</li>
</ul>
</div>
</li>
</ul>
</div>
</li> -->
</ul>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary lang" lang="selection" onclick="OL.onClickCategorySelection();"></button>
<button type="button" class="btn btn-tertiary lang" lang="dspCancel" data-dismiss="modal"></button>
</div>
</div>
</div>
</div>
...@@ -11038,7 +11038,7 @@ ul.card-list > li:not(.selected):not(.not-found):hover{ ...@@ -11038,7 +11038,7 @@ ul.card-list > li:not(.selected):not(.not-found):hover{
} }
.select-card-list .arrow-icon { .select-card-list .arrow-icon {
background-image: url("../img/icon_arrow_down.svg"); background-image: url("/abweb/common/img/icon_arrow_down.svg");
background-size: contain; background-size: contain;
background-repeat: no-repeat; background-repeat: no-repeat;
width: 14px; width: 14px;
...@@ -20590,7 +20590,7 @@ button { ...@@ -20590,7 +20590,7 @@ button {
list-style: none; list-style: none;
} }
.list-menu button .arrow-icon{ .list-menu button .arrow-icon{
background-image: url("../img/icon_arrow_right.svg"); background-image: url("/abweb/common/img/icon_arrow_right.svg");
background-size: contain; background-size: contain;
width: 17px; width: 17px;
height: 17px; height: 17px;
...@@ -20689,7 +20689,7 @@ button { ...@@ -20689,7 +20689,7 @@ button {
.type-icon .report:before{ .type-icon .report:before{
content: ''; content: '';
background-image: url("../img/type_icon_report.svg"); background-image: url("/abweb/common/img/type_icon_report.svg");
background-size: contain; background-size: contain;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
...@@ -20699,7 +20699,7 @@ button { ...@@ -20699,7 +20699,7 @@ button {
} }
.type-icon .questionary:before{ .type-icon .questionary:before{
content: ''; content: '';
background-image: url("../img/type_icon_questionary.svg"); background-image: url("/abweb/common/img/type_icon_questionary.svg");
background-size: contain; background-size: contain;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
...@@ -20709,7 +20709,7 @@ button { ...@@ -20709,7 +20709,7 @@ button {
} }
.type-icon .inspection:before{ .type-icon .inspection:before{
content: ''; content: '';
background-image: url("../img/type_icon_inspection.svg"); background-image: url("/abweb/common/img/type_icon_inspection.svg");
background-size: contain; background-size: contain;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
...@@ -20719,7 +20719,7 @@ button { ...@@ -20719,7 +20719,7 @@ button {
} }
.type-icon .proccess:before{ .type-icon .proccess:before{
content: ''; content: '';
background-image: url("../img/type_icon_proccess.svg"); background-image: url("/abweb/common/img/type_icon_proccess.svg");
background-size: contain; background-size: contain;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
......
<?xml version="1.0" encoding="UTF-8"?><svg id="_レイヤー_2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 119.14 125"><defs><style>.cls-1{fill:#a5d6a7;}</style></defs><g id="_レイヤー_1-2"><g><path class="cls-1" d="M48.17,121.12H9.29c-2.48,0-4.65-.93-6.5-2.79-1.86-1.86-2.79-4.03-2.79-6.5V21.68c0-2.48,.8-4.65,2.4-6.5,1.6-1.86,2.97-2.79,4.1-2.79h31.29c.72-3.61,2.5-6.58,5.34-8.91C45.97,1.16,49.25,0,52.97,0c3.72,0,7,1.16,9.83,3.48,2.84,2.32,4.62,5.29,5.34,8.91h31.29c2.48,0,4.65,.93,6.5,2.79,1.86,1.86,2.79,4.03,2.79,6.5v31.44h-9.29V21.68h-16.42v10.84c0,2.58-.9,4.78-2.71,6.58-1.81,1.81-4,2.71-6.58,2.71H35c-2.58,0-4.78-.9-6.58-2.71-1.81-1.81-2.71-4-2.71-6.58v-10.84H9.29V111.82H48.17v9.29Zm-13.4-55.34l16.51-16.51c.45-.45,.98-.67,1.59-.64,.61,.03,1.14,.27,1.59,.72s.68,1,.68,1.63-.23,1.17-.68,1.63l-18.1,18.1c-.45,.45-.98,.68-1.59,.68s-1.14-.23-1.59-.68l-8.94-8.94c-.45-.45-.67-1-.64-1.63,.03-.63,.27-1.17,.72-1.63,.45-.45,1-.68,1.63-.68,.63,0,1.17,.23,1.63,.68l7.2,7.27Zm0,26l16.51-16.51c.45-.45,.98-.67,1.59-.64,.61,.03,1.14,.27,1.59,.72s.68,1,.68,1.63-.23,1.17-.68,1.63l-18.1,18.1c-.45,.45-.98,.68-1.59,.68s-1.14-.23-1.59-.68l-8.94-8.94c-.45-.45-.67-1-.64-1.63,.03-.63,.27-1.17,.72-1.63,.45-.45,1-.68,1.63-.68,.63,0,1.17,.23,1.63,.68l7.2,7.27ZM55.76,21.06c1.76,0,3.23-.59,4.41-1.78,1.19-1.19,1.78-2.66,1.78-4.41s-.59-3.23-1.78-4.41c-1.19-1.19-2.66-1.78-4.41-1.78s-3.23,.59-4.41,1.78c-1.19,1.19-1.78,2.66-1.78,4.41s.59,3.23,1.78,4.41c1.19,1.19,2.66,1.78,4.41,1.78Z"/><g><path class="cls-1" d="M113.09,82.66l-11.61-11.61,4.74-4.74c.87-.87,2.02-1.31,3.43-1.31s2.56,.44,3.43,1.31l4.74,4.74c.87,.87,1.31,2.02,1.31,3.43s-.44,2.56-1.31,3.43l-4.74,4.74Z"/><path class="cls-1" d="M59.14,122.55v-7.19c0-.65,.11-1.25,.33-1.8,.22-.54,.6-1.09,1.14-1.63l33.84-33.84,11.61,11.61-33.84,33.84c-.54,.54-1.09,.93-1.63,1.14-.54,.22-1.14,.33-1.8,.33h-7.19c-.65,0-1.23-.25-1.72-.74-.49-.49-.74-1.06-.74-1.72Z"/></g></g></g></svg>
\ No newline at end of file
...@@ -19,7 +19,7 @@ CONSTANT.SORT_TYPE = { ...@@ -19,7 +19,7 @@ CONSTANT.SORT_TYPE = {
CONSTANT.PAGE_NAME = { CONSTANT.PAGE_NAME = {
DASHBOARD: 'dashboard', DASHBOARD: 'dashboard',
OPERATION_LIST: 'operationList', OPERATION_LIST: 'operationList',
FOOTER: 'main-footer.html', FOOTER: 'mainFooter.html',
DEFAULT: 'index.html', DEFAULT: 'index.html',
LOGIN: './login.html', LOGIN: './login.html',
}; };
......
...@@ -12,31 +12,30 @@ ...@@ -12,31 +12,30 @@
DashboardSetting.getSettingData(function (settings) { DashboardSetting.getSettingData(function (settings) {
if(settings.dashboardHome == 1) if(settings.dashboardHome == 1)
{ {
HEADER.goDashboard(); sessionStorage.activeHomePage = CONSTANT.PAGE_NAME.DASHBOARD;
HEADER.goDashboard();
} }
else else
{ {
HEADER.goOperationList(); sessionStorage.activeHomePage = CONSTANT.PAGE_TAB.OPERATION_LIST;
} HEADER.goOperationList();
}
}); });
} }
/** /**
* Go page of operationList * Go page of operationList
*/ */
HEADER.goOperationList = function () { HEADER.goOperationList = function () {
$('#footer').load(CONSTANT.PAGE_NAME.FOOTER, function () { OL.init();
sessionStorage.activeTab = CONSTANT.PAGE_TAB.OPERATION_LIST;
HEADER.activeInitBottomNav('operationListBottomNav');
TOP.showPage(CONSTANT.PAGE_NAME.OPERATION_LIST);
});
}; };
/** /**
* Go page of dashboard * Go page of dashboard
*/ */
HEADER.goDashboard = function () { HEADER.goDashboard = function () {
sessionStorage.activeHomePage = CONSTANT.PAGE_NAME.DASHBOARD;
COMMON.avwScreenMove("dashboard.html"); COMMON.avwScreenMove("dashboard.html");
}; };
...@@ -83,4 +82,4 @@ ...@@ -83,4 +82,4 @@
if (img && img.getAttribute('data-src')) { if (img && img.getAttribute('data-src')) {
img.src = img.getAttribute('data-src'); img.src = img.getAttribute('data-src');
} }
}; };
\ No newline at end of file
...@@ -98,6 +98,22 @@ ...@@ -98,6 +98,22 @@
"templateSelection":"Template selection", "templateSelection":"Template selection",
"logo":"logo", "logo":"logo",
"listDisplay":"List display", "listDisplay":"List display",
"gridDisplay":"Grid display" "gridDisplay":"Grid display",
"operationListSearchPlacehoder":"Operation Name",
"searchIcon":"Search Icon",
"category":"Category",
"term":"Term",
"searchClear":"Search Clear",
"calendar":"Calendar",
"startDate":"Start Date",
"endDate":"End Date",
"sortBy":"Sort By",
"sortByName":"Name",
"sortByStartDate":"Start Date",
"sortByEndDate":"End Date",
"sortByLastEdit":"Last Edit",
"categorySelection":"Category Selection",
"categoryAll":"All",
"reportForm": "Report",
"periodicInspectionPeriod": "Periodic Inspection Period"
} }
\ No newline at end of file
...@@ -96,5 +96,22 @@ ...@@ -96,5 +96,22 @@
"templateSelection":"テンプレート選択", "templateSelection":"テンプレート選択",
"logo":"ロゴ", "logo":"ロゴ",
"listDisplay":"リスト表示", "listDisplay":"リスト表示",
"gridDisplay":"グリッド表示" "gridDisplay":"グリッド表示",
"operationListSearchPlacehoder":"作業名",
"searchIcon":"検索アイコン",
"category":"カテゴリー",
"term":"期間",
"searchClear":"検索条件をクリア",
"calendar":"カレンダー",
"startDate":"開始日",
"endDate":"終了日",
"sortBy":"並び替え",
"sortByName":"作業名順",
"sortByStartDate":"新しい順",
"sortByEndDate":"古い順",
"sortByLastEdit":"閲覧日順",
"categorySelection":"カテゴリー選択",
"categoryAll":"すべて",
"reportForm": "報告",
"periodicInspectionPeriod": "定期点検期間"
} }
\ No newline at end of file
...@@ -95,5 +95,22 @@ ...@@ -95,5 +95,22 @@
"templateSelection":"Template selection", "templateSelection":"Template selection",
"logo":"logo", "logo":"logo",
"listDisplay":"list display", "listDisplay":"list display",
"gridDisplay":"Grid display" "gridDisplay":"Grid display",
"operationListSearchPlacehoder":"Operation Name",
"searchIcon":"Search Icon",
"category":"Category",
"term":"Term",
"searchClear":"Search Clear",
"calendar":"Calendar",
"startDate":"Start Date",
"endDate":"End Date",
"sortBy":"Sort By",
"sortByName":"Name",
"sortByStartDate":"Start Date",
"sortByEndDate":"End Date",
"sortByLastEdit":"Last Edit",
"categorySelection":"Category Selection",
"categoryAll":"All",
"reportForm": "보고서",
"periodicInspectionPeriod": "정기점검기간"
} }
\ No newline at end of file
<header> <header>
<nav class="navbar navbar-dark shadow-sm px-sm-auto px-0"> <nav class="navbar navbar-dark shadow-sm px-sm-auto px-0">
<div class="container-wrap"> <div class="container-wrap">
...@@ -5,14 +6,14 @@ ...@@ -5,14 +6,14 @@
<img src="../common/img/logo.svg" type="image" alt="" class="img-fluid lang" lang="logo"> <img src="../common/img/logo.svg" type="image" alt="" class="img-fluid lang" lang="logo">
</a> </a>
<ul class="mr-sm-auto ml-sm-0 ml-auto mb-0 pl-0 d-flex"> <ul class="mr-sm-auto ml-sm-0 ml-auto mb-0 pl-0 d-flex">
<li class="active nav-link"> <li class="active nav-link" id="iconHomeDashboard">
<a href="dashboard.html" class="d-block text-center text-decoration-none"> <a href="dashboard.html" class="d-block text-center text-decoration-none">
<img src="../common/img/nav_icon_dashboard.svg" type="image" alt="" class="p-sm-1 p-0 img-fluid lang" lang="dashboard"> <img src="../common/img/nav_icon_dashboard.svg" type="image" alt="" class="p-sm-1 p-0 img-fluid lang" lang="dashboard">
<div class="fs-7 d-sm-block d-none lang" lang="dashboard"></div> <div class="fs-7 d-sm-block d-none lang" lang="dashboard"></div>
</a> </a>
</li> </li>
<li class="nav-link"> <li class="nav-link" id="iconHomeWorkList">
<a href="task-list.html" class="d-block text-center text-decoration-none"> <a href="index.html" class="d-block text-center text-decoration-none">
<img src="../common/img/nav_icon_task.svg" type="image" alt="" class="p-sm-1 p-0 img-fluid lang" lang="workList"> <img src="../common/img/nav_icon_task.svg" type="image" alt="" class="p-sm-1 p-0 img-fluid lang" lang="workList">
<div class="fs-7 d-sm-block d-none lang" lang="workList"></div> <div class="fs-7 d-sm-block d-none lang" lang="workList"></div>
</a> </a>
...@@ -29,7 +30,7 @@ ...@@ -29,7 +30,7 @@
<img src="../common/img/menu_icon_account_setting.svg" type="image" alt="" class="navbar-dropdown-icon lang" lang="account_setting"> <img src="../common/img/menu_icon_account_setting.svg" type="image" alt="" class="navbar-dropdown-icon lang" lang="account_setting">
<span class="lang" style=" color: #6c757d;" lang="account_setting"></span> <span class="lang" style=" color: #6c757d;" lang="account_setting"></span>
</a> </a>
<a class="dropdown-item " href="#" data-toggle="modal" data-target="#confirm-modal" id="btnLogout"> <a class="dropdown-item " href="login.html" id="btnLogout">
<img src="../common/img/menu_icon_logout.svg" type="image" alt="" class="navbar-dropdown-icon lang" lang="dspLogout"> <img src="../common/img/menu_icon_logout.svg" type="image" alt="" class="navbar-dropdown-icon lang" lang="dspLogout">
<span class="lang" style=" color: #6c757d;" lang="dspLogout"></span> <span class="lang" style=" color: #6c757d;" lang="dspLogout"></span>
</a> </a>
...@@ -38,3 +39,4 @@ ...@@ -38,3 +39,4 @@
</div> </div>
</nav> </nav>
</header> </header>
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<script src="../common/js/common.js?__UPDATEID__"></script> <script src="../common/js/common.js?__UPDATEID__"></script>
<script type="text/javascript" src="../js/header/header.js"></script> <script type="text/javascript" src="../js/header/header.js"></script>
<script type="text/javascript" src="../js/dashboardSetting/dashboard-setting.js"></script> <script type="text/javascript" src="../js/dashboardSetting/dashboardSetting.js"></script>
<script type="text/javascript" src="../js/template/template.js"></script> <script type="text/javascript" src="../js/template/template.js"></script>
<script type="text/javascript" src="../js/dashboard/dashboard.js"></script> <script type="text/javascript" src="../js/dashboard/dashboard.js"></script>
<script src="https://cdn.jsdelivr.net/npm/gasparesganga-jquery-loading-overlay@2.1.7/dist/loadingoverlay.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/gasparesganga-jquery-loading-overlay@2.1.7/dist/loadingoverlay.min.js"></script>
...@@ -36,13 +36,13 @@ ...@@ -36,13 +36,13 @@
</head> </head>
<body> <body>
<!-- header -->
<div id="includedHeader"></div>
<div id="includedMainTitle"></div>
<!-- dashboard --> <!-- dashboard -->
<main> <main>
<div class="container-wrap"> <div class="container-wrap">
<!-- header -->
<div id="includedHeader"></div>
<div id="includedMainTitle"></div>
<!-- sub title --> <!-- sub title -->
<h2 class="fs-8 font-weight-bold lang" id="#pickupHeader" lang="pickup"></h2> <h2 class="fs-8 font-weight-bold lang" id="#pickupHeader" lang="pickup"></h2>
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<!-- main js --> <!-- main js -->
<script type="text/javascript" src="../js/operationList/operationList.js?__UPDATEID__"></script> <script type="text/javascript" src="../js/operationList/operationList.js?__UPDATEID__"></script>
<script type="text/javascript" src="../js/dashboardSetting/dashboard-setting.js"></script> <script type="text/javascript" src="../js/dashboardSetting/dashboardSetting.js"></script>
<script type="text/javascript" src="../js/dashboard/dashboard.js"></script> <script type="text/javascript" src="../js/dashboard/dashboard.js"></script>
<script type="text/javascript" src="../js/header/header.js?__UPDATEID__"></script> <script type="text/javascript" src="../js/header/header.js?__UPDATEID__"></script>
<script type="text/javascript" src="../js/template/template.js"></script> <script type="text/javascript" src="../js/template/template.js"></script>
...@@ -44,13 +44,13 @@ ...@@ -44,13 +44,13 @@
</head> </head>
<body > <body >
<!-- header -->
<div id="includedHeader"></div>
<div id="includedMainTitle"></div>
<!-- pickup --> <!-- pickup -->
<main> <main>
<div class="container-wrap"> <div class="container-wrap">
<!-- header -->
<div id="includedHeader"></div>
<div id="includedMainTitle"></div>
<!-- tab --> <!-- tab -->
<ul class="nav nav-tabs line" id="myTab" role="tablist"> <ul class="nav nav-tabs line" id="myTab" role="tablist">
<li class="nav-item" id="liTabNewReport"> <li class="nav-item" id="liTabNewReport">
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<script type="text/javascript" src="../js/header/header.js?__UPDATEID__"></script> <script type="text/javascript" src="../js/header/header.js?__UPDATEID__"></script>
<script type="text/javascript" src="../js/template/template.js"></script> <script type="text/javascript" src="../js/template/template.js"></script>
<script type="text/javascript" src="../js/pushMessageDetail/push-message-detail.js"></script> <script type="text/javascript" src="../js/pushMessageDetail/pushMessageDetail.js"></script>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function(){ $(document).ready(function(){
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<script type="text/javascript" src="../js/header/header.js?__UPDATEID__"></script> <script type="text/javascript" src="../js/header/header.js?__UPDATEID__"></script>
<script type="text/javascript" src="../js/template/template.js"></script> <script type="text/javascript" src="../js/template/template.js"></script>
<script type="text/javascript" src="../js/pushMessageList/push-message-list.js"></script> <script type="text/javascript" src="../js/pushMessageList/pushMessageList.js"></script>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function(){ $(document).ready(function(){
...@@ -37,12 +37,13 @@ ...@@ -37,12 +37,13 @@
<body> <body>
<!-- header -->
<div id="includedHeader"></div>
<div id="includedMainTitle"></div>
<!-- message list --> <!-- message list -->
<main> <main>
<div class="container-wrap"> <div class="container-wrap">
<!-- header -->
<div id="includedHeader"></div>
<div id="includedMainTitle"></div>
<!-- message --> <!-- message -->
<ul class="card-list message-list p-0" id="messageList"> <ul class="card-list message-list p-0" id="messageList">
<li class="card mb-2 not-found d-none"> <li class="card mb-2 not-found d-none">
......
<!DOCTYPE html>
<html lang="ja-JP">
<head>
<meta charset="utf-8">
<title class="lang" lang="reportForm"></title>
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<!-- favicons -->
<link href="../common/img/favicon.ico" rel="icon">
<link href="../common/img/apple-touch-icon.png" rel="apple-touch-icon">
<!-- main css -->
<link rel="stylesheet" type="text/css" href="../common/css/appCommon/app.css">
<link rel="stylesheet" type="text/css" href="../common/css/appCommon/header.css">
<link rel="stylesheet" type="text/css" href="../common/css/appCommon/style.css">
<!-- vender css -->
<link rel="stylesheet" type="text/css" href="../common/css/appCommon/fontawesome_relative_path.css">
<script type="text/javascript" src="../common/js/jquery/jquery-3.6.0.min.js?__UPDATEID__"></script>
<script type="text/javascript" src="../common/js/jquery/jquery-ui.min.js?__UPDATEID__"></script>
<script type="text/javascript" src="../common/js/web/i18n.js?__UPDATEID__"></script>
<script type="text/javascript" src="../common/js/constant.js?__UPDATEID__"></script>
<script type="text/javascript" src="../common/js/common.js?__UPDATEID__"></script>
<script type="text/javascript" src="../js/header/header.js?__UPDATEID__"></script>
<script src="https://cdn.jsdelivr.net/npm/gasparesganga-jquery-loading-overlay@2.1.7/dist/loadingoverlay.min.js"></script>
</head>
<body onload="RF.init();">
<!-- header -->
<div id="includedHeader"></div>
<!-- report list -->
<main>
<div class="container-wrap">
<!-- breadcrumb -->
<nav aria-label="breadcrumb">
<ol class="breadcrumb px-0 mb-0">
<li class="breadcrumb-item"><a href="task-list.html" class="text-decoration-none text-underline">作業一覧</a></li>
<li class="breadcrumb-item active" aria-current="page"><span>報告一覧</span></li>
<li class="breadcrumb-item active" aria-current="page"><span>報告</span></li>
</ol>
</nav>
<!-- title -->
<div class="d-flex align-items-center">
<h1 class="fs-14 font-weight-bold pt-sm-4 pt-2 pb-3 mb-0 mr-auto" lang="reportForm"></h1>
<div style="display: none;">
<div><span style="font-size:18px;" lang="periodicInspectionPeriod"></span></div>
<div><span id="inspectDate"></span></div>
</div>
<div class="quickReportBtn" id="quickReportBtn" onclick="submitForm();">
<img src="../common/img/icon_pdf.svg" alt="pdf出力" class="p-1 w-40px" data-toggle="tooltip" data-placement="bottom" title="pdfPrint">
</div>
</div>
</div>
</main>
<div class="mb-5" id="report-form"></div>
<!-- confirm -->
<div id="includedConfirmModal"></div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script type="text/javascript" src="../common/js/newdash/app.js?__UPDATEID__"></script>
<script type="text/javascript" src="../common/js/newdash/common.js?__UPDATEID__"></script>
</body>
</html>
\ No newline at end of file
...@@ -25,10 +25,10 @@ ...@@ -25,10 +25,10 @@
<script src="../common/js/constant.js?__UPDATEID__"></script> <script src="../common/js/constant.js?__UPDATEID__"></script>
<script src="../common/js/common.js?__UPDATEID__"></script> <script src="../common/js/common.js?__UPDATEID__"></script>
<script type="text/javascript" src="../js/operationSelect/operation-select.js"></script> <script type="text/javascript" src="../js/operationSelect/operationSelect.js"></script>
<script type="text/javascript" src="../js/notification-content/notification-content.js"></script> <script type="text/javascript" src="../js/notificationContent/notificationContent.js"></script>
<script type="text/javascript" src="../js/template/template.js"></script> <script type="text/javascript" src="../js/template/template.js"></script>
<script type="text/javascript" src="../js/sendMessage/send-message.js"></script> <script type="text/javascript" src="../js/sendMessage/sendMessage.js"></script>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function(){ $(document).ready(function(){
...@@ -39,12 +39,13 @@ ...@@ -39,12 +39,13 @@
<body> <body>
<!-- header -->
<div id="includedHeader"></div>
<div id="includedMainTitle"></div>
<!-- send message --> <!-- send message -->
<main> <main>
<div class="container-wrap"> <div class="container-wrap">
<!-- header -->
<div id="includedHeader"></div>
<div id="includedMainTitle"></div>
<!-- content --> <!-- content -->
<div class="py-2"> <div class="py-2">
<div class="row"> <div class="row">
......
...@@ -121,6 +121,10 @@ DASHBOARD.initHtmlItem = function (item) { ...@@ -121,6 +121,10 @@ DASHBOARD.initHtmlItem = function (item) {
/** Initialization dashboard screen */ /** Initialization dashboard screen */
DASHBOARD.init = function () { DASHBOARD.init = function () {
//Check if user is logged in
COMMON.checkAuth(false);
sessionStorage.activeHomePage = CONSTANT.PAGE_TAB.DASHBOARD;
DASHBOARD.loadCommon(); DASHBOARD.loadCommon();
DashboardSetting.getSettingData(function (settings) { DashboardSetting.getSettingData(function (settings) {
DASHBOARD.getDashboardData(function (dataDashboard) { DASHBOARD.getDashboardData(function (dataDashboard) {
...@@ -173,14 +177,14 @@ DASHBOARD.goPickup = function (pickupId) { ...@@ -173,14 +177,14 @@ DASHBOARD.goPickup = function (pickupId) {
/** Direct to Message list screen */ /** Direct to Message list screen */
DASHBOARD.goMessageList = function () { DASHBOARD.goMessageList = function () {
COMMON.goUrlWithCurrentParams('push-message-list.html', {}); COMMON.goUrlWithCurrentParams('pushMessageList.html', {});
}; };
/** /**
* Direct to send message screen * Direct to send message screen
*/ */
DASHBOARD.goSendMessage = function () { DASHBOARD.goSendMessage = function () {
COMMON.goUrlWithCurrentParams('send-message.html', {}); COMMON.goUrlWithCurrentParams('sendMessage.html', {});
}; };
/** /**
......
/** /**
* Dashboard Setting js in dashboard.html * Dashboard Setting js in dashboard.html
* *
* @since 1.0 check web * @since cms:1.4.3.2&1.4.3.3 web:1.0
*/ */
var DashboardSetting = {}; var DashboardSetting = {};
DashboardSetting.changeSettingCallback = function() {}; DashboardSetting.changeSettingCallback = function () {};
/** /**
* Html element array, map with json key from setting data API * Html element array, map with json key from setting data API
...@@ -27,33 +27,33 @@ DashboardSetting.defaultSetting = { ...@@ -27,33 +27,33 @@ DashboardSetting.defaultSetting = {
continousWork: 1, continousWork: 1,
warningReport: 1, warningReport: 1,
dashboardHome: 0, dashboardHome: 0,
} };
/** dummy setting json reponse */ /** dummy setting json reponse */
DashboardSetting.dummySettingJson = { DashboardSetting.dummySettingJson = {
dashboardSettingList: [ dashboardSettingList: [
{ {
"id": 1, id: 1,
"settingName": "New Report", settingName: 'New Report',
"settingValue": 1 settingValue: 1,
}, },
{ {
"id": 2, id: 2,
"settingName": "Continous Work", settingName: 'Continous Work',
"settingValue": 1 settingValue: 1,
}, },
{ {
"id": 3, id: 3,
"settingName": "Warning Report", settingName: 'Warning Report',
"settingValue": 1 settingValue: 1,
}, },
{ {
"id": 4, id: 4,
"settingName": "Dashboard Home", settingName: 'Dashboard Home',
"settingValue": 0 settingValue: 0,
} },
], ],
} };
/** /**
* get setting data from cms * get setting data from cms
...@@ -64,34 +64,40 @@ DashboardSetting.getSettingData = function (callback) { ...@@ -64,34 +64,40 @@ DashboardSetting.getSettingData = function (callback) {
sid: COMMON.getSid(), sid: COMMON.getSid(),
}; };
const url = DashboardSetting.baseApiUrl; const url = DashboardSetting.baseApiUrl;
COMMON.cmsAjax(url, param, false, function (json) { COMMON.cmsAjax(
let settings = {}; url,
//map id with key when save setting param,
const mapKeys = { false,
1: 'newReport', function (json) {
2: 'continousWork', let settings = {};
3: 'warningReport', //map id with key when save setting
4: 'dashboardHome' const mapKeys = {
}; 1: 'newReport',
if (json && json.dashboardSettingList) { 2: 'continousWork',
for (const item of json.dashboardSettingList) { 3: 'warningReport',
if (mapKeys.hasOwnProperty(item.id)) { 4: 'dashboardHome',
const settingKey = mapKeys[item.id]; };
settings[settingKey] = item.settingValue; if (json && json.dashboardSettingList) {
for (const item of json.dashboardSettingList) {
if (mapKeys.hasOwnProperty(item.id)) {
const settingKey = mapKeys[item.id];
settings[settingKey] = item.settingValue;
}
} }
} }
} if (callback) {
if (callback) { callback(settings);
callback(settings); }
} },
}, function() { function () {
console.log('DashboardSetting.getSettingData error'); console.log('DashboardSetting.getSettingData error');
}); },
);
}; };
/** /**
* apply settings to screen * apply settings to screen
* @param {JSON} settings * @param {JSON} settings
*/ */
DashboardSetting.applySettings = function (settings) { DashboardSetting.applySettings = function (settings) {
for (const key in settings) { for (const key in settings) {
...@@ -123,15 +129,21 @@ DashboardSetting.saveSetting = function () { ...@@ -123,15 +129,21 @@ DashboardSetting.saveSetting = function () {
param[key] = element.enabled ? 1 : 0; param[key] = element.enabled ? 1 : 0;
} }
const url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.API.SAVE_DASHBOARD_SETTING; const url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.API.SAVE_DASHBOARD_SETTING;
COMMON.cmsAjax(url, param, false, function (json) { COMMON.cmsAjax(
DashboardSetting.closeModal(); url,
if (DashboardSetting.changeSettingCallback && typeof DashboardSetting.changeSettingCallback === 'function') { param,
DashboardSetting.changeSettingCallback(); false,
} function (json) {
}, function() { DashboardSetting.closeModal();
console.log('DashboardSetting.saveSetting error'); if (DashboardSetting.changeSettingCallback && typeof DashboardSetting.changeSettingCallback === 'function') {
DashboardSetting.closeModal(); DashboardSetting.changeSettingCallback();
}); }
},
function () {
console.log('DashboardSetting.saveSetting error');
DashboardSetting.closeModal();
},
);
}; };
/** /**
......
/** /**
* Operation Select js in operation-select.html * Operation Select js in operationSelect.html
* *
* @since 1.0 check web * @since cms:1.4.3.2&1.4.3.3 web:1.0
*/ */
var NotificationSelect = {}; var NotificationSelect = {};
NotificationSelect.nameSelected=""; NotificationSelect.nameSelected = '';
NotificationSelect.valueSelected=""; NotificationSelect.valueSelected = '';
/** /**
* default operation select data JSON * default operation select data JSON
*/ */
...@@ -14,23 +14,29 @@ NotificationSelect.defaultNotificationSelectJson = []; ...@@ -14,23 +14,29 @@ NotificationSelect.defaultNotificationSelectJson = [];
/** /**
* get operation select data from cms * get operation select data from cms
* @param {function} callback * @param {function} callback
*/ */
NotificationSelect.getNotificationSelectData = function (callback) { NotificationSelect.getNotificationSelectData = function (callback) {
let param = { let param = {
sid: COMMON.getSid(), sid: COMMON.getSid(),
}; };
const url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.API.PUSH_MESSAGE_TEMPLATE; const url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.API.PUSH_MESSAGE_TEMPLATE;
COMMON.cmsAjax(url, param, false, function (json) { COMMON.cmsAjax(
if (callback) { url,
callback(json); param,
} false,
}, function() { function (json) {
console.log('NotificationSelect.getNotificationSelectData error'); if (callback) {
if (callback) { callback(json);
callback(NotificationSelect.defaultNotificationSelectJson); }
} },
}); function () {
console.log('NotificationSelect.getNotificationSelectData error');
if (callback) {
callback(NotificationSelect.defaultNotificationSelectJson);
}
},
);
}; };
/** /**
...@@ -48,7 +54,7 @@ NotificationSelect.selectOperationClick = function () { ...@@ -48,7 +54,7 @@ NotificationSelect.selectOperationClick = function () {
/** /**
* init data, action when screen onload * init data, action when screen onload
*/ */
NotificationSelect.init = function (selectedCallback) { NotificationSelect.init = function (selectedCallback) {
NotificationSelect.getNotificationSelectData(function (data) { NotificationSelect.getNotificationSelectData(function (data) {
if (typeof data === 'undefined' || data == null) return; if (typeof data === 'undefined' || data == null) return;
NotificationSelect.createNotificationSelectList(data.pushMessageTemplate); NotificationSelect.createNotificationSelectList(data.pushMessageTemplate);
...@@ -59,57 +65,59 @@ NotificationSelect.selectOperationClick = function () { ...@@ -59,57 +65,59 @@ NotificationSelect.selectOperationClick = function () {
/** /**
* Implement notification select html * Implement notification select html
* @returns * @returns
*/ */
NotificationSelect.createNotificationSelectList = function(pushMessageTemplate) { NotificationSelect.createNotificationSelectList = function (pushMessageTemplate) {
$("#notificationSelectList").empty(); $('#notificationSelectList').empty();
if (typeof pushMessageTemplate === 'undefined' || pushMessageTemplate.length < 1) return; if (typeof pushMessageTemplate === 'undefined' || pushMessageTemplate.length < 1) return;
let classSelected = "selected"; let classSelected = 'selected';
for (let i = 0; i < pushMessageTemplate.length; i++) { for (let i = 0; i < pushMessageTemplate.length; i++) {
let divName = $("<div class='pl-5 py-3 h-100 w-100 align-self-center select-label'>" + pushMessageTemplate[i].name + '</div>');
let divName = $("<div class='pl-5 py-3 h-100 w-100 align-self-center select-label'>" + pushMessageTemplate[i].name + "</div>"); let divIcon = $(
let divIcon = $("<div class='flex-shrink-1 mx-3 align-self-center'>" "<div class='flex-shrink-1 mx-3 align-self-center'>" +
+ "<button class='btn btn-link border collapsed' type='button' data-toggle='collapse' data-target='#collapse" + i + "' aria-expanded='true' aria-controls='collapse" + i + "'>" "<button class='btn btn-link border collapsed' type='button' data-toggle='collapse' data-target='#collapse" +
+ "<div class='arrow-icon'></div>" i +
+ "</button></div>"); "' aria-expanded='true' aria-controls='collapse" +
i +
"'>" +
"<div class='arrow-icon'></div>" +
'</button></div>',
);
let ahrefName = $("<a href='#' class='d-flex text-decoration-none'></a>"); let ahrefName = $("<a href='#' class='d-flex text-decoration-none'></a>");
let divParentName = $("<div class='card mb-2 " + classSelected + "' id='heading" + i + "'></div>"); let divParentName = $("<div class='card mb-2 " + classSelected + "' id='heading" + i + "'></div>");
classSelected = ""; classSelected = '';
let divValue = $("<div id='collapse" + i + "' class='collapse' aria-labelledby='heading" + i + "' data-parent='#accordion" + i + "'></div>"); let divValue = $("<div id='collapse" + i + "' class='collapse' aria-labelledby='heading" + i + "' data-parent='#accordion" + i + "'></div>");
let divBodyValue = $("<div class='card-body'>" + pushMessageTemplate[i].value + "</div>"); let divBodyValue = $("<div class='card-body'>" + pushMessageTemplate[i].value + '</div>');
let messageli = $("<li class='accordion' id='accordion" + i + "'></li>"); let messageli = $("<li class='accordion' id='accordion" + i + "'></li>");
ahrefName.append(divName); ahrefName.append(divName);
ahrefName.append(divIcon); ahrefName.append(divIcon);
divParentName.append(ahrefName); divParentName.append(ahrefName);
divValue.append(divBodyValue); divValue.append(divBodyValue);
messageli.append(divParentName); messageli.append(divParentName);
messageli.append(divValue); messageli.append(divValue);
if(i == 0) if (i == 0) {
{
NotificationSelect.nameSelected = pushMessageTemplate[i].name; NotificationSelect.nameSelected = pushMessageTemplate[i].name;
NotificationSelect.valueSelected = pushMessageTemplate[i].value; NotificationSelect.valueSelected = pushMessageTemplate[i].value;
} }
$("#notificationSelectList").append(messageli); $('#notificationSelectList').append(messageli);
} }
} };
/** /**
* handle click event of select button * handle click event of select button
*/ */
NotificationSelect.onClickTempalte = function () { NotificationSelect.onClickTempalte = function () {
NotificationSelect.chooseTemplate(); NotificationSelect.chooseTemplate();
}; };
/** /**
* Get operation select and call back function in main page * Get operation select and call back function in main page
*/ */
NotificationSelect.chooseTemplate = function () { NotificationSelect.chooseTemplate = function () {
let param = {}; let param = {};
param.nameSelected = NotificationSelect.nameSelected; param.nameSelected = NotificationSelect.nameSelected;
param.valueSelected = NotificationSelect.valueSelected; param.valueSelected = NotificationSelect.valueSelected;
...@@ -122,6 +130,6 @@ NotificationSelect.selectOperationClick = function () { ...@@ -122,6 +130,6 @@ NotificationSelect.selectOperationClick = function () {
/** /**
* close setting dialog * close setting dialog
*/ */
NotificationSelect.closeModal = function () { NotificationSelect.closeModal = function () {
$('#select-template-modal .close').click(); $('#select-template-modal .close').click();
}; };
\ No newline at end of file
/** /**
* Operation Select js in operation-select.html * Operation Select js in operationSelect.html
* *
* @since 1.0 check web * @since cms:1.4.3.2&1.4.3.3 web:1.0
*/ */
var OperationSelect = {}; var OperationSelect = {};
OperationSelect.changeSelectCallback = function() {}; OperationSelect.changeSelectCallback = function () {};
OperationSelect.operationIdSelected=""; OperationSelect.operationIdSelected = '';
OperationSelect.operationNameSelected=""; OperationSelect.operationNameSelected = '';
/** /**
* default operation select data JSON * default operation select data JSON
...@@ -16,23 +16,29 @@ OperationSelect.defaultOperationSelectJson = []; ...@@ -16,23 +16,29 @@ OperationSelect.defaultOperationSelectJson = [];
/** /**
* get operation select data from cms * get operation select data from cms
* @param {function} callback * @param {function} callback
*/ */
OperationSelect.getOperationSelectData = function (callback) { OperationSelect.getOperationSelectData = function (callback) {
let param = { let param = {
sid: COMMON.getSid(), sid: COMMON.getSid(),
}; };
const url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.API.OPERATION_SELECT; const url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.API.OPERATION_SELECT;
COMMON.cmsAjax(url, param, false, function (json) { COMMON.cmsAjax(
if (callback) { url,
callback(json); param,
} false,
}, function() { function (json) {
console.log('OperationSelect.getOperationSelectData error'); if (callback) {
if (callback) { callback(json);
callback(OperationSelect.defaultOperationSelectJson); }
} },
}); function () {
console.log('OperationSelect.getOperationSelectData error');
if (callback) {
callback(OperationSelect.defaultOperationSelectJson);
}
},
);
}; };
/** /**
...@@ -61,50 +67,49 @@ OperationSelect.init = function (selectedCallback) { ...@@ -61,50 +67,49 @@ OperationSelect.init = function (selectedCallback) {
/** /**
* Implement operation select html * Implement operation select html
* @returns * @returns
*/ */
OperationSelect.createOperationSelectList = function(operationList) { OperationSelect.createOperationSelectList = function (operationList) {
$("#operationSelectList").empty(); $('#operationSelectList').empty();
if (typeof operationList === 'undefined' || operationList.length < 1) return; if (typeof operationList === 'undefined' || operationList.length < 1) return;
for (let i = 0; i < operationList.length; i++) { for (let i = 0; i < operationList.length; i++) {
let messageli = $("<li class='card mb-2' name = 'operationId_" + operationList[i].operationId + "' ></li>");
let messageli = $("<li class='card mb-2' name = 'operationId_" + operationList[i].operationId + "' ></li>"); let ahrefRequiredFlg = $(
let ahrefRequiredFlg = $("<a href='#' class='d-block px-5 py-3 text-decoration-none select-label' data-key='" + operationList[i].operationId + "' data-name='" + operationList[i].operationName + "' ></a>"); "<a href='#' class='d-block px-5 py-3 text-decoration-none select-label' data-key='" + operationList[i].operationId + "' data-name='" + operationList[i].operationName + "' ></a>",
let divText = $("<div class='fs-12 text-truncate d-block'>"+ operationList[i].operationName + "</div>"); );
let divText = $("<div class='fs-12 text-truncate d-block'>" + operationList[i].operationName + '</div>');
ahrefRequiredFlg.append(divText);
messageli.append(ahrefRequiredFlg);
$("#operationSelectList").append(messageli); ahrefRequiredFlg.append(divText);
} messageli.append(ahrefRequiredFlg);
$("#operationSelectList :first-child").addClass("selected");
}
$('#operationSelectList').append(messageli);
}
$('#operationSelectList :first-child').addClass('selected');
};
/** /**
* handle click event of select button * handle click event of select button
*/ */
OperationSelect.onClickSelect = function () { OperationSelect.onClickSelect = function () {
OperationSelect.chooseOperationSelect(); OperationSelect.chooseOperationSelect();
}; };
/** /**
* Get operation select and call back function in main page * Get operation select and call back function in main page
*/ */
OperationSelect.chooseOperationSelect = function () { OperationSelect.chooseOperationSelect = function () {
let param = {}; let param = {};
param.operationIdSelected = OperationSelect.operationIdSelected; param.operationIdSelected = OperationSelect.operationIdSelected;
param.operationNameSelected = OperationSelect.operationNameSelected; param.operationNameSelected = OperationSelect.operationNameSelected;
OperationSelect.closeModal(); OperationSelect.closeModal();
if (OperationSelect.changeSelectCallback && typeof OperationSelect.changeSelectCallback === 'function') { if (OperationSelect.changeSelectCallback && typeof OperationSelect.changeSelectCallback === 'function') {
OperationSelect.changeSelectCallback(param.operationIdSelected,param.operationNameSelected ); OperationSelect.changeSelectCallback(param.operationIdSelected, param.operationNameSelected);
} }
}; };
/** /**
* close setting dialog * close setting dialog
*/ */
OperationSelect.closeModal = function () { OperationSelect.closeModal = function () {
$('#task-list-modal .close').click(); $('#task-list-modal .close').click();
}; };
\ No newline at end of file
// PDF PRINT function js /**
* PDF PRINT function js
*
* @since cms:1.4.3.2&1.4.3.3 web:1.0
**/
var PP = {}; var PP = {};
PP.init = function() { PP.init = function () {
console.log("PP.init"); //Check if user is logged in
COMMON.checkAuth(false);
console.log('PP.init');
PP.loadCommon(); PP.loadCommon();
PP.initPdfList(); PP.initPdfList();
}; };
PP.loadCommon = function() { PP.loadCommon = function () {
$("#includedHeader").load("../html/common/header.html" , function() { $('#includedHeader').load('../html/common/header.html', function () {
I18N.initi18n(); I18N.initi18n();
HEADER.init(); HEADER.init();
}); });
$("#includedConfirmModal").load("../html/common/confirm-modal.html", function() { $('#includedConfirmModal').load('../html/common/confirmModal.html', function () {
I18N.initi18n(); I18N.initi18n();
}); });
} };
PP.initPdfList = function() { PP.initPdfList = function () {
if (sessionStorage.OL_operationId) { if (sessionStorage.OL_operationId) {
let params = {}; let params = {};
params.sid = COMMON.getSid(); params.sid = COMMON.getSid();
params.operationId = sessionStorage.OL_operationId; params.operationId = sessionStorage.OL_operationId;
params.returnUrl = CONSTANT.URL.WEB.BASE + CONSTANT.URL.WEB.OPERATION_LIST; params.returnUrl = CONSTANT.URL.WEB.BASE + CONSTANT.URL.WEB.OPERATION_LIST;
let url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.HTML.BASE + CONSTANT.URL.CMS.HTML.QUICK_REPORT_PRINT; let url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.HTML.BASE + CONSTANT.URL.CMS.HTML.QUICK_REPORT_PRINT;
$("#pdfPrint").load(url, params); $('#pdfPrint').load(url, params);
} else { } else {
COMMON.displayAlert("error"); COMMON.displayAlert('error');
COMMON.avwScreenMove("reportList.html"); COMMON.avwScreenMove('reportList.html');
} }
} };
\ No newline at end of file
/**
* js for pushing detailed messages
* @since cms:1.4.3.2&1.4.3.3 web:1.0
*/
var PushMessageDetail = {}; var PushMessageDetail = {};
PushMessageDetail.baseApiUrl = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.API.PUSH_MESSAGE_DETAIL; PushMessageDetail.baseApiUrl = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.API.PUSH_MESSAGE_DETAIL;
...@@ -7,18 +12,20 @@ PushMessageDetail.baseApiUrl = COMMON.format(ClientData.conf_checkApiUrl(), Clie ...@@ -7,18 +12,20 @@ PushMessageDetail.baseApiUrl = COMMON.format(ClientData.conf_checkApiUrl(), Clie
*/ */
PushMessageDetail.dummyMessageDetailJson = { PushMessageDetail.dummyMessageDetailJson = {
pushMessageId: 1, pushMessageId: 1,
pushMessage: "内容が入ります。内容が入ります。内容が入ります。内容が入ります。", pushMessage: '内容が入ります。内容が入ります。内容が入ります。内容が入ります。',
pushSendDate: "2022/07/06 14:14", pushSendDate: '2022/07/06 14:14',
operationName: "絞り検索", operationName: '絞り検索',
pushSendLoginId: "agentec" pushSendLoginId: 'agentec',
} };
/** /**
* init when html loaded * init when html loaded
*/ */
PushMessageDetail.init = function() { PushMessageDetail.init = function () {
//Check if user is logged in
COMMON.checkAuth(false);
//load common html //load common html
TEMPLATE.loadHearder("#includedHeader"); TEMPLATE.loadHearder('#includedHeader');
const navs = [ const navs = [
{ {
titleLang: 'dashboard', titleLang: 'dashboard',
...@@ -26,50 +33,56 @@ PushMessageDetail.init = function() { ...@@ -26,50 +33,56 @@ PushMessageDetail.init = function() {
}, },
{ {
titleLang: 'messageListTitle', titleLang: 'messageListTitle',
href: 'push-message-list.html', href: 'pushMessageList.html',
}, },
{ {
titleLang: 'messageDetail', titleLang: 'messageDetail',
}, },
]; ];
TEMPLATE.loadMainNavsTitle("#includedMainTitle", "messageDetail", navs, null); TEMPLATE.loadMainNavsTitle('#includedMainTitle', 'messageDetail', navs, null);
//request message detail data //request message detail data
let urlParam = COMMON.getUrlParameter(); let urlParam = COMMON.getUrlParameter();
if (typeof urlParam !== 'object' || typeof urlParam.pushMessageId === 'undefined') { if (typeof urlParam !== 'object' || typeof urlParam.pushMessageId === 'undefined') {
return; return;
} }
PushMessageDetail.getMessageDetail(urlParam.pushMessageId, function(message) { PushMessageDetail.getMessageDetail(urlParam.pushMessageId, function (message) {
PushMessageDetail.showMessage(message); PushMessageDetail.showMessage(message);
}); });
} };
/** /**
* request message data * request message data
* @param {string} pushMessageId * @param {string} pushMessageId
* @param {object} callback * @param {object} callback
*/ */
PushMessageDetail.getMessageDetail = function(pushMessageId, callback) { PushMessageDetail.getMessageDetail = function (pushMessageId, callback) {
let param = { let param = {
sid: COMMON.getSid(), sid: COMMON.getSid(),
pushMessageId: pushMessageId pushMessageId: pushMessageId,
}; };
const url = PushMessageDetail.baseApiUrl; const url = PushMessageDetail.baseApiUrl;
COMMON.cmsAjax(url, param, true, function (json) { COMMON.cmsAjax(
if (callback && json && json.pushMessage) { url,
callback(json.pushMessage); param,
} true,
}, function() { function (json) {
console.log('PushMessageDetail.getMessageDetail error'); if (callback && json && json.pushMessage) {
}); callback(json.pushMessage);
} }
},
function () {
console.log('PushMessageDetail.getMessageDetail error');
},
);
};
/** /**
* Show message data * Show message data
* @param {object} message * @param {object} message
*/ */
PushMessageDetail.showMessage = function(message) { PushMessageDetail.showMessage = function (message) {
$('#content').text(message.pushMessage); $('#content').text(message.pushMessage);
$('#sendDate').text(message.pushSendDate); $('#sendDate').text(message.pushSendDate);
$('#operationName').text(message.operationName); $('#operationName').text(message.operationName);
$('#sender').text(message.pushSendLoginId); $('#sender').text(message.pushSendLoginId);
} };
/** /**
* Push Message List JS in push-message-list.html * Push Message List JS in pushMessageList.html
* @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 PushMessageList = {}; var PushMessageList = {};
...@@ -8,8 +8,10 @@ PushMessageList.baseApiUrl = COMMON.format(ClientData.conf_checkApiUrl(), Client ...@@ -8,8 +8,10 @@ PushMessageList.baseApiUrl = COMMON.format(ClientData.conf_checkApiUrl(), Client
/** /**
* Init when html onload * Init when html onload
*/ */
PushMessageList.init = function() { PushMessageList.init = function () {
TEMPLATE.loadHearder("#includedHeader"); //Check if user is logged in
COMMON.checkAuth(false);
TEMPLATE.loadHearder('#includedHeader');
const navs = [ const navs = [
{ {
titleLang: 'dashboard', titleLang: 'dashboard',
...@@ -19,44 +21,50 @@ PushMessageList.init = function() { ...@@ -19,44 +21,50 @@ PushMessageList.init = function() {
titleLang: 'messageListTitle', titleLang: 'messageListTitle',
}, },
]; ];
TEMPLATE.loadMainNavsTitle("#includedMainTitle", "messageListTitle", navs, null); TEMPLATE.loadMainNavsTitle('#includedMainTitle', 'messageListTitle', navs, null);
PushMessageList.getMessageList(function(messageList) { PushMessageList.getMessageList(function (messageList) {
PushMessageList.generateMessageListHtml(messageList.pushMessageList); PushMessageList.generateMessageListHtml(messageList.pushMessageList);
}); });
} };
/** /**
* get Message List from CMS * get Message List from CMS
* @param {function} callback * @param {function} callback
*/ */
PushMessageList.getMessageList = function (callback) { PushMessageList.getMessageList = function (callback) {
let param = { let param = {
sid: COMMON.getSid(), sid: COMMON.getSid(),
}; };
const url = PushMessageList.baseApiUrl; const url = PushMessageList.baseApiUrl;
COMMON.cmsAjax(url, param, true, function (json) { COMMON.cmsAjax(
if (callback) { url,
callback(json); param,
} true,
}, function() { function (json) {
console.log('PushMessageList.getMessageList error'); if (callback) {
}); callback(json);
}
},
function () {
console.log('PushMessageList.getMessageList error');
},
);
}; };
/** /**
* handle click message event * handle click message event
* @param {string} pushMessageId * @param {string} pushMessageId
*/ */
PushMessageList.clickMessage = function(pushMessageId) { PushMessageList.clickMessage = function (pushMessageId) {
COMMON.goUrlWithCurrentParams('push-message-detail.html', {pushMessageId: pushMessageId}); COMMON.goUrlWithCurrentParams('pushMessageDetail.html', { pushMessageId: pushMessageId });
} };
/** /**
* generate message list html * generate message list html
* @param {array} messageList * @param {array} messageList
* @returns * @returns
*/ */
PushMessageList.generateMessageListHtml = function(messageList) { PushMessageList.generateMessageListHtml = function (messageList) {
if (typeof messageList === 'undefined' || messageList.length < 1) { if (typeof messageList === 'undefined' || messageList.length < 1) {
//show not found //show not found
$('#messageList .not-found').removeClass('d-none'); $('#messageList .not-found').removeClass('d-none');
...@@ -69,42 +77,45 @@ PushMessageList.generateMessageListHtml = function(messageList) { ...@@ -69,42 +77,45 @@ PushMessageList.generateMessageListHtml = function(messageList) {
var mTitle = message.pushMessage; var mTitle = message.pushMessage;
var mDate = message.pushSendDate; var mDate = message.pushSendDate;
var mSubtitle = message.operationName; var mSubtitle = message.operationName;
var messageLi = $('<li class="card mb-2" id="pushMessageId_' + messageId + '"/>'); var messageLi = $('<li class="card mb-2" id="pushMessageId_' + messageId + '"/>');
if (message.readingFlg) { if (message.readingFlg) {
messageLi.addClass('read'); messageLi.addClass('read');
} else { } else {
messageLi.addClass('unread'); messageLi.addClass('unread');
} }
var messageA = $('<a class="d-block px-3 py-2 text-decoration-none text-dark"/>'); var messageA = $('<a class="d-block px-3 py-2 text-decoration-none text-dark"/>');
messageA.attr('href', "javascript:PushMessageList.clickMessage('" + messageId +"');"); messageA.attr('href', "javascript:PushMessageList.clickMessage('" + messageId + "');");
var titleDiv = $('<div class="fs-12 text-truncate">' + mTitle + '</div>'); var titleDiv = $('<div class="fs-12 text-truncate">' + mTitle + '</div>');
var subTitleMainDiv = $('<div class="d-flex justify-content-between align-items-center"></div>'); var subTitleMainDiv = $('<div class="d-flex justify-content-between align-items-center"></div>');
var subTitleDiv = $('<div class="fs-10 text-truncate">' + mSubtitle + '</div>'); var subTitleDiv = $('<div class="fs-10 text-truncate">' + mSubtitle + '</div>');
var dateDiv = $('<div class="fs-8 text-secondary text-nowrap">' + mDate + '</div>'); var dateDiv = $('<div class="fs-8 text-secondary text-nowrap">' + mDate + '</div>');
subTitleMainDiv.append(subTitleDiv); subTitleMainDiv.append(subTitleDiv);
subTitleMainDiv.append(dateDiv); subTitleMainDiv.append(dateDiv);
messageA.append(titleDiv); messageA.append(titleDiv);
messageA.append(subTitleMainDiv); messageA.append(subTitleMainDiv);
messageLi.append(messageA); messageLi.append(messageA);
$('#messageList').append(messageLi); $('#messageList').append(messageLi);
} }
}; };
/** /**
* dummy message list JSON for test * dummy message list JSON for test
*/ */
PushMessageList.dummyMessageListJson = { PushMessageList.dummyMessageListJson = {
pushMessageList: [{ pushMessageList: [
pushMessageId: 1, {
pushMessage: 'メッセージ内容が入ります。', pushMessageId: 1,
pushSendDate: '2022/07/06 14:14', pushMessage: 'メッセージ内容が入ります。',
operationName: '作業名が入ります。', pushSendDate: '2022/07/06 14:14',
readingFlg: 0, operationName: '作業名が入ります。',
}, { readingFlg: 0,
pushMessageId: 2, },
pushMessage: 'メッセージ内容が入ります。メッセージ内容が入ります。メッセージ内容が入ります。メッセージ内容が入ります。', {
pushSendDate: 'xxxxxxxxxxxxxxxxxxxxxxxxxx', pushMessageId: 2,
operationName: '作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。', pushMessage: 'メッセージ内容が入ります。メッセージ内容が入ります。メッセージ内容が入ります。メッセージ内容が入ります。',
readingFlg: 1, pushSendDate: 'xxxxxxxxxxxxxxxxxxxxxxxxxx',
}] operationName: '作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。',
readingFlg: 1,
},
],
}; };
/**
* ReportForm function js
* @since cms:1.4.3.2&1.4.3.3 web:1.0
*/
var RF = {};
RF.init = function () {
//Check if user is logged in
COMMON.checkAuth(false);
RF.loadCommon();
RF.initFormView();
};
RF.loadCommon = function () {
$('#includedHeader').load('../html/common/header.html', function () {
I18N.initi18n();
HEADER.init();
});
$('#includedConfirmModal').load('../html/common/confirm-modal.html', function () {
I18N.initi18n();
});
};
RF.initFormView = function () {
const urlParameterList = COMMON.getUrlParameter();
const operationId = urlParameterList['operationId'];
if (operationId) {
let params = {};
const taskKey = urlParameterList['taskKey'];
const replyNo = urlParameterList['replyNo'];
const processKey = urlParameterList['processKey'];
const phaseNo = urlParameterList['phaseNo'];
params.sid = COMMON.getSid();
params.operationId = operationId;
if (taskKey) params.taskKey = taskKey;
if (replyNo) params.replyNo = replyNo;
if (processKey) params.processKey = processKey;
if (phaseNo) params.phaseNo = phaseNo;
const url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.HTML.BASE + CONSTANT.URL.CMS.HTML.LIST_REPORT_FORM;
$('#report-form').load(url, params, function () {
initPageLoad();
});
} else {
COMMON.avwScreenMove('index.html');
}
};
// ReportList function js /**
* ReportList function js
*
* @since cms:1.4.3.2&1.4.3.3 web:1.0
**/
var RL = {}; var RL = {};
RL.init = function() { RL.init = function () {
console.log("ReportList init start"); //Check if user is logged in
// COMMON.checkAuth(true); COMMON.checkAuth(false);
console.log('ReportList init start');
RL.loadCommon(); RL.loadCommon();
RL.checkQuickReport(); RL.checkQuickReport();
RL.initTaskReportList(); RL.initTaskReportList();
...@@ -49,21 +54,20 @@ RL.checkQuickReport = function() { ...@@ -49,21 +54,20 @@ RL.checkQuickReport = function() {
} }
} }
RL.initTaskReportList = function() { RL.initTaskReportList = function () {
if (sessionStorage.OL_operationId) { if (sessionStorage.OL_operationId) {
let params = {}; let params = {};
params.sid = COMMON.getSid(); params.sid = COMMON.getSid();
params.operationId = sessionStorage.OL_operationId; params.operationId = sessionStorage.OL_operationId;
params.returnUrl = CONSTANT.URL.WEB.BASE + CONSTANT.URL.WEB.OPERATION_LIST; params.returnUrl = CONSTANT.URL.WEB.BASE + CONSTANT.URL.WEB.OPERATION_LIST;
let url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.HTML.BASE + CONSTANT.URL.CMS.HTML.TASK_REPORT_LIST; let url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.HTML.BASE + CONSTANT.URL.CMS.HTML.TASK_REPORT_LIST;
$("#reportList").load(url, params); $('#reportList').load(url, params);
} else { } else {
COMMON.displayAlert("error"); COMMON.displayAlert('error');
COMMON.avwScreenMove("index.html"); COMMON.avwScreenMove('index.html');
} }
} };
RL.goPdfPrint = function() {
COMMON.avwScreenMove("pdfPrint.html");
}
RL.goPdfPrint = function () {
COMMON.avwScreenMove('pdfPrint.html');
};
/** /**
* Send Message js in send-message.html * Send Message js in sendMessage.html
* *
* @since 1.0 check web * @since cms:1.4.3.2&1.4.3.3 web:1.0
*/ */
var SendMessage = {}; var SendMessage = {};
...@@ -12,49 +12,49 @@ SendMessage.contentMaxLength = 207; ...@@ -12,49 +12,49 @@ SendMessage.contentMaxLength = 207;
* Get input content * Get input content
* @returns string * @returns string
*/ */
SendMessage.getCurrentMessageContent = function() { SendMessage.getCurrentMessageContent = function () {
return $('#messageContent').val(); return $('#messageContent').val();
} };
/** /**
* Get operation id selected * Get operation id selected
* @returns string * @returns string
*/ */
SendMessage.getCurrentOperationId = function() { SendMessage.getCurrentOperationId = function () {
return $('#operationSelected').attr('data-operation-id'); return $('#operationSelected').attr('data-operation-id');
} };
/** /**
* Get send type selected * Get send type selected
* @returns string * @returns string
*/ */
SendMessage.getCurrentSendType = function() { SendMessage.getCurrentSendType = function () {
return $('input[name="sendType"]:checked').val(); return $('input[name="sendType"]:checked').val();
} };
/** /**
* Check data required when send message request to cms * Check data required when send message request to cms
* @returns boolean * @returns boolean
*/ */
SendMessage.checkValidation = function() { SendMessage.checkValidation = function () {
const message = SendMessage.getCurrentMessageContent(); const message = SendMessage.getCurrentMessageContent();
if (!ValidationUtil.CheckRequiredForText(message)) { if (!ValidationUtil.CheckRequiredForText(message)) {
alert(I18N.i18nText('msgContentRequired')); alert(I18N.i18nText('msgContentRequired'));
return false; return false;
} }
if (!ValidationUtil.CheckMaxLengthForByte(message, SendMessage.contentMaxLength)) { if (!ValidationUtil.CheckMaxLengthForByte(message, SendMessage.contentMaxLength)) {
alert(COMMON.format(I18N.i18nText('msgContentInvalidLength'), SendMessage.contentMaxLength)); alert(COMMON.format(I18N.i18nText('msgContentInvalidLength'), SendMessage.contentMaxLength));
return false; return false;
} }
const operationId = SendMessage.getCurrentOperationId(); const operationId = SendMessage.getCurrentOperationId();
if (!ValidationUtil.IsNumber(operationId)) { if (!ValidationUtil.IsNumber(operationId)) {
alert(I18N.i18nText('msgOperationRequired')); alert(I18N.i18nText('msgOperationRequired'));
return false; return false;
} }
const sendType = SendMessage.getCurrentSendType(); const sendType = SendMessage.getCurrentSendType();
if (!ValidationUtil.IsNumber(sendType)) { if (!ValidationUtil.IsNumber(sendType)) {
alert(I18N.i18nText('msgSendTypeRequired')); alert(I18N.i18nText('msgSendTypeRequired'));
return false; return false;
} }
return true; return true;
}; };
...@@ -62,7 +62,7 @@ SendMessage.checkValidation = function() { ...@@ -62,7 +62,7 @@ SendMessage.checkValidation = function() {
/** /**
* handle click event of send button * handle click event of send button
*/ */
SendMessage.onClickSend = function() { SendMessage.onClickSend = function () {
if (!SendMessage.checkValidation()) { if (!SendMessage.checkValidation()) {
return; return;
} }
...@@ -74,39 +74,44 @@ SendMessage.onClickSend = function() { ...@@ -74,39 +74,44 @@ SendMessage.onClickSend = function() {
/** /**
* post message data to cms * post message data to cms
* @param {string} message * @param {string} message
* @param {long} operationId * @param {long} operationId
* @param {int} sendType - 0: Group, 1: All * @param {int} sendType - 0: Group, 1: All
*/ */
SendMessage.postMessage = function(message, operationId, sendType) { SendMessage.postMessage = function (message, operationId, sendType) {
let param = { let param = {
sid: COMMON.getSid(), sid: COMMON.getSid(),
message: message, message: message,
operationId: operationId, operationId: operationId,
sendType: sendType sendType: sendType,
}; };
COMMON.cmsAjax(SendMessage.baseApiUrl, param, false, function (json) { COMMON.cmsAjax(
SendMessage.baseApiUrl,
}, function() { param,
console.log('SendMessage.postMessage error'); false,
function (json) {},
}); function () {
console.log('SendMessage.postMessage error');
},
);
}; };
SendMessage.operationSelectedCallback = function(operationId, operationName) { SendMessage.operationSelectedCallback = function (operationId, operationName) {
$('#operationSelected').attr('data-operation-id', operationId); $('#operationSelected').attr('data-operation-id', operationId);
$('#operationSelected').text(operationName); $('#operationSelected').text(operationName);
} };
SendMessage.templateSelectedCallback = function(template) { SendMessage.templateSelectedCallback = function (template) {
$('#messageContent').val(template); $('#messageContent').val(template);
} };
/** /**
* init data, action when screen onload * init data, action when screen onload
*/ */
SendMessage.init = function () { SendMessage.init = function () {
TEMPLATE.loadHearder("#includedHeader"); //Check if user is logged in
COMMON.checkAuth(false);
TEMPLATE.loadHearder('#includedHeader');
const navs = [ const navs = [
{ {
titleLang: 'dashboard', titleLang: 'dashboard',
...@@ -116,7 +121,7 @@ SendMessage.init = function () { ...@@ -116,7 +121,7 @@ SendMessage.init = function () {
titleLang: 'sendMessageTitle', titleLang: 'sendMessageTitle',
}, },
]; ];
TEMPLATE.loadMainNavsTitle("#includedMainTitle", "sendMessageTitle", navs, null); TEMPLATE.loadMainNavsTitle('#includedMainTitle', 'sendMessageTitle', navs, null);
TEMPLATE.loadOperationSelect('#includeOperationSelect', SendMessage.operationSelectedCallback); TEMPLATE.loadOperationSelect('#includeOperationSelect', SendMessage.operationSelectedCallback);
TEMPLATE.loadNotificationSelect('#includeTemplateModal', SendMessage.templateSelectedCallback); TEMPLATE.loadNotificationSelect('#includeTemplateModal', SendMessage.templateSelectedCallback);
$('#messageContent').attr('maxlength', SendMessage.contentMaxLength); $('#messageContent').attr('maxlength', SendMessage.contentMaxLength);
...@@ -124,4 +129,4 @@ SendMessage.init = function () { ...@@ -124,4 +129,4 @@ SendMessage.init = function () {
I18N.initi18n(); I18N.initi18n();
$("label[for='sendTypeGroup']").append(I18N.i18nText('labelSendTypeGroup')); $("label[for='sendTypeGroup']").append(I18N.i18nText('labelSendTypeGroup'));
$("label[for='sendTypeAll']").append(I18N.i18nText('labelSendTypeAll')); $("label[for='sendTypeAll']").append(I18N.i18nText('labelSendTypeAll'));
}; };
\ No newline at end of file
/// Account Settings function js /**
* Account Settings function js
* @since cms:1.4.3.2&1.4.3.3 web:1.0
**/
var SETTINGS = {}; var SETTINGS = {};
// Init function of page // Init function of page
$(document).ready(function () { $(document).ready(function () {
//Check if user is logged in
COMMON.checkAuth(false); COMMON.checkAuth(false);
SETTINGS.initScreen(); SETTINGS.initScreen();
$("#dspPwdUpd1").click(SETTINGS.dspPwdUpd1_Click); $('#dspPwdUpd1').click(SETTINGS.dspPwdUpd1_Click);
}); });
// Process changing password // Process changing password
SETTINGS.dspPwdUpd1_Click = function(e) { SETTINGS.dspPwdUpd1_Click = function (e) {
e.preventDefault(); e.preventDefault();
var isOK = true; var isOK = true;
var msgError = $('#main-error-message'); var msgError = $('#main-error-message');
// Check validation // Check validation
if (!ValidationUtil.CheckRequiredForText(SETTINGS.getCurrentPassword())) { if (!ValidationUtil.CheckRequiredForText(SETTINGS.getCurrentPassword())) {
isOK = false; isOK = false;
msgError.html(COMMON.format(I18N.i18nText('msgEssential'), I18N.i18nText('txtPwdCurr')).toString()); msgError.html(COMMON.format(I18N.i18nText('msgEssential'), I18N.i18nText('txtPwdCurr')).toString());
msgError.show(); msgError.show();
} } else {
else {
if (!ValidationUtil.CheckRequiredForText(SETTINGS.getNewPassword())) { if (!ValidationUtil.CheckRequiredForText(SETTINGS.getNewPassword())) {
isOK = false; isOK = false;
msgError.html(COMMON.format(I18N.i18nText('msgEssential'), I18N.i18nText('txtPwdNew')).toString()); msgError.html(COMMON.format(I18N.i18nText('msgEssential'), I18N.i18nText('txtPwdNew')).toString());
msgError.show(); msgError.show();
} else if (!ValidationUtil.CheckRequiredForText(SETTINGS.getNewPasswordRe())) { } else if (!ValidationUtil.CheckRequiredForText(SETTINGS.getNewPasswordRe())) {
isOK = false; isOK = false;
msgError.html(COMMON.format(I18N.i18nText('msgEssential'), I18N.i18nText('txtPwdNewRe')).toString()); msgError.html(COMMON.format(I18N.i18nText('msgEssential'), I18N.i18nText('txtPwdNewRe')).toString());
...@@ -38,7 +41,6 @@ SETTINGS.dspPwdUpd1_Click = function(e) { ...@@ -38,7 +41,6 @@ SETTINGS.dspPwdUpd1_Click = function(e) {
} }
} }
if (isOK) { if (isOK) {
// Check min length // Check min length
if (!ValidationUtil.CheckMinLengthForByte(SETTINGS.getNewPassword(), 6)) { if (!ValidationUtil.CheckMinLengthForByte(SETTINGS.getNewPassword(), 6)) {
isOK = false; isOK = false;
...@@ -53,58 +55,53 @@ SETTINGS.dspPwdUpd1_Click = function(e) { ...@@ -53,58 +55,53 @@ SETTINGS.dspPwdUpd1_Click = function(e) {
} }
// Check at least 3 consecutive characters // Check at least 3 consecutive characters
if (ValidationUtil.HasSeqChar(SETTINGS.getNewPassword(), 3)) { if (ValidationUtil.HasSeqChar(SETTINGS.getNewPassword(), 3)) {
isOK = false; isOK = false;
msgError.html(I18N.i18nText('msgHasSeqChar')); msgError.html(I18N.i18nText('msgHasSeqChar'));
msgError.show(); msgError.show();
} }
// Check 4 same characters in before password // Check 4 same characters in before password
if (ValidationUtil.ContainSameSeqChar(SETTINGS.getCurrentPassword(), SETTINGS.getNewPassword(), 4)) { if (ValidationUtil.ContainSameSeqChar(SETTINGS.getCurrentPassword(), SETTINGS.getNewPassword(), 4)) {
isOK = false; isOK = false;
msgError.html(I18N.i18nText('msgContainSameSeqChar')); msgError.html(I18N.i18nText('msgContainSameSeqChar'));
msgError.show(); msgError.show();
} }
} }
// Do changing password // Do changing password
if (isOK) { if (isOK) {
var params = { var params = {
sid: ClientData.userInfo_sid(), sid: ClientData.userInfo_sid(),
loginId: ClientData.userInfo_loginId_session(), loginId: ClientData.userInfo_loginId_session(),
password: SETTINGS.getCurrentPassword(), password: SETTINGS.getCurrentPassword(),
newPassword: SETTINGS.getNewPassword(), newPassword: SETTINGS.getNewPassword(),
language: I18N.getCurrentLanguage(), language: I18N.getCurrentLanguage(),
appId: 4 appId: 4,
}; };
const url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.API.PASSWORD_CHANGE; const url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.API.PASSWORD_CHANGE;
COMMON.cmsAjax(url, params, false, COMMON.cmsAjax(url, params, false, SETTINGS.avwCmsApi_passwordChange_success, SETTINGS.avwCmsApi_passwordChange_fail);
SETTINGS.avwCmsApi_passwordChange_success, } else {
SETTINGS.avwCmsApi_passwordChange_fail);
}
else {
//alert('error'); //alert('error');
} }
}; };
SETTINGS.avwCmsApi_passwordChange_success = function(data) { SETTINGS.avwCmsApi_passwordChange_success = function (data) {
// OK // OK
var msgError = $('#main-error-message'); var msgError = $('#main-error-message');
if (data.httpStatus != CONSTANT.HTTP_STATUS.OK) { if (data.httpStatus != CONSTANT.HTTP_STATUS.OK) {
msgError.html(I18N.i18nText('msgPwdChangeNG')); msgError.html(I18N.i18nText('msgPwdChangeNG'));
msgError.show(); msgError.show();
} } else {
else {
msgError.html(''); msgError.html('');
$("#txtPwdCur").val(""); $('#txtPwdCur').val('');
$("#txtPwdNew").val(""); $('#txtPwdNew').val('');
$("#txtPwdNewRe").val(""); $('#txtPwdNewRe').val('');
/* show messages */ /* show messages */
COMMON.displayAlert('msgPwdChangeOK'); COMMON.displayAlert('msgPwdChangeOK');
} }
}; };
SETTINGS.avwCmsApi_passwordChange_fail = function(xhr, b, c) { SETTINGS.avwCmsApi_passwordChange_fail = function (xhr, b, c) {
/* show error messages */ /* show error messages */
var msgError = $('#main-error-message'); var msgError = $('#main-error-message');
if (xhr.errorMessage && xhr.httpStatus != 0) { if (xhr.errorMessage && xhr.httpStatus != 0) {
...@@ -115,7 +112,6 @@ SETTINGS.avwCmsApi_passwordChange_fail = function(xhr, b, c) { ...@@ -115,7 +112,6 @@ SETTINGS.avwCmsApi_passwordChange_fail = function(xhr, b, c) {
msgError.show(); msgError.show();
}; };
/* /*
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
Event groups [ end ] Event groups [ end ]
...@@ -123,33 +119,32 @@ Event groups [ end ] ...@@ -123,33 +119,32 @@ Event groups [ end ]
*/ */
// Get input current password // Get input current password
SETTINGS.getCurrentPassword = function() { SETTINGS.getCurrentPassword = function () {
return $("#txtPwdCur").val(); return $('#txtPwdCur').val();
}; };
// Get input new password // Get input new password
SETTINGS.getNewPassword = function() { SETTINGS.getNewPassword = function () {
return $("#txtPwdNew").val(); return $('#txtPwdNew').val();
}; };
// Get input new password // Get input new password
SETTINGS.getNewPasswordRe = function() { SETTINGS.getNewPasswordRe = function () {
return $("#txtPwdNewRe").val(); return $('#txtPwdNewRe').val();
}; };
// Initalize screen // Initalize screen
SETTINGS.initScreen = function() { SETTINGS.initScreen = function () {
$("#includedHeader").load("../html/common/header.html" , function() { $('#includedHeader').load('../html/common/header.html', function () {
I18N.initi18n(); I18N.initi18n();
HEADER.init(); HEADER.init();
}); });
$("#includedConfirmModal").load("../html/common/confirm-modal.html", function() { $('#includedConfirmModal').load('../html/common/confirmModal.html', function () {
I18N.initi18n(); I18N.initi18n();
}); });
// Login ID // Login ID
$("#txtLoginId").text(ClientData.userInfo_loginId_session()); $('#txtLoginId').text(ClientData.userInfo_loginId_session());
// Account Path // Account Path
$("#txtLoginAccPath").text(ClientData.userInfo_accountPath_session()); $('#txtLoginAccPath').text(ClientData.userInfo_accountPath_session());
// Recent login date // Recent login date
$("#txtLastLoginTime").text(ClientData.userInfo_lastLoginTime()); $('#txtLastLoginTime').text(ClientData.userInfo_lastLoginTime());
}; };
/** /**
* template js * template js
* @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 TEMPLATE = {}; var TEMPLATE = {};
/** template load header */ /** template load header */
TEMPLATE.loadHearder = function(elmentId) { TEMPLATE.loadHearder = function (elmentId) {
$(elmentId).load("../html/common/header.html" , function() { $(elmentId).load('../html/common/header.html', function () {
$('#iconHomeDashboard').removeClass('active');
$('#iconHomeWorkList').removeClass('active');
if (sessionStorage.activeHomePage == CONSTANT.PAGE_NAME.OPERATION_LIST) {
$('#iconHomeWorkList').addClass('active');
} else {
$('#iconHomeDashboard').addClass('active');
}
I18N.initi18n(); I18N.initi18n();
HEADER.init(); HEADER.init();
}); });
} };
/** /**
* template load dashboard setting * template load dashboard setting
* @param {string} elmentId - element to load setting html * @param {string} elmentId - element to load setting html
* @param {*} changeCallback - callback when setting changed * @param {*} changeCallback - callback when setting changed
*/ */
TEMPLATE.loadDashboardSetting = function(elmentId, changeCallback) { TEMPLATE.loadDashboardSetting = function (elmentId, changeCallback) {
$(elmentId).load("dashboard-setting.html", function() { $(elmentId).load('dashboardSetting.html', function () {
DashboardSetting.init(changeCallback); DashboardSetting.init(changeCallback);
I18N.initi18n(); I18N.initi18n();
}); });
} };
/** Template load confirm model */ /** Template load confirm model */
TEMPLATE.loadConfirmModal = function(elmentId) { TEMPLATE.loadConfirmModal = function (elmentId) {
$(elmentId).load("../html/common/confirm-modal.html", function() { $(elmentId).load('../html/common/confirmModal.html', function () {
I18N.initi18n(); I18N.initi18n();
}); });
} };
/** Template load operation select */ /** Template load operation select */
TEMPLATE.loadOperationSelect = function(elmentId, selectCallback) { TEMPLATE.loadOperationSelect = function (elmentId, selectCallback) {
$(elmentId).load("operation-select.html", function() { $(elmentId).load('operationSelect.html', function () {
OperationSelect.init(selectCallback); OperationSelect.init(selectCallback);
I18N.initi18n(); I18N.initi18n();
}); });
} };
/** /**
* show confirm model * show confirm model
*/ */
TEMPLATE.showModalConfirm = function () { TEMPLATE.showModalConfirm = function () {
$("#showConfirm").click(function(){ $('#showConfirm').click(function () {
$("#confirm-modal").modal(); $('#confirm-modal').modal();
}); });
}; };
/** Template load notification content*/ /** Template load notification content*/
TEMPLATE.loadNotificationSelect = function(elmentId, selectCallback) { TEMPLATE.loadNotificationSelect = function (elmentId, selectCallback) {
$(elmentId).load("notification-content.html", function() { $(elmentId).load('notificationContent.html', function () {
NotificationSelect.init(selectCallback); NotificationSelect.init(selectCallback);
I18N.initi18n(); I18N.initi18n();
}); });
} };
/** /**
* load main navs title html to a element by id * load main navs title html to a element by id
...@@ -62,15 +69,15 @@ TEMPLATE.loadNotificationSelect = function(elmentId, selectCallback) { ...@@ -62,15 +69,15 @@ TEMPLATE.loadNotificationSelect = function(elmentId, selectCallback) {
* @param {string} titleLang - lang of title * @param {string} titleLang - lang of title
* @param {Array} navs - array nav items (titleLang, href) * @param {Array} navs - array nav items (titleLang, href)
*/ */
TEMPLATE.loadMainNavsTitle = function(elmentId, titleLang, navs, completeCallback) { TEMPLATE.loadMainNavsTitle = function (elmentId, titleLang, navs, completeCallback) {
var titleHtmlPath = '../common/main-title.html'; var titleHtmlPath = '../common/html/mainTitle.html';
if (navs) { if (navs) {
titleHtmlPath = '../common/main-nav-title.html'; titleHtmlPath = '../common/html/mainNavTitle.html';
} }
$(elmentId).load(titleHtmlPath , function(data) { $(elmentId).load(titleHtmlPath, function (data) {
$(elmentId).replaceWith(data); $(elmentId).replaceWith(data);
if (titleLang) { if (titleLang) {
$('#mainTitleHeader').attr("lang", titleLang); $('#mainTitleHeader').attr('lang', titleLang);
} }
if (navs) { if (navs) {
var olElm = $('#mainTitleNavs ol'); var olElm = $('#mainTitleNavs ol');
...@@ -100,4 +107,4 @@ TEMPLATE.loadNotificationSelect = function(elmentId, selectCallback) { ...@@ -100,4 +107,4 @@ TEMPLATE.loadNotificationSelect = function(elmentId, selectCallback) {
completeCallback(); completeCallback();
} }
}); });
} };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment