60 lines
2.8 KiB
JavaScript
60 lines
2.8 KiB
JavaScript
$(document).ready(function () {
|
|
if (window.location.pathname == '/home') {
|
|
$("#RemoveMap").css('display', 'none');
|
|
$('#pageHome').addClass("active");
|
|
} else if (window.location.pathname == '/devices') {
|
|
$("#SidebarHide").css('display', 'none');
|
|
$("#RightSidebarHide").css('display', 'none');
|
|
$("#MainSectionFull").css('width', 'calc(100% - 0px)');
|
|
$("#MainSectionFull").css('margin', '0');
|
|
$('#pageDevice').addClass("active");
|
|
$('.searchInput').attr('placeholder', 'Search Device');
|
|
} else if (window.location.pathname == '/add') {
|
|
$("#SidebarHide").css('display', 'none');
|
|
$("#RightSidebarHide").css('display', 'none');
|
|
$("#MainSectionFull").css('width', 'calc(100% - 0px)');
|
|
$("#MainSectionFull").css('margin', '0');
|
|
$('#pageDevice').addClass("active");
|
|
$('.searchInput').attr('placeholder', 'Search Device');
|
|
} else if (window.location.pathname == '/ddos') {
|
|
$('#DDoS').addClass("active");
|
|
$("#SidebarHide").css('display', 'none');
|
|
$("#MainSectionFull").css('width', 'calc(100% - 205px)');
|
|
} else if (window.location.pathname == '/malware') {
|
|
$("#SidebarHide").css('display', 'none');
|
|
$("#MainSectionFull").css('width', 'calc(100% - 205px)');
|
|
$("#MainSectionFull").css('margin-left', '0');
|
|
$('#malware').addClass("active");
|
|
} else if (window.location.pathname == '/dma') {
|
|
$("#MainSectionFull").css('margin-left', '0');
|
|
$("#SidebarHide").css('display', 'none');
|
|
$("#MainSectionFull").css('width', 'calc(100% - 205px)');
|
|
$('#DMA').addClass("active");
|
|
} else if (window.location.pathname == '/ransomware') {
|
|
$("#MainSectionFull").css('margin-left', '0');
|
|
$("#SidebarHide").css('display', 'none');
|
|
$("#RemoveMapOtherTab").css('display', 'none');
|
|
$("#MainSectionFull").css('width', 'calc(100% - 0px)');
|
|
$('#ransomware').addClass("active");
|
|
} else if (window.location.pathname == '/profile') {
|
|
$("#MainSectionFull").css('margin-left', '0');
|
|
$(".searchSection").css('display', 'none');
|
|
$(".company-dashboard-title").css('display', 'none');
|
|
$(".topMapSection").css('display', 'none');
|
|
$("#RightSidebarHide").css('display', 'none');
|
|
$("#SidebarHide").css('display', 'none');
|
|
$("#RemoveMapOtherTab").css('display', 'none');
|
|
$("#MainSectionFull").css('width', 'calc(100% - 0px)');
|
|
}
|
|
});
|
|
|
|
const mapSectionMove = document.querySelector('.mapSectionMove');
|
|
const images = document.querySelectorAll('.mapSectionMove svg');
|
|
|
|
let currentIndex = 0;
|
|
|
|
function updateSlider() {
|
|
const offset = -currentIndex * images[0].clientWidth;
|
|
mapSectionMove.style.transform = `translateX(${offset}px)`;
|
|
}
|