Commit 7c0affd2 by NGUYEN HOANG SON

#49148 fix footer active tab

parent f0f4181e
......@@ -213,16 +213,16 @@
<script>
$(document).ready(function() {
$("#footer").load("main-footer.html", function() {
if (location.hash === '#dashboard') {
CHK_Footer.goDashboard();
} else if (location.hash === '#operationList') {
CHK_Footer.goOperationList();
} else {
if (!sessionStorage.activeTab) {
if (CHK.dashboardSetting.dashboardHome) {
CHK_Footer.goDashboard();
} else {
CHK_Footer.goOperationList();
}
} else if (sessionStorage.activeTab === 'dashboard') {
CHK_Footer.goDashboard();
} else if (sessionStorage.activeTab === 'operationList') {
CHK_Footer.goOperationList();
}
});
});
......
......@@ -49,8 +49,9 @@ CHK_Footer.isIndexPage = function() {
return false;
}
CHK_Footer.goIndexPage = function(param) {
var href = 'index.html' + param;
CHK_Footer.goIndexPage = function(tabId) {
var href = 'index.html';
sessionStorage.activeTab = tabId;
location.href = href;
}
......@@ -60,20 +61,22 @@ CHK_Footer.activeDashboardBottomNav = function() {
}
CHK_Footer.goDashboard = function() {
sessionStorage.activeTab = 'dashboard';
CHK_Footer.activeDashboardBottomNav();
if (CHK_Footer.isIndexPage()) {
CHK_Footer.showPage('dashboard');
return;
}
CHK_Footer.goIndexPage('#dashboard');
CHK_Footer.goIndexPage('dashboard');
}
CHK_Footer.goOperationList = function() {
sessionStorage.activeTab = 'operationList';
CHK_Footer.inactiveAllBottomNav();
CHK_Footer.activeBottomNav('operationListBottomNav');
if (CHK_Footer.isIndexPage()) {
CHK_Footer.showPage('operationList');
return;
}
CHK_Footer.goIndexPage('#operationList');
CHK_Footer.goIndexPage('operationList');
}
\ No newline at end of file
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