main,js disable

This commit is contained in:
Dr Masroor Ehsan 2025-01-05 12:44:25 +06:00
parent 855fb76d7e
commit 8069d5b81d

View File

@ -16,6 +16,7 @@ if (document.getElementById('layout-menu')) {
(function () {
// Button & Pagination Waves effect
/*
if (typeof Waves !== 'undefined') {
Waves.init();
Waves.attach(
@ -57,6 +58,7 @@ if (document.getElementById('layout-menu')) {
setTimeout(function () {
window.Helpers.initCustomOptionCheck();
}, 1000);
*/
// Initialize menu
//-----------------
@ -102,6 +104,8 @@ if (document.getElementById('layout-menu')) {
});
});
/*
// Menu swipe gesture
// Detect swipe gesture on the target element and call swipe In
@ -126,7 +130,7 @@ if (document.getElementById('layout-menu')) {
}
});
}
*/
// Update light/dark image based on current style
function switchImage(style) {
if (style === 'system') {
@ -202,7 +206,7 @@ if (document.getElementById('layout-menu')) {
}
// Run switchImage function based on the stored style
switchImage(storedStyle);
/*
let languageDropdown = document.getElementsByClassName('dropdown-language');
if (languageDropdown.length) {
@ -239,9 +243,11 @@ if (document.getElementById('layout-menu')) {
};
}
}, 1500);
*/
// Notification
// ------------
/*
const notificationMarkAsReadAll = document.querySelector('.dropdown-notifications-all');
const notificationMarkAsReadList = document.querySelectorAll('.dropdown-notifications-read');
@ -269,7 +275,7 @@ if (document.getElementById('layout-menu')) {
item.closest('.dropdown-notifications-item').remove();
});
});
*/
// Init helpers & misc
// --------------------
@ -279,6 +285,7 @@ if (document.getElementById('layout-menu')) {
return new bootstrap.Tooltip(tooltipTriggerEl);
});
/*
// Accordion active class
const accordionActiveFunction = function (e) {
if (e.type == 'show.bs.collapse' || e.type == 'show.bs.collapse') {
@ -300,13 +307,14 @@ if (document.getElementById('layout-menu')) {
// if (isRtl) {
// Helpers._addClass('dropdown-menu-end', document.querySelectorAll('#layout-navbar .dropdown-menu'));
// }
*/
// Auto update layout based on screen size
window.Helpers.setAutoUpdate(true);
// Toggle Password Visibility
window.Helpers.initPasswordToggle();
/*
// Speech To Text
window.Helpers.initSpeechToText();
@ -316,6 +324,8 @@ if (document.getElementById('layout-menu')) {
// Init PerfectScrollbar in Navbar Dropdown (i.e notification)
window.Helpers.initNavbarDropdownScrollbar();
*/
let horizontalMenuTemplate = document.querySelector("[data-template^='horizontal-menu']");
if (horizontalMenuTemplate) {
// if screen size is small then set navbar fixed
@ -402,6 +412,7 @@ if (document.getElementById('layout-menu')) {
})();
// ! Removed following code if you do't wish to use jQuery. Remember that navbar search functionality will stop working on removal.
/*
if (typeof $ !== 'undefined') {
$(function () {
// ! TODO: Required to load after DOM is ready, did this now with jQuery ready.
@ -660,3 +671,4 @@ if (typeof $ !== 'undefined') {
}
});
}
*/