Commit f5a95910 by Kang Donghun

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

# Conflicts:
#	abweb/common/js/header.js
#	abweb/html/pushMessageList.html
parents 4c29f689 6387ec20
......@@ -6,9 +6,78 @@
*/
var HEADER = {};
$(function () {
COMMON.showLoading();
});
/**
* init
*/
HEADER.init = function () {
$('#dspLoginId').text(ClientData.userInfo_loginId());
$('#btnLogout').click(HEADER.logoutFunction);
};
/**
* create url tree & show breadcrumbs list
*/
HEADER.urlTree = function () {
const pathName = location.pathname;
const htmlName = pathName.substring(pathName.indexOf('/') + 1);
//now url tree
let urlTree = session.getItem('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;
}
}
}
}
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');
}
};
HEADER.init = function() {
$("#dspLoginId").text(ClientData.userInfo_loginId());
......@@ -22,6 +91,7 @@ $(function () {
/**
* create url tree & show breadcrumbs list
*/
<<<<<<< HEAD
HEADER.urlTree = function () {
const pathName = location.pathname;
const htmlName = pathName.substring(pathName.indexOf('/') + 1);
......@@ -145,6 +215,71 @@ HEADER.urlTree = function () {
* Go page of operationList
*/
HEADER.goOperationList = function () {
=======
HEADER.goToHomePage = function (pageId) {
DashboardSetting.getSettingData(function (settings) {
if (settings.dashboardHome == 1) {
HEADER.goDashboard();
} else {
HEADER.goOperationList();
}
});
};
/**
* logout function
*/
HEADER.logoutFunction = function () {
console.log('clicked logout');
$('#msgModel').text(I18N.i18nText('msgLogoutConfirm'));
$('#confirmYes').click(HEADER.processLogout);
};
/**
* process logout
*/
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 () {
sessionStorage.activeTab = CONSTANT.PAGE_TAB.OPERATION_LIST;
>>>>>>> feature/1.0_check_web_dev
OL.init();
};
......
......@@ -17,12 +17,12 @@
<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 src="https://cdn.jsdelivr.net/npm/gasparesganga-jquery-loading-overlay@2.1.7/dist/loadingoverlay.min.js"></script>
<script type="text/javascript" src="../common/js/i18n.js?__UPDATEID__"></script>
<script type="text/javascript" src="../common/js/header.js?__UPDATEID__"></script>
<script src="../common/js/constant.js?__UPDATEID__"></script>
<script src="../common/js/common.js?__UPDATEID__"></script>
<script src="../common/js/header.js?__UPDATEID__"></script>
<script type="text/javascript" src="../js/template/template.js"></script>
<script type="text/javascript" src="../js/pushMessageDetail/pushMessageDetail.js"></script>
<script type="text/javascript">
......
......@@ -17,6 +17,7 @@
<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 src="https://cdn.jsdelivr.net/npm/gasparesganga-jquery-loading-overlay@2.1.7/dist/loadingoverlay.min.js"></script>
<script type="text/javascript" src="../common/js/i18n.js?__UPDATEID__"></script>
<script type="text/javascript" src="../common/js/header.js?__UPDATEID__"></script>
<script type="text/javascript" src="../js/template/template.js"></script>
......
......@@ -17,11 +17,12 @@
<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 src="https://cdn.jsdelivr.net/npm/gasparesganga-jquery-loading-overlay@2.1.7/dist/loadingoverlay.min.js"></script>
<script type="text/javascript" src="../common/js/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 src="../common/js/header.js?__UPDATEID__"></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/template/template.js"></script>
<script src="../js/reportForm/reportForm.js?__UPDATEID__"></script>
</head>
......
......@@ -17,9 +17,10 @@
<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 src="https://cdn.jsdelivr.net/npm/gasparesganga-jquery-loading-overlay@2.1.7/dist/loadingoverlay.min.js"></script>
<script type="text/javascript" src="../common/js/i18n.js?__UPDATEID__"></script>
<script type="text/javascript" src="../common/js/validation.js?__UPDATEID__"></script>
<script type="text/javascript" src="../common/js/header.js?__UPDATEID__"></script>
<script src="../common/js/constant.js?__UPDATEID__"></script>
<script src="../common/js/common.js?__UPDATEID__"></script>
......
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