Commit f0e499fd by Kang Donghun

パンくずボタン実装

parent f5a95910
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
<div class="dropdown-menu dropdown-menu-right" data-animation="true" aria-labelledby="dropdown-profile"> <div class="dropdown-menu dropdown-menu-right" data-animation="true" aria-labelledby="dropdown-profile">
<h6 class="dropdown-header" id="dspLoginId" ></h6> <h6 class="dropdown-header" id="dspLoginId" ></h6>
<a class="dropdown-item " href="accountSetting.html" > <a class="dropdown-item " href="accountSetting.html" >
<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="accountSetting">
<span class="lang" style=" color: #6c757d;" lang="account_setting"></span> <span class="lang" style=" color: #6c757d;" lang="accountSetting"></span>
</a> </a>
<a class="dropdown-item " href="#" data-toggle="modal" data-target="#confirm-modal" id="btnLogout"> <a class="dropdown-item " href="#" data-toggle="modal" data-target="#confirm-modal" 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">
......
...@@ -18,7 +18,8 @@ CONSTANT.SORT_TYPE = { ...@@ -18,7 +18,8 @@ CONSTANT.SORT_TYPE = {
CONSTANT.PAGE_NAME = { CONSTANT.PAGE_NAME = {
DASHBOARD: 'dashboard', DASHBOARD: 'dashboard',
OPERATION_LIST: 'operationList', OPERATION_LIST: 'workList',
REPORT_LIST: 'reportList',
DEFAULT: 'index.html', DEFAULT: 'index.html',
LOGIN: './login.html', LOGIN: './login.html',
}; };
...@@ -33,6 +34,7 @@ CONSTANT.URL_TREE_NAME = { ...@@ -33,6 +34,7 @@ CONSTANT.URL_TREE_NAME = {
SEND_MESSAGE: 'sendMessage.html', SEND_MESSAGE: 'sendMessage.html',
SETTING: 'accountSetting.html', SETTING: 'accountSetting.html',
PICKUP: 'pickup.html', PICKUP: 'pickup.html',
PDF_PRINT: 'pdfPrint.html',
}; };
CONSTANT.URL_TREE_PASS = { CONSTANT.URL_TREE_PASS = {
...@@ -40,6 +42,8 @@ CONSTANT.URL_TREE_PASS = { ...@@ -40,6 +42,8 @@ CONSTANT.URL_TREE_PASS = {
2: [CONSTANT.URL_TREE_NAME.DASHBOARD, CONSTANT.URL_TREE_NAME.PICKUP, CONSTANT.URL_TREE_NAME.REPORT_FORM], 2: [CONSTANT.URL_TREE_NAME.DASHBOARD, CONSTANT.URL_TREE_NAME.PICKUP, CONSTANT.URL_TREE_NAME.REPORT_FORM],
3: [CONSTANT.URL_TREE_NAME.DASHBOARD, CONSTANT.URL_TREE_NAME.MESSAGE_LIST, CONSTANT.URL_TREE_NAME.MESSAGE_DETAIL], 3: [CONSTANT.URL_TREE_NAME.DASHBOARD, CONSTANT.URL_TREE_NAME.MESSAGE_LIST, CONSTANT.URL_TREE_NAME.MESSAGE_DETAIL],
4: [CONSTANT.URL_TREE_NAME.DASHBOARD, CONSTANT.URL_TREE_NAME.SEND_MESSAGE], 4: [CONSTANT.URL_TREE_NAME.DASHBOARD, CONSTANT.URL_TREE_NAME.SEND_MESSAGE],
5: [CONSTANT.URL_TREE_NAME.OPERATION_LIST, CONSTANT.URL_TREE_NAME.REPORT_LIST, CONSTANT.URL_TREE_NAME.REPORT_FORM],
6: [CONSTANT.URL_TREE_NAME.OPERATION_LIST, CONSTANT.URL_TREE_NAME.REPORT_LIST, CONSTANT.URL_TREE_NAME.PDF_PRINT],
}; };
CONSTANT.PAGE_TAB = { CONSTANT.PAGE_TAB = {
......
...@@ -21,59 +21,82 @@ HEADER.init = function () { ...@@ -21,59 +21,82 @@ HEADER.init = function () {
*/ */
HEADER.urlTree = function () { HEADER.urlTree = function () {
const pathName = location.pathname; const pathName = location.pathname;
const htmlName = pathName.substring(pathName.indexOf('/') + 1); const htmlName = pathName.substring(pathName.lastIndexOf('/') + 1);
console.log("htmlName : " + htmlName);
//now url tree
let urlTree = session.getItem('urlTree');
// check auth // check auth
let authFlg = false; let authFlg = false;
if ((!urlTree && htmlName == CONSTANT.URL_TREE_NAME.OPERATION_LIST) || htmlName == CONSTANT.URL_TREE_NAME.DASHBOARD) { if ((htmlName == CONSTANT.URL_TREE_NAME.OPERATION_LIST) || (htmlName == CONSTANT.URL_TREE_NAME.DASHBOARD)) {
authFlg = true; console.log("kdh check reset");
session.removeItem('urlTree'); authFlg = true;
} sessionStorage.urlTree = null;
urlList: for (const i in urlTree) { }
const urlHtmlName = urlTree[i].substring(0, pathName.indexOf('?')); //now url tree
findUrl: for (const passList in CONSTANT.URL_TREE_PASS) { const urlTree = sessionStorage.urlTree ? JSON.parse(sessionStorage.urlTree) : sessionStorage.urlTree;
for (const k in passList) { // return;
if (urlHtmlName == passList[k]) { console.log("urlTree : " + urlTree);
if (htmlName == passList[k]) { if (urlTree) {
urlList: for (var i=0; i<urlTree.length; i++) {
const urlHtmlUrl = urlTree[i].href;
const urlHtmlHref = urlHtmlUrl.includes('?') ? urlHtmlUrl.substring(0, urlHtmlUrl.indexOf('?')) : urlHtmlUrl;
for (var v in CONSTANT.URL_TREE_PASS) {
findUrl: for (var k in CONSTANT.URL_TREE_PASS[v]) {
if (urlHtmlHref == CONSTANT.URL_TREE_PASS[v][k]) {
if (htmlName == CONSTANT.URL_TREE_PASS[v][k]) {
authFlg = true;
break urlList;
}
continue;
} else if ((urlHtmlHref != CONSTANT.URL_TREE_PASS[v][k]) && (htmlName == CONSTANT.URL_TREE_PASS[v][k])) {
authFlg = true; authFlg = true;
break urlList; break urlList;
} else {
break findUrl;
} }
break;
} else {
break findUrl;
} }
} }
} }
} }
if (authFlg) { if (authFlg) {
session.removeItem('urlTree');
let newUrlTree = {};
const urlPath = htmlName + location.search; const urlPath = htmlName + location.search;
for (const i in urlTree) { let pageName = urlPath.substring(0, urlPath.indexOf(".html"));
const urlHtmlName = urlTree[i].substring(0, pathName.indexOf('?')); if (pageName == CONSTANT.URL.WEB.OPERATION_LIST) pageName = CONSTANT.PAGE_NAME.OPERATION_LIST;
if (urlHtmlName == htmlName) { let addReportFlg = "0"
newUrlTree.push(urlPath); if (urlPath.includes(CONSTANT.URL_TREE_NAME.REPORT_FORM) && urlPath.includes("addReport")) {
} else { addReportFlg = urlPath.substring(urlPath.indexOf("addReport=") + 10);
newUrlTree.push(urlTree[i]);
}
} }
session.setItem('urlTree', newUrlTree); let newUrlTree = [];
if (urlTree) {
//show urlTree let isAdd = false;
if ($('.breadcrumb').length) { for (var i = 0; i < urlTree.length; i++) {
for (const i in newUrlTree) { const sessionUrl = urlTree[i].href.includes('?') ? urlTree[i].href.substring(0, urlTree[i].href.indexOf('?')) : urlTree[i].href;
const urlHtmlName = newUrlTree[i].substring(0, pathName.indexOf('?')); const urlHtmlName = urlPath.includes('?') ? urlPath.substring(0, urlPath.indexOf('?')) : urlPath;
if (urlHtmlName == htmlName) { if (sessionUrl == urlHtmlName) {
$('.breadcrumb').append('<li class="breadcrumb-item">作業一覧</li>'); if (addReportFlg == "1") {
var nav = {titleLang : CONSTANT.PAGE_NAME.REPORT_LIST , href : CONSTANT.URL_TREE_NAME.REPORT_LIST};
newUrlTree.push(nav);
};
var nav = {titleLang : pageName , href : urlPath};
newUrlTree.push(nav);
isAdd = true;
break;
} else { } else {
$('.breadcrumb').append('<li class="breadcrumb-item"><a href="task-list.html" class="text-decoration-none text-underline">作業一覧</a></li>'); newUrlTree.push(urlTree[i]);
} };
};
if (!isAdd) {
const nav = {titleLang : pageName , href : urlPath};
newUrlTree.push(nav);
} }
} else {
const nav = {titleLang : pageName , href : urlPath};
newUrlTree.push(nav);
} }
sessionStorage.urlTree = JSON.stringify(newUrlTree);
} else { } else {
COMMON.avwScreenMove('index.html'); COMMON.avwScreenMove('index.html');
} }
...@@ -81,7 +104,6 @@ HEADER.urlTree = function () { ...@@ -81,7 +104,6 @@ HEADER.urlTree = function () {
HEADER.init = function() { HEADER.init = function() {
$("#dspLoginId").text(ClientData.userInfo_loginId()); $("#dspLoginId").text(ClientData.userInfo_loginId());
HEADER.urlTree();
}; };
HEADER.initLogout = function() { HEADER.initLogout = function() {
...@@ -91,131 +113,6 @@ HEADER.urlTree = function () { ...@@ -91,131 +113,6 @@ HEADER.urlTree = function () {
/** /**
* create url tree & show breadcrumbs list * create url tree & show breadcrumbs list
*/ */
<<<<<<< HEAD
HEADER.urlTree = function () {
const pathName = location.pathname;
const htmlName = pathName.substring(pathName.indexOf('/') + 1);
console.log("kdh check pathName : " + pathName);
console.log("kdh check htmlName : " + htmlName);
//now url tree
let urlTree = sessionStorage.getItem('urlTree');
console.log("kdh check urlTree : " + urlTree);
// check auth
let authFlg = false;
if ((!urlTree && htmlName == CONSTANT.URL_TREE_NAME.OPERATION_LIST) || htmlName == CONSTANT.URL_TREE_NAME.DASHBOARD) {
authFlg = true;
session.removeItem('urlTree');
}
// urlList: for (const i in urlTree) {
// const urlHtmlName = urlTree[i].substring(0, pathName.indexOf('?'));
// findUrl: for (const passList in CONSTANT.URL_TREE_PASS) {
// for (const k in passList) {
// if (urlHtmlName == passList[k]) {
// if (htmlName == passList[k]) {
// authFlg = true;
// break urlList;
// }
// break;
// } else {
// break findUrl;
// }
// }
// }
// }
// return ;
// if (authFlg) {
// session.removeItem('urlTree');
// let newUrlTree = {};
// const urlPath = htmlName + location.search;
// for (const i in urlTree) {
// const urlHtmlName = urlTree[i].substring(0, pathName.indexOf('?'));
// if (urlHtmlName == htmlName) {
// newUrlTree.push(urlPath);
// } else {
// newUrlTree.push(urlTree[i]);
// }
// }
// session.setItem('urlTree', newUrlTree);
// //show urlTree
// if ($('.breadcrumb').length) {
// for (const i in newUrlTree) {
// const urlHtmlName = newUrlTree[i].substring(0, pathName.indexOf('?'));
// if (urlHtmlName == htmlName) {
// $('.breadcrumb').append('<li class="breadcrumb-item">作業一覧</li>');
// } else {
// $('.breadcrumb').append('<li class="breadcrumb-item"><a href="task-list.html" class="text-decoration-none text-underline">作業一覧</a></li>');
// }
// }
// }
// } else {
// COMMON.avwScreenMove('index.html');
// }
};
/** Direct home page setting */
HEADER.goToHomePage = function (pageId) {
DashboardSetting.getSettingData(function (settings) {
if(settings.dashboardHome == 1)
{
sessionStorage.activeHomePage = CONSTANT.PAGE_NAME.DASHBOARD;
HEADER.goDashboard();
}
else
{
sessionStorage.activeHomePage = CONSTANT.PAGE_TAB.OPERATION_LIST;
HEADER.goOperationList();
}
});
}
HEADER.logoutFunction = function() {
console.log("clicked logout");
$("#msgModel").text(I18N.i18nText('msgLogoutConfirm'));
$("#confirmYes").click(HEADER.processLogout);
}
HEADER.processLogout = function() {
var params = {
sid: ClientData.userInfo_sid()
};
const url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.API.LOGOUT;
COMMON.cmsAjax(url, params, false,
function (data) {
if (data.httpStatus == CONSTANT.HTTP_STATUS.OK) {
SessionStorageUtils.clear();
COMMON.userSetting().remove(CONSTANT.KEYS.userInfo_sid);
COMMON.userSetting().remove(CONSTANT.KEYS.userInfo_sid_local);
// Move to login screen
//window.location = COMMON.ScreenIds.Login;
COMMON.goUrlWithCurrentParams(CONSTANT.PAGE_NAME.LOGIN);
} else {
if (data.errorMessage) {
COMMON.displayAlert(data.errorMessage);
} else {
COMMON.displayAlert("errorOccured");
}
}
},
function (xmlHttpRequest, txtStatus, errorThrown) {
if(xmlHttpRequest.errorMessage) {
COMMON.displayAlert(xmlHttpRequest.errorMessage);
} else {
COMMON.displayAlert("errorOccured");
}
});
}
/**
* Go page of operationList
*/
HEADER.goOperationList = function () {
=======
HEADER.goToHomePage = function (pageId) { HEADER.goToHomePage = function (pageId) {
DashboardSetting.getSettingData(function (settings) { DashboardSetting.getSettingData(function (settings) {
if (settings.dashboardHome == 1) { if (settings.dashboardHome == 1) {
...@@ -278,8 +175,6 @@ HEADER.processLogout = function () { ...@@ -278,8 +175,6 @@ HEADER.processLogout = function () {
* Go page of operationList * Go page of operationList
*/ */
HEADER.goOperationList = function () { HEADER.goOperationList = function () {
sessionStorage.activeTab = CONSTANT.PAGE_TAB.OPERATION_LIST;
>>>>>>> feature/1.0_check_web_dev
OL.init(); OL.init();
}; };
...@@ -287,7 +182,6 @@ HEADER.goOperationList = function () { ...@@ -287,7 +182,6 @@ HEADER.goOperationList = function () {
* 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");
}; };
......
...@@ -55,14 +55,14 @@ ...@@ -55,14 +55,14 @@
"communication":"Communication", "communication":"Communication",
"workList":"Work list", "workList":"Work list",
"profile":"Profile", "profile":"Profile",
"account_setting":"Account setting", "accountSetting":"Account setting",
"newRegistrationTitle":"New Registration", "newRegistrationTitle":"New Registration",
"continousWorkTitle":"Continous Work", "continousWorkTitle":"Continous Work",
"processWorkTitle":"Process work", "processWorkTitle":"Process work",
"reportWarningTitle":"Report With Warnings", "reportWarningTitle":"Report With Warnings",
"workWithWarningsTitle":"Work with warnings", "workWithWarningsTitle":"Work with warnings",
"messageListTitle":"Message List", "pushMessageList":"Message List",
"sendMessageTitle":"Send Message", "sendMessage":"Send Message",
"distanceSupportTitle":"Distance Support", "distanceSupportTitle":"Distance Support",
"chatTitle":"Chat", "chatTitle":"Chat",
"makeDashboardAsHome":"Set dashboard to home screen", "makeDashboardAsHome":"Set dashboard to home screen",
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
"confirmYes":"Yes", "confirmYes":"Yes",
"confirmNo":"No", "confirmNo":"No",
"messageListEmpty":"No Messages", "messageListEmpty":"No Messages",
"messageDetail":"Message Details", "pushMessageDetail":"Message Details",
"operationName":"Operation Name", "operationName":"Operation Name",
"sendDate":"Send Date", "sendDate":"Send Date",
"sender":"Sender", "sender":"Sender",
......
...@@ -53,14 +53,14 @@ ...@@ -53,14 +53,14 @@
"communication":"コミュニケーション", "communication":"コミュニケーション",
"workList":"作業一覧", "workList":"作業一覧",
"profile":"プロフィール", "profile":"プロフィール",
"account_setting":"アカウント設定", "accountSetting":"アカウント設定",
"newRegistrationTitle":"新規報告", "newRegistrationTitle":"新規報告",
"continousWorkTitle":"工程管理", "continousWorkTitle":"工程管理",
"processWorkTitle":"工程作業", "processWorkTitle":"工程作業",
"reportWarningTitle":"警告を含む報告", "reportWarningTitle":"警告を含む報告",
"workWithWarningsTitle":"警告を含む作業", "workWithWarningsTitle":"警告を含む作業",
"messageListTitle":"メッセージ一覧", "pushMessageList":"メッセージ一覧",
"sendMessageTitle":"メッセージ送信", "sendMessage":"メッセージ送信",
"distanceSupportTitle":"遠隔支援", "distanceSupportTitle":"遠隔支援",
"chatTitle":"チャット", "chatTitle":"チャット",
"makeDashboardAsHome":"ダッシュボードをホーム画面にする", "makeDashboardAsHome":"ダッシュボードをホーム画面にする",
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
"confirmYes":"はい", "confirmYes":"はい",
"confirmNo":"いいえ", "confirmNo":"いいえ",
"messageListEmpty":"メッセージがありません。", "messageListEmpty":"メッセージがありません。",
"messageDetail":"メッセージ詳細", "pushMessageDetail":"メッセージ詳細",
"operationName":"作業名", "operationName":"作業名",
"sendDate":"送信日時", "sendDate":"送信日時",
"sender":"送信者", "sender":"送信者",
......
...@@ -52,14 +52,14 @@ ...@@ -52,14 +52,14 @@
"communication":"커뮤니케이션", "communication":"커뮤니케이션",
"workList":"작업 일람", "workList":"작업 일람",
"profile":"프로필", "profile":"프로필",
"account_setting":"계정 설정", "accountSetting":"계정 설정",
"newRegistrationTitle":"신규 등록", "newRegistrationTitle":"신규 등록",
"continousWorkTitle":"정기점검", "continousWorkTitle":"정기점검",
"processWorkTitle":"공정관리", "processWorkTitle":"공정관리",
"reportWarningTitle":"경고를 포함한 보고", "reportWarningTitle":"경고를 포함한 보고",
"workWithWarningsTitle":"경고를 포함한 작업", "workWithWarningsTitle":"경고를 포함한 작업",
"messageListTitle":"메시지 일람", "pushMessageList":"메시지 일람",
"sendMessageTitle":"메시지 송신", "sendMessage":"메시지 송신",
"distanceSupportTitle":"원격 지원", "distanceSupportTitle":"원격 지원",
"chatTitle":"채팅", "chatTitle":"채팅",
"makeDashboardAsHome":"대시보드를 홈화면으로 지정", "makeDashboardAsHome":"대시보드를 홈화면으로 지정",
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
"confirmYes":"예", "confirmYes":"예",
"confirmNo":"아니오", "confirmNo":"아니오",
"messageListEmpty":"표시할 메시지가 없습니다.", "messageListEmpty":"표시할 메시지가 없습니다.",
"messageDetail":"메시지 상세", "pushMessageDetail":"메시지 상세",
"operationName":"작업명", "operationName":"작업명",
"sendDate":"송신일시", "sendDate":"송신일시",
"sender":"송신자", "sender":"송신자",
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"> <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<title class="lang" lang="account_setting"></title> <title class="lang" lang="accountSetting"></title>
<!-- favicons --> <!-- favicons -->
<link href="../common/img/favicon.ico" rel="icon"> <link href="../common/img/favicon.ico" rel="icon">
<link href="../common/img/apple-touch-icon.png" rel="apple-touch-icon"> <link href="../common/img/apple-touch-icon.png" rel="apple-touch-icon">
...@@ -36,13 +36,13 @@ ...@@ -36,13 +36,13 @@
<div class="container-wrap"> <div class="container-wrap">
<!-- title --> <!-- title -->
<div id="includedMainTitle"></div> <div id="includedMainTitle"></div>
<h1 class="fs-14 font-weight-bold pt-4 pb-3 mb-0 lang" lang="account_setting"></h1> <h1 class="fs-14 font-weight-bold pt-4 pb-3 mb-0 lang" lang="accountSetting"></h1>
<!-- content --> <!-- content -->
<div class="row"> <div class="row">
<div class="col-md-6 col-12 mb-4"> <div class="col-md-6 col-12 mb-4">
<div class="card p-4"> <div class="card p-4">
<h2 class="fs-10 font-weight-bold mb-3 lang" lang="account_setting"></h2> <h2 class="fs-10 font-weight-bold mb-3 lang" lang="accountSetting"></h2>
<table> <table>
<colgroup> <colgroup>
<col span="1" class="w-120px"> <col span="1" class="w-120px">
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
<script type="text/javascript" src="../common/js/jquery/jquery-ui.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/i18n.js?__UPDATEID__"></script> <script type="text/javascript" src="../common/js/i18n.js?__UPDATEID__"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.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>
<script src="../common/js/constant.js?__UPDATEID__"></script> <script src="../common/js/constant.js?__UPDATEID__"></script>
...@@ -58,7 +57,7 @@ ...@@ -58,7 +57,7 @@
</div> </div>
<!-- ↓↓↓ ここから共通HTML ↓↓↓ --> <!-- ↓↓↓ ここから共通HTML ↓↓↓ -->
<div class="container-wrap mb-5" id="pdfPrint" ></div> <div class="container-wrap mb-5" id="pdfPrintDiv" ></div>
<!-- confirm --> <!-- confirm -->
<div id="includedConfirmModal"></div> <div id="includedConfirmModal"></div>
......
...@@ -31,8 +31,7 @@ ...@@ -31,8 +31,7 @@
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.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>
<script type="text/javascript" src="../js/topPage/topPage.js?__UPDATEID__"></script> <script type="text/javascript" src="../js/pickup/pickup.js?__UPDATEID__"></script>
<script type="text/javascript" src="../js/pickup/pickup.js"></script>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function(){ $(document).ready(function(){
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"> <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<title class="lang" lang="messageDetail"></title> <title class="lang" lang="pushMessageDetail"></title>
<!-- favicons --> <!-- favicons -->
<link href="../common/img/favicon.ico" rel="icon"> <link href="../common/img/favicon.ico" rel="icon">
<link href="../common/img/apple-touch-icon.png" rel="apple-touch-icon"> <link href="../common/img/apple-touch-icon.png" rel="apple-touch-icon">
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"> <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<title class="lang" lang="messageListTitle"></title> <title class="lang" lang="pushMessageList"></title>
<!-- favicons --> <!-- favicons -->
<link href="../common/img/favicon.ico" rel="icon"> <link href="../common/img/favicon.ico" rel="icon">
<link href="../common/img/apple-touch-icon.png" rel="apple-touch-icon"> <link href="../common/img/apple-touch-icon.png" rel="apple-touch-icon">
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title class="lang" lang="sendMessageTitle"></title> <title class="lang" lang="sendMessage"></title>
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"> <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<!-- favicons --> <!-- favicons -->
<link href="../common/img/favicon.ico" rel="icon"> <link href="../common/img/favicon.ico" rel="icon">
......
...@@ -13,8 +13,8 @@ DASHBOARD.pickupItems = [ ...@@ -13,8 +13,8 @@ DASHBOARD.pickupItems = [
/** comunication dashboard configuration */ /** comunication dashboard configuration */
DASHBOARD.communicationItems = [ DASHBOARD.communicationItems = [
{ id: 'messageList', href: 'javascript:DASHBOARD.goMessageList();', count: 0, enabled: true, img: { src: '../common/img/dahboard_icon_message_list.svg' }, msg: 'messageListTitle' }, { id: 'messageList', href: 'javascript:DASHBOARD.goMessageList();', count: 0, enabled: true, img: { src: '../common/img/dahboard_icon_message_list.svg' }, msg: 'pushMessageList' },
{ id: 'sendMessage', href: 'javascript:DASHBOARD.goSendMessage();', count: 0, enabled: true, img: { src: '../common/img/dahboard_icon_send_message.svg' }, msg: 'sendMessageTitle' }, { id: 'sendMessage', href: 'javascript:DASHBOARD.goSendMessage();', count: 0, enabled: true, img: { src: '../common/img/dahboard_icon_send_message.svg' }, msg: 'sendMessage' },
]; ];
/** Default dashboard setting data */ /** Default dashboard setting data */
......
...@@ -22,11 +22,11 @@ OL.operationGroupMasterId; ...@@ -22,11 +22,11 @@ OL.operationGroupMasterId;
*/ */
OL.init = function () { OL.init = function () {
console.log('OperationList start'); console.log('OperationList start');
sessionStorage.activeHomePage = CONSTANT.PAGE_TAB.OPERATION_LIST;
TEMPLATE.loadHeader('#includedHeader'); TEMPLATE.loadHeader('#includedHeader');
TEMPLATE.loadMainNavsTitle('#includedMainTitle', 'workList', null, null);
TEMPLATE.loadMainNavsTitle('#includedMainTitle', 'workList', true, null);
TEMPLATE.loadConfirmModal('#includedConfirmModal'); TEMPLATE.loadConfirmModal('#includedConfirmModal');
//get all data of operation list scene //get all data of operation list scene
OL.getAllDataWeb(sessionStorage.OL_searchKeyWord, sessionStorage.OL_sortIndex, sessionStorage.OL_searchStartDate, sessionStorage.OL_searchEndDate, sessionStorage.OL_operationGroupMasterId); OL.getAllDataWeb(sessionStorage.OL_searchKeyWord, sessionStorage.OL_sortIndex, sessionStorage.OL_searchStartDate, sessionStorage.OL_searchEndDate, sessionStorage.OL_operationGroupMasterId);
...@@ -316,7 +316,7 @@ OL.createCategoryList = function () { ...@@ -316,7 +316,7 @@ OL.createCategoryList = function () {
//create category(operationGroupMaster) structure //create category(operationGroupMaster) structure
for (let i = 0; i < OL.operationGroupMaster.length; i++) { for (let i = 0; i < OL.operationGroupMaster.length; i++) {
const item = OL.operationGroupMaster[i]; const item = OL.operationGroupMaster[i];
console.log(item); // console.log(item);
let inputLabel = $('<label>'); let inputLabel = $('<label>');
let inputRadio = $('<input type="radio" name="category">'); let inputRadio = $('<input type="radio" name="category">');
inputRadio.val(item.operationGroupMasterId); inputRadio.val(item.operationGroupMasterId);
...@@ -503,9 +503,6 @@ OL.resetSearch = function () { ...@@ -503,9 +503,6 @@ OL.resetSearch = function () {
OL.sendOperation = function (operationId, operationType, reportType, enableAddReport) { OL.sendOperation = function (operationId, operationType, reportType, enableAddReport) {
//save operation logs. needed for sorting //save operation logs. needed for sorting
OL.saveOperationReadingLog(operationId, operationType, reportType); OL.saveOperationReadingLog(operationId, operationType, reportType);
const urlTree = { titleLang: CONSTANT.URL_TREE_NAME.OPERATION_LIST };
sessionStorage.setItem('urlTree', { titleLang: CONSTANT.URL_TREE_NAME.OPERATION_LIST });
sessionStorage.setItem('nameTree', {CONSTANT.PAGE_NAME.OPERATION_LIST});
//Transition to the report form or operation list screen //Transition to the report form or operation list screen
if (enableAddReport == '1' || reportType == CONSTANT.REPORT_TYPE.ROUTINE) { if (enableAddReport == '1' || reportType == CONSTANT.REPORT_TYPE.ROUTINE) {
sessionStorage.OL_operationId = operationId; sessionStorage.OL_operationId = operationId;
......
...@@ -27,7 +27,7 @@ PP.init = function () { ...@@ -27,7 +27,7 @@ PP.init = function () {
PP.loadCommon = function () { PP.loadCommon = function () {
TEMPLATE.loadHeader('#includedHeader'); TEMPLATE.loadHeader('#includedHeader');
TEMPLATE.loadConfirmModal('#includedConfirmModal'); TEMPLATE.loadConfirmModal('#includedConfirmModal');
TEMPLATE.loadMainNavsTitle('#includedMainTitle', 'pdfPrint', navs, null); TEMPLATE.loadMainNavsTitle('#includedMainTitle', 'pdfPrint', true, null);
}; };
/** /**
...@@ -40,7 +40,7 @@ PP.initPdfList = function () { ...@@ -40,7 +40,7 @@ PP.initPdfList = function () {
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); $('#pdfPrintDiv').load(url, params);
} else { } else {
COMMON.displayAlert('error'); COMMON.displayAlert('error');
COMMON.avwScreenMove('reportList.html'); COMMON.avwScreenMove('reportList.html');
......
...@@ -139,16 +139,7 @@ PICKUP.init = function () { ...@@ -139,16 +139,7 @@ PICKUP.init = function () {
sessionStorage.activeHomePage = CONSTANT.PAGE_TAB.DASHBOARD; sessionStorage.activeHomePage = CONSTANT.PAGE_TAB.DASHBOARD;
TEMPLATE.loadHeader('#includedHeader'); TEMPLATE.loadHeader('#includedHeader');
TEMPLATE.loadConfirmModal('#includedConfirmModal'); TEMPLATE.loadConfirmModal('#includedConfirmModal');
const navs = [ TEMPLATE.loadMainNavsTitle('#includedMainTitle', 'pickup', true, null);
{
titleLang: 'dashboard',
href: 'dashboard.html',
},
{
titleLang: 'pickup',
},
];
TEMPLATE.loadMainNavsTitle('#includedMainTitle', 'pickup', navs, null);
PICKUP.initSettingActivePickup(); PICKUP.initSettingActivePickup();
PICKUP.settingPickup(); PICKUP.settingPickup();
COMMON.closeLoading(); COMMON.closeLoading();
...@@ -324,7 +315,7 @@ PICKUP.createNewReportList = function (operationListOld) { ...@@ -324,7 +315,7 @@ PICKUP.createNewReportList = function (operationListOld) {
} }
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="javascript:PICKUP.sendReportFormFromNewReport (\'' + operationList[i].operationId + "');\" class='h-100 d-block px-3 py-2 text-decoration-none text-dark position-relative'></a>", '<a href="javascript:PICKUP.sendReportFormFromNewReport (\'' + operationList[i].operationId + "," + operationList[i].addReport + "');\" class='h-100 d-block px-3 py-2 text-decoration-none text-dark position-relative'></a>",
); );
let divIcon = $("<div class='position-absolute translate-middle top-50 left-0 ml-3'>" + "<div class='type-icon'>" + "<span class='" + classIcon + "'></span>" + '</div></div>'); let divIcon = $("<div class='position-absolute translate-middle top-50 left-0 ml-3'>" + "<div class='type-icon'>" + "<span class='" + classIcon + "'></span>" + '</div></div>');
...@@ -745,9 +736,9 @@ PICKUP.getInspectDate = function (dateString) { ...@@ -745,9 +736,9 @@ PICKUP.getInspectDate = function (dateString) {
* @param operarionId * @param operarionId
* @returns * @returns
*/ */
PICKUP.sendReportFormFromNewReport = function (operationId) { PICKUP.sendReportFormFromNewReport = function (operationId, addReport) {
//Transition to the report form or operation list screen //Transition to the report form or operation list screen
const url = 'reportForm.html?operationId=' + operationId; const url = 'reportForm.html?operationId=' + operationId + "&addReport=" + addReport;
COMMON.avwScreenMove(url); COMMON.avwScreenMove(url);
}; };
......
...@@ -26,20 +26,7 @@ PushMessageDetail.init = function () { ...@@ -26,20 +26,7 @@ PushMessageDetail.init = function () {
COMMON.checkAuth(false); COMMON.checkAuth(false);
//load common html //load common html
TEMPLATE.loadHeader('#includedHeader'); TEMPLATE.loadHeader('#includedHeader');
const navs = [ TEMPLATE.loadMainNavsTitle('#includedMainTitle', 'messageDetail', true, null);
{
titleLang: 'dashboard',
href: 'dashboard.html',
},
{
titleLang: 'messageListTitle',
href: 'pushMessageList.html',
},
{
titleLang: 'messageDetail',
},
];
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') {
......
...@@ -12,16 +12,7 @@ PushMessageList.init = function () { ...@@ -12,16 +12,7 @@ PushMessageList.init = function () {
//Check if user is logged in //Check if user is logged in
COMMON.checkAuth(false); COMMON.checkAuth(false);
TEMPLATE.loadHeader('#includedHeader'); TEMPLATE.loadHeader('#includedHeader');
const navs = [ TEMPLATE.loadMainNavsTitle('#includedMainTitle', 'pushMessageList', true, null);
{
titleLang: 'dashboard',
href: 'dashboard.html',
},
{
titleLang: 'messageListTitle',
},
];
TEMPLATE.loadMainNavsTitle('#includedMainTitle', 'messageListTitle', navs, null);
PushMessageList.getMessageList(function (messageList) { PushMessageList.getMessageList(function (messageList) {
PushMessageList.generateMessageListHtml(messageList.pushMessageList); PushMessageList.generateMessageListHtml(messageList.pushMessageList);
}); });
......
...@@ -25,30 +25,7 @@ RL.init = function () { ...@@ -25,30 +25,7 @@ RL.init = function () {
RL.loadCommon = function () { RL.loadCommon = function () {
TEMPLATE.loadHeader('#includedHeader'); TEMPLATE.loadHeader('#includedHeader');
TEMPLATE.loadConfirmModal('#includedConfirmModal'); TEMPLATE.loadConfirmModal('#includedConfirmModal');
TEMPLATE.loadMainNavsTitle('#includedMainTitle', 'reportList', true, RL.loadMainTitleCallback);
let urlTree = sessionStorage.getItem('urlTree');
let nameTree = sessionStorage.getItem('nameTree');
console.log("kdh check urlTree : " + urlTree);
console.log("kdh check nameTree : " + nameTree);
// const navs = [
// {
// titleLang: 'dashboard',
// href: 'dashboard.html',
// },
// {
// titleLang: 'pickup',
// },
// ];
const navs = [];
if (urlTree) {
for (var i = 0; i < urlTree.length; i++) {
navs[i] = { titleLang: nameTree[i], href: urlTree[i]}
}
}
navs[navs.length - 1] = {titleLang: "reportList"};
console.log("kdh check navs : " + navs);
TEMPLATE.loadMainNavsTitle('#includedMainTitle', 'reportList', navs, RL.loadMainTitleCallback);
}; };
RL.isQuickReport; RL.isQuickReport;
......
...@@ -121,16 +121,7 @@ SendMessage.init = function () { ...@@ -121,16 +121,7 @@ SendMessage.init = function () {
//Check if user is logged in //Check if user is logged in
COMMON.checkAuth(false); COMMON.checkAuth(false);
TEMPLATE.loadHeader('#includedHeader'); TEMPLATE.loadHeader('#includedHeader');
const navs = [ TEMPLATE.loadMainNavsTitle('#includedMainTitle', 'sendMessage', true, null);
{
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);
$('#messageContent').attr('maxlength', SendMessage.contentMaxLength); $('#messageContent').attr('maxlength', SendMessage.contentMaxLength);
......
...@@ -150,16 +150,7 @@ SETTINGS.getNewPasswordRe = function () { ...@@ -150,16 +150,7 @@ SETTINGS.getNewPasswordRe = function () {
SETTINGS.initScreen = function () { SETTINGS.initScreen = function () {
TEMPLATE.loadHeader('#includedHeader'); TEMPLATE.loadHeader('#includedHeader');
TEMPLATE.loadConfirmModal('#includedConfirmModal'); TEMPLATE.loadConfirmModal('#includedConfirmModal');
const navs = [ TEMPLATE.loadMainNavsTitle('#includedMainTitle', 'accountSetting', true, null);
{
titleLang: 'txtTooltipBack',
href: 'javascript:history.back();',
},
{
titleLang: 'account_setting',
},
];
TEMPLATE.loadMainNavsTitle('#includedMainTitle', '', navs, null);
// Login ID // Login ID
$('#txtLoginId').text(ClientData.userInfo_loginId_session()); $('#txtLoginId').text(ClientData.userInfo_loginId_session());
// Account Path // Account Path
......
...@@ -9,7 +9,7 @@ TEMPLATE.loadHeader = function (elmentId) { ...@@ -9,7 +9,7 @@ TEMPLATE.loadHeader = function (elmentId) {
$(elmentId).load('../common/html/header.html', function () { $(elmentId).load('../common/html/header.html', function () {
$('#iconHomeDashboard').removeClass('active'); $('#iconHomeDashboard').removeClass('active');
$('#iconHomeWorkList').removeClass('active'); $('#iconHomeWorkList').removeClass('active');
if (sessionStorage.activeHomePage == CONSTANT.PAGE_NAME.OPERATION_LIST) { if (sessionStorage.activeHomePage == CONSTANT.PAGE_TAB.OPERATION_LIST) {
$('#iconHomeWorkList').addClass('active'); $('#iconHomeWorkList').addClass('active');
} else { } else {
$('#iconHomeDashboard').addClass('active'); $('#iconHomeDashboard').addClass('active');
...@@ -81,22 +81,40 @@ TEMPLATE.loadNotificationSelect = function (elmentId, selectCallback) { ...@@ -81,22 +81,40 @@ 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, isNav, completeCallback) {
var titleHtmlPath = '../common/html/mainTitle.html'; var titleHtmlPath = '../common/html/mainTitle.html';
if (navs) {
HEADER.urlTree();
var navs;
if (isNav) {
titleHtmlPath = '../common/html/mainNavTitle.html'; titleHtmlPath = '../common/html/mainNavTitle.html';
navs = sessionStorage.urlTree ? JSON.parse(sessionStorage.urlTree) : null;
} }
$(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 (isNav) {
if (titleLang == "accountSetting") {
navs = [
{
titleLang: 'txtTooltipBack',
href: 'javascript:history.back();',
},
{
titleLang: 'accountSetting',
},
];
}
var olElm = $('#mainTitleNavs ol'); var olElm = $('#mainTitleNavs ol');
for (var i = 0; i < navs.length; i++) { for (var i = 0; i < navs.length; i++) {
const nav = navs[i]; const nav = navs[i];
console.log("kdh check nav titleLang : " + nav.titleLang);
console.log("kdh check nav[href] : " + nav.href);
var liElm = $('<li class="breadcrumb-item" />'); var liElm = $('<li class="breadcrumb-item" />');
if (nav.href) { if (nav.href && i != navs.length -1) {
var aElm = $('<a class="text-decoration-none text-underline lang" />'); var aElm = $('<a class="text-decoration-none text-underline lang" />');
aElm.attr('href', nav.href); aElm.attr('href', nav.href);
if (nav.titleLang) { if (nav.titleLang) {
......
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