Commit b4c0e28e by Kang Donghun

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

# Conflicts:
#   abweb/js/pickup/pickup.js
parents 0ca80b2d 15e918ab
...@@ -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("../common/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("../common/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("../common/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("../common/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("../common/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("../common/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;
......
/** /**
* Common js for footer. * header js for index.
* ※Code is written mainly for dashboard and operationList. * ※Code is written mainly for dashboard and operationList.
* *
* @since cms:1.4.3.2&1.4.3.3 web:1.0 * @since cms:1.4.3.2&1.4.3.3 web:1.0
*/ */
var FOOTER = {}; var HEADER = {};
/** /** Direct home page setting */
* Change specific footer bottom to active. HEADER.goToHomePage = function (pageId) {
* DashboardSetting.getSettingData(function (settings) {
* @param {String} bottomNavId if(settings.dashboardHome == 1)
*/ {
FOOTER.activeBottomNav = function (bottomNavId) { HEADER.goDashboard();
let elm = $('#' + bottomNavId); }
if (typeof elm !== 'object') { else
console.log('FOOTER.activeBottomNav:elm !== object:' + bottomNavId); {
return; HEADER.goOperationList();
} }
elm.removeClass('text-secondary');
elm.addClass('text-primary'); });
let img = elm.find('img')[0]; }
if (img && img.getAttribute('data-src')) {
img.src = img.getAttribute('data-src'); /**
} * Go page of operationList
}; */
/** HEADER.goOperationList = function () {
* change inactive all footer bottom $('#footer').load(CONSTANT.PAGE_NAME.FOOTER, function () {
*/ sessionStorage.activeTab = CONSTANT.PAGE_TAB.OPERATION_LIST;
FOOTER.inactiveAllBottomNav = function () { HEADER.activeInitBottomNav('operationListBottomNav');
let navs = document.getElementsByClassName('bottom-nav'); TOP.showPage(CONSTANT.PAGE_NAME.OPERATION_LIST);
for (i = 0; i < navs.length; i++) { });
navs[i].className = navs[i].className.replace('text-primary', 'text-secondary'); };
let img = navs[i].querySelector('img');
if (img && img.getAttribute('data-inactive-src')) { /**
img.src = img.getAttribute('data-inactive-src'); * Go page of dashboard
} */
} HEADER.goDashboard = function () {
}; COMMON.avwScreenMove("dashboard.html");
};
/**
* Go page of index.html.
* Store tab id in session for want to show display. /**
* * Initialize with any navigation
* @param {String} tabId *
*/ * @param {String} bottomNav
FOOTER.goIndexPage = function (tabId) { */
sessionStorage.activeTab = tabId; HEADER.activeInitBottomNav = function (bottomNav) {
COMMON.goUrlWithCurrentParams(DAFAULT_PAGE); HEADER.inactiveAllBottomNav();
}; HEADER.activeBottomNav(bottomNav);
};
/**
* is the url index.html? /**
*/ * change inactive all footer bottom
FOOTER.isIndexPage = function () { */
if (typeof location === 'object' && typeof location.pathname === 'string') { HEADER.inactiveAllBottomNav = function () {
if (location.pathname.includes(CONSTANT.PAGE_NAME.DEFAULT) == true) { let navs = document.getElementsByClassName('bottom-nav');
return true; for (i = 0; i < navs.length; i++) {
} navs[i].className = navs[i].className.replace('text-primary', 'text-secondary');
} let img = navs[i].querySelector('img');
return false; if (img && img.getAttribute('data-inactive-src')) {
}; img.src = img.getAttribute('data-inactive-src');
}
/** }
* Initialize with any navigation };
*
* @param {String} bottomNav
*/ /**
FOOTER.activeInitBottomNav = function (bottomNav) { * Change specific footer bottom to active.
FOOTER.inactiveAllBottomNav(); *
FOOTER.activeBottomNav(bottomNav); * @param {String} bottomNavId
}; */
HEADER.activeBottomNav = function (bottomNavId) {
/** let elm = $('#' + bottomNavId);
* Go page of dashboard if (typeof elm !== 'object') {
*/ console.log('HEADER.activeBottomNav:elm !== object:' + bottomNavId);
FOOTER.goDashboard = function () { return;
sessionStorage.activeTab = CONSTANT.PAGE_TAB.DASHBOARD; }
FOOTER.activeInitBottomNav('dashboardBottomNav'); elm.removeClass('text-secondary');
if (FOOTER.isIndexPage()) { elm.addClass('text-primary');
TOP.showPage(CONSTANT.PAGE_NAME.DASHBOARD); let img = elm.find('img')[0];
return; if (img && img.getAttribute('data-src')) {
} img.src = img.getAttribute('data-src');
FOOTER.goIndexPage(CONSTANT.PAGE_NAME.DASHBOARD); }
}; };
\ No newline at end of file
/**
* Go page of operationList
*/
FOOTER.goOperationList = function () {
sessionStorage.activeTab = CONSTANT.PAGE_TAB.OPERATION_LIST;
FOOTER.activeInitBottomNav('operationListBottomNav');
if (FOOTER.isIndexPage()) {
TOP.showPage(CONSTANT.PAGE_NAME.OPERATION_LIST);
return;
}
FOOTER.goIndexPage(CONSTANT.PAGE_NAME.OPERATION_LIST);
};
/**
* Go to active tab when footer was loaded.
* If it is no active tab, go to page in settings.
*/
FOOTER.initFooter = function () {
$('#footer').load(CONSTANT.PAGE_NAME.FOOTER, function () {
if (typeof sessionStorage != 'undefined' && typeof sessionStorage.activeTab != 'undefined') {
if (sessionStorage.activeTab == CONSTANT.PAGE_TAB.DASHBOARD) {
FOOTER.goDashboard();
} else {
FOOTER.goOperationList();
}
return;
}
FOOTER.goOperationList();
// CHK.loadDashboardSetting(function() {
// if (CHK.dashboardSetting.dashboardHome) {
// FOOTER.goDashboard();
// } else {
// FOOTER.goOperationList();
// }
// });
});
};
<!-- view display type menu -->
<div class="view">
<a href="#" class="text-decoration-none view-btn view-list-btn">
<img src="../common/img/icon_view_list.svg" alt="" class="list-block-icon mx-1 lang" lang="listDisplay" type="image" data-toggle="tooltip" data-placement="bottom" title="">
</a>
<a href="#" class="text-decoration-none view-btn view-block-btn active">
<img src="../common/img/icon_view_block.svg" alt="" class="list-block-icon mx-1 lang" lang="gridDisplay" type="image" data-toggle="tooltip" data-placement="bottom" title="">
</a>
</div>
\ No newline at end of file
...@@ -21,17 +21,17 @@ ...@@ -21,17 +21,17 @@
<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 src="../js/operationList/operationList.js?__UPDATEID__"></script> <script src="../js/operationList/operationList.js?__UPDATEID__"></script>
<script src="../js/topPage/topPage.js?__UPDATEID__"></script> <script src="/abweb/js/dashboardSetting/dashboard-setting.js?__UPDATEID__"></script>
<script src="../js/dashboardSetting/check-dashboard-setting.js?__UPDATEID__"></script>
<script src="../js/dashboard/dashboard.js?__UPDATEID__"></script> <script src="../js/dashboard/dashboard.js?__UPDATEID__"></script>
<script src="../common/js/footer.js?__UPDATEID__"></script> <script src="/abweb/common/js/header.js?__UPDATEID__"></script>
<script src="/abweb/js/topPage/topPage.js?__UPDATEID__"></script>
<script src="../common/js/app.js?__UPDATEID__" defer></script> <script src="../common/js/app.js?__UPDATEID__" defer></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>
</head> </head>
<body onload="TOP.init();" style="position: relative; margin-top: 53px;"> <body style="position: relative; margin-top: 53px;">
<!--作業一覧画面--> <!--作業一覧画面-->
<section id="operationList" class="page-content" style="display: none;"> <section id="operationList" class="page-content" style="display: none;">
...@@ -199,7 +199,7 @@ ...@@ -199,7 +199,7 @@
<!--ローディング--> <!--ローディング-->
<div id="check_loading" style="display:none; position: relative; overflow:hidden;"> <div id="check_loading" style="display:none; position: relative; overflow:hidden;">
<p id="checkLoadingMessage"></p> <p id="checkLoadingMessage"></p>
<div id="checkLoadingImage"><img src='${check}images/transferLoading.gif' /></div> <div id="checkLoadingImage"><img src='/abweb/img/loading.svg' /></div>
</div> </div>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<nav class="d-flex justify-content-around"> <nav class="d-flex justify-content-around">
<!--ダッシュボード--> <!--ダッシュボード-->
<a id="dashboardBottomNav" class="d-block w-100 text-center py-2 text-decoration-none text-secondary bottom-nav" href="javascript:FOOTER.goDashboard();"> <a id="dashboardBottomNav" class="d-block w-100 text-center py-2 text-decoration-none text-secondary bottom-nav" href="dashboard.html">
<img src="../img/dashboard/icon_dashboard_inactive.svg" data-inactive-src="../img/dashboard/icon_dashboard_inactive.svg" data-src="../img/dashboard/icon_dashboard.svg" alt="buttonDashboard" class="p-1"> <img src="../img/dashboard/icon_dashboard_inactive.svg" data-inactive-src="../img/dashboard/icon_dashboard_inactive.svg" data-src="../img/dashboard/icon_dashboard.svg" alt="buttonDashboard" class="p-1">
<div class="fs-7 multi-lang" data-msg="buttonDashboard"></div> <div class="fs-7 multi-lang" data-msg="buttonDashboard"></div>
</a> </a>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</ul> </ul>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-primary lang" lang="selection"></button> <button type="button" class="btn btn-primary lang" lang="selection" onclick="NotificationSelect.onClickTempalte();"></button>
<button type="button" class="btn btn-tertiary lang" lang="dspCancel" data-dismiss="modal"></button> <button type="button" class="btn btn-tertiary lang" lang="dspCancel" data-dismiss="modal"></button>
</div> </div>
</div> </div>
......
...@@ -30,10 +30,14 @@ ...@@ -30,10 +30,14 @@
<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/template/template.js"></script> <script type="text/javascript" src="../js/template/template.js"></script>
<script type="text/javascript" src="../js/pickup/pickup.js"></script> <script type="text/javascript" src="../js/pickup/pickup.js"></script>
<script type="text/javascript">
$(document).ready(function(){
PICKUP.init();
});
</script>
</head> </head>
<body onload="PICKUP.init();"> <body >
<!-- header --> <!-- header -->
<div id="includedHeader"></div> <div id="includedHeader"></div>
......
...@@ -39,23 +39,10 @@ ...@@ -39,23 +39,10 @@
<!-- header --> <!-- header -->
<div id="includedHeader"></div> <div id="includedHeader"></div>
<div id="includedMainTitle"></div>
<!-- message detail --> <!-- message detail -->
<main> <main>
<div class="container"> <div class="container">
<!-- breadcrumb -->
<nav aria-label="breadcrumb">
<ol class="breadcrumb px-0 mb-0">
<li class="breadcrumb-item"><a href="dashboard.html" class="text-decoration-none text-underline lang" lang="dashboard"></a></li>
<li class="breadcrumb-item"><a href="push-message-list.html" class="text-decoration-none text-underline lang" lang="messageListTitle"></a></li>
<li class="breadcrumb-item active lang" lang="messageDetail" aria-current="page"><span></span></li>
</ol>
</nav>
<!-- title -->
<h1 class="fs-14 font-weight-bold pt-sm-4 pt-2 pb-3 mb-0 lang" lang="messageDetail"></h1>
<!-- message detail -->
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="card p-4"> <div class="card p-4">
......
...@@ -41,21 +41,10 @@ ...@@ -41,21 +41,10 @@
<!-- header --> <!-- header -->
<div id="includedHeader"></div> <div id="includedHeader"></div>
<div id="includedMainTitle"></div>
<!-- send message --> <!-- send message -->
<main> <main>
<div class="container"> <div class="container">
<!-- breadcrumb -->
<nav aria-label="breadcrumb">
<ol class="breadcrumb px-0 mb-0">
<li class="breadcrumb-item"><a href="dashboard.html" class="text-decoration-none text-underline lang" lang="dashboard"></a></li>
<li class="breadcrumb-item active lang" lang="sendMessageTitle" aria-current="page"><span></span></li>
</ol>
</nav>
<!-- title -->
<h1 class="fs-14 font-weight-bold pt-sm-4 pt-2 pb-3 mb-0 lang" lang="sendMessageTitle"></h1>
<!-- content --> <!-- content -->
<div class="py-2"> <div class="py-2">
<div class="row"> <div class="row">
......
...@@ -147,8 +147,8 @@ DASHBOARD.updateDataPickups = function (settings, dataDashboard) { ...@@ -147,8 +147,8 @@ DASHBOARD.updateDataPickups = function (settings, dataDashboard) {
item.enabled = enabled; item.enabled = enabled;
} }
item.count = 0; item.count = 0;
if (dataDashboard[item.id]) { if (dataDashboard.dashboard[item.id]) {
item.count = dataDashboard[item.id]; item.count = dataDashboard.dashboard[item.id];
} }
}); });
}; };
......
...@@ -48,24 +48,26 @@ NotificationSelect.selectOperationClick = function () { ...@@ -48,24 +48,26 @@ NotificationSelect.selectOperationClick = function () {
/** /**
* init data, action when screen onload * init data, action when screen onload
*/ */
NotificationSelect.init = function () { NotificationSelect.init = function (selectedCallback) {
NotificationSelect.getNotificationSelectData(function (data) { NotificationSelect.getNotificationSelectData(function (data) {
NotificationSelect.createNotificationSelectList(data); if (typeof data === 'undefined' || data == null) return;
NotificationSelect.createNotificationSelectList(data.pushMessageTemplate);
}); });
NotificationSelect.selectOperationClick(); NotificationSelect.selectOperationClick();
NotificationSelect.changeSelectCallback = selectedCallback;
}; };
/** /**
* Implement notification select html * Implement notification select html
* @returns * @returns
*/ */
NotificationSelect.createNotificationSelectList = function(data) { NotificationSelect.createNotificationSelectList = function(pushMessageTemplate) {
$("#notificationSelectList").empty(); $("#notificationSelectList").empty();
if (typeof data === 'undefined' || data.length < 1) return; if (typeof pushMessageTemplate === 'undefined' || pushMessageTemplate.length < 1) return;
let classSelected = "selected"; let classSelected = "selected";
for (let i = 0; i < data.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'>" + data[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 = $("<div class='flex-shrink-1 mx-3 align-self-center'>" let divIcon = $("<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" + i + "' aria-expanded='true' aria-controls='collapse" + i + "'>"
+ "<div class='arrow-icon'></div>" + "<div class='arrow-icon'></div>"
...@@ -76,7 +78,7 @@ NotificationSelect.init = function () { ...@@ -76,7 +78,7 @@ NotificationSelect.init = function () {
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'>" + data[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>");
...@@ -86,7 +88,40 @@ NotificationSelect.init = function () { ...@@ -86,7 +88,40 @@ NotificationSelect.init = function () {
divValue.append(divBodyValue); divValue.append(divBodyValue);
messageli.append(divParentName); messageli.append(divParentName);
messageli.append(divValue); messageli.append(divValue);
if(i == 0)
{
NotificationSelect.nameSelected = pushMessageTemplate[i].name;
NotificationSelect.valueSelected = pushMessageTemplate[i].value;
}
$("#notificationSelectList").append(messageli); $("#notificationSelectList").append(messageli);
} }
} }
/**
* handle click event of select button
*/
NotificationSelect.onClickTempalte = function () {
NotificationSelect.chooseTemplate();
};
/**
* Get operation select and call back function in main page
*/
NotificationSelect.chooseTemplate = function () {
let param = {};
param.nameSelected = NotificationSelect.nameSelected;
param.valueSelected = NotificationSelect.valueSelected;
NotificationSelect.closeModal();
if (NotificationSelect.changeSelectCallback && typeof NotificationSelect.changeSelectCallback === 'function') {
NotificationSelect.changeSelectCallback(param.valueSelected);
}
};
/**
* close setting dialog
*/
NotificationSelect.closeModal = function () {
$('#select-template-modal .close').click();
};
\ No newline at end of file
...@@ -52,7 +52,8 @@ OperationSelect.selectOperationClick = function () { ...@@ -52,7 +52,8 @@ OperationSelect.selectOperationClick = function () {
*/ */
OperationSelect.init = function (selectedCallback) { OperationSelect.init = function (selectedCallback) {
OperationSelect.getOperationSelectData(function (data) { OperationSelect.getOperationSelectData(function (data) {
OperationSelect.createOperationSelectList(data); if (typeof data === 'undefined' || data == null) return;
OperationSelect.createOperationSelectList(data.operationList);
}); });
OperationSelect.selectOperationClick(); OperationSelect.selectOperationClick();
OperationSelect.changeSelectCallback = selectedCallback; OperationSelect.changeSelectCallback = selectedCallback;
...@@ -62,14 +63,14 @@ OperationSelect.init = function (selectedCallback) { ...@@ -62,14 +63,14 @@ OperationSelect.init = function (selectedCallback) {
* Implement operation select html * Implement operation select html
* @returns * @returns
*/ */
OperationSelect.createOperationSelectList = function(data) { OperationSelect.createOperationSelectList = function(operationList) {
$("#operationSelectList").empty(); $("#operationSelectList").empty();
if (typeof data === 'undefined' || data.length < 1) return; if (typeof operationList === 'undefined' || operationList.length < 1) return;
for (let i = 0; i < data.length; i++) { for (let i = 0; i < operationList.length; i++) {
let messageli = $("<li class='card mb-2' name = 'operationId_" + data[i].operationId + "' ></li>"); let messageli = $("<li class='card mb-2' name = 'operationId_" + operationList[i].operationId + "' ></li>");
let ahrefRequiredFlg = $("<a href='#' class='d-block px-5 py-3 text-decoration-none select-label' data-key='" + data[i].operationId + "' data-name='" + data[i].operationName + "' ></a>"); 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>");
let divText = $("<div class='fs-12 text-truncate d-block'>"+ data[i].operationName + "</div>"); let divText = $("<div class='fs-12 text-truncate d-block'>"+ operationList[i].operationName + "</div>");
ahrefRequiredFlg.append(divText); ahrefRequiredFlg.append(divText);
messageli.append(ahrefRequiredFlg); messageli.append(ahrefRequiredFlg);
...@@ -97,7 +98,7 @@ OperationSelect.init = function (selectedCallback) { ...@@ -97,7 +98,7 @@ OperationSelect.init = function (selectedCallback) {
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); OperationSelect.changeSelectCallback(param.operationIdSelected,param.operationNameSelected );
} }
}; };
......
...@@ -116,9 +116,6 @@ PICKUP.init = function() { ...@@ -116,9 +116,6 @@ PICKUP.init = function() {
console.log("PICKUP.init"); console.log("PICKUP.init");
TEMPLATE.loadHearder("#includedHeader"); TEMPLATE.loadHearder("#includedHeader");
TEMPLATE.loadConfirmModal("#includedConfirmModal"); TEMPLATE.loadConfirmModal("#includedConfirmModal");
TEMPLATE.loadDisplaymenu("#includedNewReportMenuDisplay");
TEMPLATE.loadDisplaymenu("#includedContinuousWorkMenuDisplay");
TEMPLATE.loadDisplaymenu("#includedReportWithWarningsMenuDisplay");
PICKUP.initSettingActivePickup(); PICKUP.initSettingActivePickup();
PICKUP.settingPickup(); PICKUP.settingPickup();
...@@ -139,12 +136,12 @@ PICKUP.settingPickup = function() { ...@@ -139,12 +136,12 @@ PICKUP.settingPickup = function() {
if(settings.continousWork) if(settings.continousWork)
{ {
$("#liTabContinousWork").removeClass('d-none'); $("#liTabContinousWork").removeClass('d-none');
//PICKUP.initContinuosWorkTab(); PICKUP.initContinuosWorkTab();
} }
if(settings.reportWarning) if(settings.warningReport)
{ {
$("#liTabReportWithWarning").removeClass('d-none'); $("#liTabReportWithWarning").removeClass('d-none');
//PICKUP.initReportWithWarningsTab(); PICKUP.initReportWithWarningsTab();
} }
}); });
} }
...@@ -272,16 +269,17 @@ PICKUP.sortNewReportList = function(operationList) { ...@@ -272,16 +269,17 @@ PICKUP.sortNewReportList = function(operationList) {
* @returns * @returns
*/ */
PICKUP.createNewReportList = function(operationListOld) { PICKUP.createNewReportList = function(operationListOld) {
if (typeof operationListOld === 'undefined' || operationListOld.length < 1) {
PICKUP.showNotFoundPickupItem("#newReport-list");
$('#viewMenuNewReport').addClass('d-none');
return;
}
let operationList = PICKUP.sortNewReportList(operationListOld); let operationList = PICKUP.sortNewReportList(operationListOld);
$('#viewMenuNewReport').removeClass('d-none'); $('#viewMenuNewReport').removeClass('d-none');
$("#newReport-list").empty(); $("#newReport-list").empty();
PICKUP.countNewReportList = 0; PICKUP.countNewReportList = 0;
if (typeof operationList === 'undefined' || operationList.length < 1) {
PICKUP.showNotFoundPickupItem("#newReport-list");
$('#viewMenuNewReport').addClass('d-none');
return;
}
$('#newReport-list').addClass('task-list view-content view-block'); $('#newReport-list').addClass('task-list view-content view-block');
let classIcon ; let classIcon ;
for (let i = 0; i < operationList.length; i++) { for (let i = 0; i < operationList.length; i++) {
...@@ -393,17 +391,18 @@ PICKUP.sortContinousWorkList = function(operationList) { ...@@ -393,17 +391,18 @@ PICKUP.sortContinousWorkList = function(operationList) {
* @returns * @returns
*/ */
PICKUP.createContinousWorkList = function(operationListOld) { PICKUP.createContinousWorkList = function(operationListOld) {
let operationList = PICKUP.sortContinousWorkList(operationListOld); if (typeof operationListOld === 'undefined' || operationListOld.length < 1) {
$('#viewMenuContinuousWork').removeClass('d-none'); PICKUP.showNotFoundPickupItem("#continousWork-list");
$("#continousWork-list").empty(); $('#viewMenuContinuousWork').addClass('d-none');
PICKUP.countContinousWorkReport = 0;
if (typeof operationList === 'undefined' || operationList.length < 1) {
PICKUP.showNotFoundPickupItem("#continousWork-list");
$('#viewMenuContinuousWork').addClass('d-none');
return; return;
} }
let operationList = PICKUP.sortContinousWorkList(operationListOld);
$('#viewMenuContinuousWork').removeClass('d-none');
$("#continousWork-list").empty();
PICKUP.countContinousWorkReport = 0;
$('#continousWork-list').addClass('task-list view-content view-block'); $('#continousWork-list').addClass('task-list view-content view-block');
for (let i = 0; i < operationList.length; i++) { for (let i = 0; i < operationList.length; i++) {
...@@ -603,16 +602,18 @@ PICKUP.initWarningReportWithContinuousReportType = function(report) { ...@@ -603,16 +602,18 @@ PICKUP.initWarningReportWithContinuousReportType = function(report) {
* @returns * @returns
*/ */
PICKUP.createReportWithWarningList = function(operationListOld) { PICKUP.createReportWithWarningList = function(operationListOld) {
if (typeof operationListOld === 'undefined' || operationListOld.length < 1) {
PICKUP.showNotFoundPickupItem("#reportWithWarnings-list");
$('#viewMenuReportWithWarnings').addClass('d-none');
return;
}
let operationList = PICKUP.sortWarningList(operationListOld); let operationList = PICKUP.sortWarningList(operationListOld);
$('#viewMenuReportWithWarnings').removeClass('d-none'); $('#viewMenuReportWithWarnings').removeClass('d-none');
$("#reportWithWarnings-list").empty(); $("#reportWithWarnings-list").empty();
PICKUP.countReportWithWarning = 0; PICKUP.countReportWithWarning = 0;
if (typeof operationList === 'undefined' || operationList.length < 1) {
PICKUP.showNotFoundPickupItem("#reportWithWarnings-list");
$('#viewMenuReportWithWarnings').addClass('d-none');
return;
}
$('#reportWithWarnings-list').addClass('task-list view-content view-block'); $('#reportWithWarnings-list').addClass('task-list view-content view-block');
const msgLevelReport = I18N.i18nText('reportLevelReport'); const msgLevelReport = I18N.i18nText('reportLevelReport');
......
...@@ -2,6 +2,9 @@ var PushMessageDetail = {}; ...@@ -2,6 +2,9 @@ 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;
/**
* dummy json for test
*/
PushMessageDetail.dummyMessageDetailJson = { PushMessageDetail.dummyMessageDetailJson = {
pushMessageId: 1, pushMessageId: 1,
pushMessage: "内容が入ります。内容が入ります。内容が入ります。内容が入ります。", pushMessage: "内容が入ります。内容が入ります。内容が入ります。内容が入ります。",
...@@ -10,8 +13,27 @@ PushMessageDetail.dummyMessageDetailJson = { ...@@ -10,8 +13,27 @@ PushMessageDetail.dummyMessageDetailJson = {
pushSendLoginId: "agentec" pushSendLoginId: "agentec"
} }
/**
* init when html loaded
*/
PushMessageDetail.init = function() { PushMessageDetail.init = function() {
//load common html
TEMPLATE.loadHearder("#includedHeader"); TEMPLATE.loadHearder("#includedHeader");
const navs = [
{
titleLang: 'dashboard',
href: 'dashboard.html',
},
{
titleLang: 'messageListTitle',
href: 'push-message-list.html',
},
{
titleLang: 'messageDetail',
},
];
TEMPLATE.loadMainNavsTitle("#includedMainTitle", "messageDetail", navs, null);
//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;
...@@ -21,6 +43,11 @@ PushMessageDetail.init = function() { ...@@ -21,6 +43,11 @@ PushMessageDetail.init = function() {
}); });
} }
/**
* request message data
* @param {string} pushMessageId
* @param {object} callback
*/
PushMessageDetail.getMessageDetail = function(pushMessageId, callback) { PushMessageDetail.getMessageDetail = function(pushMessageId, callback) {
let param = { let param = {
sid: COMMON.getSid(), sid: COMMON.getSid(),
...@@ -36,6 +63,10 @@ PushMessageDetail.getMessageDetail = function(pushMessageId, callback) { ...@@ -36,6 +63,10 @@ PushMessageDetail.getMessageDetail = function(pushMessageId, callback) {
}); });
} }
/**
* Show message data
* @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);
......
...@@ -102,6 +102,16 @@ SendMessage.templateSelectedCallback = function(template) { ...@@ -102,6 +102,16 @@ SendMessage.templateSelectedCallback = function(template) {
*/ */
SendMessage.init = function () { SendMessage.init = function () {
TEMPLATE.loadHearder("#includedHeader"); TEMPLATE.loadHearder("#includedHeader");
const navs = [
{
titleLang: 'dashboard',
href: 'dashboard.html',
},
{
titleLang: 'sendMessageTitle',
},
];
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);
//load lang for elements none class lang //load lang for elements none class lang
......
...@@ -38,13 +38,6 @@ TEMPLATE.loadOperationSelect = function(elmentId, selectCallback) { ...@@ -38,13 +38,6 @@ TEMPLATE.loadOperationSelect = function(elmentId, selectCallback) {
}); });
} }
/** Template load display menu */
TEMPLATE.loadDisplaymenu = function(elmentId) {
$(elmentId).load("display-menu.html", function() {
I18N.initi18n();
});
}
/** /**
* show confirm model * show confirm model
*/ */
......
...@@ -16,6 +16,7 @@ $(document).ready(function () { ...@@ -16,6 +16,7 @@ $(document).ready(function () {
//setting msg of html //setting msg of html
COMMON.updateLang(); COMMON.updateLang();
TOP.init();
}); });
/** /**
...@@ -23,7 +24,7 @@ $(document).ready(function () { ...@@ -23,7 +24,7 @@ $(document).ready(function () {
*/ */
TOP.init = function () { TOP.init = function () {
COMMON.showLoading(); COMMON.showLoading();
FOOTER.initFooter(); //app should get data after initFooter HEADER.goToHomePage();
COMMON.closeLoading(); COMMON.closeLoading();
}; };
......
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