Commit 7b1ee577 by NGUYEN HOANG SON

fix go to index page when dashboard home enabled

parent 5cc1db79
......@@ -13,7 +13,7 @@
</a>
</li>
<li class="nav-link" id="iconHomeWorkList">
<a href="index.html" class="d-block text-center text-decoration-none">
<a href="index.html?pageId=workList" 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">
<div class="fs-7 d-sm-block d-none lang" lang="workList"></div>
</a>
......
......@@ -19,30 +19,13 @@ $(document).ready(function () {
* show page
*/
TOP.init = function () {
HEADER.goToHomePage();
COMMON.closeLoading();
};
/**
* Show page by arbitrary id
*
* @param {String} pageId
*/
TOP.showPage = function (pageId) {
//get data
if (pageId == CONSTANT.PAGE_NAME.OPERATION_LIST) {
OL.init();
} else if (pageId == CONSTANT.PAGE_NAME.DASHBOARD) {
CHK_Dashboard.init();
}
//show page
const pages = document.getElementsByClassName('page-content');
for (let i = 0; i < pages.length; i++) {
if (pages[i].id == pageId) {
pages[i].style.display = 'block';
const urlParameterList = COMMON.getUrlParameter();
if (urlParameterList && urlParameterList.pageId == CONSTANT.PAGE_NAME.OPERATION_LIST) {
//index with param page
HEADER.goOperationList();
} else {
pages[i].style.display = 'none';
}
//go homepage by dashboard setting
HEADER.goToHomePage();
}
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