This commit is contained in:
21
crm/main.js
21
crm/main.js
@ -46,10 +46,8 @@ const addCanonicalUrl = () => {
|
||||
};
|
||||
|
||||
const listUrl = [
|
||||
"/ru/haproxy-postgresql.html",
|
||||
"/ru/doc_template.docx",
|
||||
"/ru/platform-distribution.html",
|
||||
"/ru/help/platform/haproxy-postgresql.html",
|
||||
"/ru/help/platform/platform-distribution.html",
|
||||
"/ru/help/ecm/doc_template.docx",
|
||||
];
|
||||
@ -322,12 +320,12 @@ function prepareContent() {
|
||||
});
|
||||
}
|
||||
|
||||
const spans = document.querySelectorAll('span');
|
||||
const spans = document.querySelectorAll("span");
|
||||
if (spans.length) {
|
||||
spans.forEach(span => {
|
||||
if (span.innerHTML === ' ') {
|
||||
spans.forEach((span) => {
|
||||
if (span.innerHTML === " ") {
|
||||
span.remove();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -856,8 +854,6 @@ function getTitleSite() {
|
||||
}
|
||||
|
||||
// добавляет label, чтобы появились иконки поиска и очискти
|
||||
|
||||
const currentUrl = window.location.href;
|
||||
// Общие элементы
|
||||
const searchPanel = document.querySelector("#search-panel");
|
||||
const sidebar = document.querySelector("#sidebar");
|
||||
@ -893,15 +889,11 @@ document.addEventListener('click', (e) => {
|
||||
}
|
||||
|
||||
// Закрываем боковое меню, если клик был не по нему
|
||||
if (!e.target.closest("#sidebar") && sideMenu.classList.contains('show-side-menu')) {
|
||||
if (!e.target.closest("#sidebar") && sidebar.classList.contains('show-side-menu')) {
|
||||
sidebar.classList.remove('show-side-menu');
|
||||
}
|
||||
});
|
||||
|
||||
// Если есть кнопка закрытия внутри меню, можно добавить:
|
||||
document.querySelector('#close-side-menu')?.addEventListener('click', () => {
|
||||
document.querySelector("#side-menu").classList.remove('show-side-menu');
|
||||
});
|
||||
const currentUrl = window.location.href;
|
||||
|
||||
if (
|
||||
/elma365.com\/ru\/help/i.test(currentUrl) ||
|
||||
@ -919,7 +911,6 @@ if (
|
||||
if (searchIcon) {
|
||||
searchIcon.addEventListener("click", (evt) => {
|
||||
evt.preventDefault();
|
||||
searchPanel.classList.add("mobsearch")
|
||||
searchPanel.classList.toggle("show-search-panel");
|
||||
setTimeout(() => searchInput.focus(), 500);
|
||||
|
||||
|
Reference in New Issue
Block a user