update
All checks were successful
Deploy Static Site / deploy (push) Successful in 7m28s

This commit is contained in:
2025-07-31 12:12:30 +04:00
parent 59666a8be8
commit e2aad01d1c
133 changed files with 2034 additions and 1912 deletions

View File

@ -1,14 +1,15 @@
 var currentLocalHref = window.location.href,
var currentLocalHref = window.location.href,
currentLang = document.documentElement.lang;
const LOCALES_SELECT_MENU = {
ru: {
platform: "Платформа",
ecm: "ECM",
crm: "CRM",
ecm: "CSP",
crm: "CRM+CX",
projects: "Проекты",
business_solutions: "Бизнес-решения",
service: "Service",
kedo: "КЭДО",
},
en: {
platform: "Platform",
@ -175,7 +176,7 @@ const allowedHosts = [
"http://127.0.0.1",
"http://localhost",
"https://ligmanstark.github.io/help365_test/",
"https://help.miduway.space",
"https://help.miduway.space",
];
if (allowedHosts.some((url) => currentLocalHref.includes(url))) {
@ -295,14 +296,14 @@ if (allowedHosts.some((url) => currentLocalHref.includes(url))) {
return `
<li class="search-res__item">
<span class="search-res__item-category">${outputCategoryResult(
item["link"]
)}</span>
item["link"]
)}</span>
<span class="search-res__item-category search-res__item-category_subcategory">${outputSubCategoryResult(
item["link"]
)}</span>
item["link"]
)}</span>
<a href="${
item["link"]
}" class="search-res__item-title">${item.title}</a>
item["link"]
}" class="search-res__item-title">${item.title}</a>
<p class="search-res__item-description">${item.htmlSnippet}</p>
<p class="search-res__item-link">${item.link}</p>
</li>
@ -488,8 +489,8 @@ if (allowedHosts.some((url) => currentLocalHref.includes(url))) {
textContent = "BPM";
break;
case /ru\/KB/i.test(categoryUrl) ||
/elma-bpm.ru\/…help/i.test(categoryUrl) ||
/help/i.test(categoryUrl):
/elma-bpm.ru\/…help/i.test(categoryUrl) ||
/help/i.test(categoryUrl):
textContent = "База знаний";
break;
}
@ -507,14 +508,17 @@ if (allowedHosts.some((url) => currentLocalHref.includes(url))) {
textContent = "Платформа";
break;
case /elma365.com\/ru\/help\/ecm/i.test(categoryUrl):
textContent = "ECM";
textContent = "CSP";
break;
case /elma365.com\/ru\/help\/crm/i.test(categoryUrl):
textContent = "CRM";
textContent = "CRM+CX";
break;
case /elma365.com\/ru\/help\/projects/i.test(categoryUrl):
textContent = "Проекты";
break;
case /elma365.com\/ru\/help\/kedo/i.test(categoryUrl):
textContent = "КЭДО";
break;
case /elma365.com\/ru\/help\/business_solutions/i.test(categoryUrl):
textContent = "Бизнес-решения";
@ -593,14 +597,15 @@ if (allowedHosts.some((url) => currentLocalHref.includes(url))) {
const urlPatterns = [
{ pattern: /(127\.0\.0\.1|localhost)/i, value: "localhost" },
{ pattern: /elma365\.com\/ru\/help\/platform/i, value: "Платформа" },
{ pattern: /elma365\.com\/ru\/help\/ecm/i, value: "ECM" },
{ pattern: /elma365\.com\/ru\/help\/crm/i, value: "CRM" },
{ pattern: /elma365\.com\/ru\/help\/ecm/i, value: "CSP" },
{ pattern: /elma365\.com\/ru\/help\/crm/i, value: "CRM+CX" },
{ pattern: /elma365\.com\/ru\/help\/projects/i, value: "Проекты" },
{
pattern: /elma365\.com\/ru\/help\/business_solutions/i,
value: "Бизнес-решения",
},
{ pattern: /elma365\.com\/ru\/help\/service/i, value: "Сервис" },
{ pattern: /elma365\.com\/ru\/help\/kedo/i, value: "КЭДО" },
{
pattern: /.*/i,
value: "RUM",
@ -645,45 +650,59 @@ if (allowedHosts.some((url) => currentLocalHref.includes(url))) {
switch (true) {
// ELMA365
case /ru\/help\/platform\/platform-help/i.test(categoryUrl):
window.location.href =
window.location.replace(
window.location.origin +
"/ru/help" +
"/platform/platform-distribution.html";
"/platform/platform-distribution.html"
);
break;
case /ru\/help\/ecm\/platform-help/i.test(categoryUrl):
window.location.href =
window.location.replace(
window.location.origin +
"/ru/help" +
"/platform/platform-distribution.html";
"/platform/platform-distribution.html"
);
break;
case /ru\/help\/crm\/platform-help/i.test(categoryUrl):
window.location.href =
window.location.replace(
window.location.origin +
"/ru/help" +
"/platform/platform-distribution.html";
"/platform/platform-distribution.html"
);
break;
case /ru\/help\/projects\/platform-help/i.test(categoryUrl):
window.location.href =
window.location.replace(
window.location.origin +
"/ru/help" +
"/platform/platform-distribution.html";
"/platform/platform-distribution.html"
);
break;
case /ru\/help\/business_solutions\/platform-help/i.test(categoryUrl):
window.location.href =
window.location.replace(
window.location.origin +
"/ru/help" +
"/platform/platform-distribution.html";
"/platform/platform-distribution.html"
);
break;
case /ru\/help\/service\/platform-help/i.test(categoryUrl):
window.location.href =
window.location.replace(
window.location.origin +
"/ru/help" +
"/platform/platform-distribution.html";
"/platform/platform-distribution.html"
);
break;
case /ru\/help\/kedo\/platform-help/i.test(categoryUrl):
window.location.replace(
window.location.origin +
"/ru/help" +
"/platform/platform-distribution.html"
);
break;
}
}
@ -761,6 +780,9 @@ if (allowedHosts.some((url) => currentLocalHref.includes(url))) {
case /help\/service/i.test(url):
textContent = LOCALES_SELECT_MENU[currentLang].service;
break;
case /help\/kedo/i.test(url):
textContent = LOCALES_SELECT_MENU[currentLang].kedo;
break;
default:
textContent = LOCALES_SELECT_MENU[currentLang].platform;
@ -777,6 +799,9 @@ if (allowedHosts.some((url) => currentLocalHref.includes(url))) {
case /help\/platform/i.test(url):
g = "platform";
break;
case /help\/kedo/i.test(url):
g = "kedo";
break;
case /help\/ecm/i.test(url):
g = "ecm";
break;
@ -826,12 +851,12 @@ if (allowedHosts.some((url) => currentLocalHref.includes(url))) {
) {
$(".footer").append(
' <div id="help-menu">\n' +
' <ul class="help-menu">\n' +
' <li class="opechatka"><img src="./help-a.svg" alt="side menu opechatka"><div class="fade-in"><span>Нашли опечатку?</span><p>Выделите текст, нажмите <b>ctrl + enter</b> и оповестите нас</p></div></li>\n' +
' <li class="question"><img src="./help-mark.svg" alt="side menu question"><form method="POST" action class="question__popup fade-in" id="question__popup"><span class="close"></span><span class="title">Отправить фидбэк</span><textarea name="help_question" id="help_question"></textarea><input type="submit" value="Отправить"></form><div class="hidden question-success" id="feedback-success-popup2"><div class="wrap"><button type="button" class="feedback-popup-close">×</button><svg width="44" height="44" viewBox="0 0 44 44" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_212_2187)"><path d="M22 0.6875C10.2294 0.6875 0.6875 10.2294 0.6875 22C0.6875 33.7706 10.2294 43.3125 22 43.3125C33.7706 43.3125 43.3125 33.7706 43.3125 22C43.3125 10.2294 33.7706 0.6875 22 0.6875ZM22 40.5625C11.8023 40.5625 3.4375 32.3078 3.4375 22C3.4375 11.8024 11.6922 3.4375 22 3.4375C32.1977 3.4375 40.5625 11.6922 40.5625 22C40.5625 32.1976 32.3078 40.5625 22 40.5625ZM34.1713 16.933L18.6613 32.3186C18.257 32.7197 17.604 32.7171 17.203 32.3128L9.82283 24.873C9.42176 24.4686 9.42434 23.8157 9.82867 23.4146L10.5609 22.6884C10.9652 22.2873 11.6181 22.2899 12.0192 22.6942L17.9468 28.6697L31.9926 14.7366C32.3969 14.3356 33.0498 14.3382 33.4509 14.7425L34.1772 15.4747C34.5783 15.879 34.5757 16.532 34.1713 16.933Z" fill="#27AE60"/></g><defs><clipPath id="clip0_212_2187"><rect width="44" height="44" fill="white"/></clipPath></defs></svg><p>Ваш отзыв успешно отправлен!</p><span>Спасибо за обратную связь.</span></div></div></li>\n' +
' <li class="dialog"><img src="./help-dialog.svg" alt="side menu dialog"><div class="fade-in"><a href="https://community.elma365.com/ru/" target="_blank">Перейти в ELMA Community</a></div></li>\n' +
" </ul>\n" +
" </div>"
' <ul class="help-menu">\n' +
' <li class="opechatka"><img src="./help-a.svg" alt="side menu opechatka"><div class="fade-in"><span>Нашли опечатку?</span><p>Выделите текст, нажмите <b>ctrl + enter</b> и оповестите нас</p></div></li>\n' +
' <li class="question"><img src="./help-mark.svg" alt="side menu question"><form method="POST" action class="question__popup fade-in" id="question__popup"><span class="close"></span><span class="title">Отправить фидбэк</span><textarea name="help_question" id="help_question"></textarea><input type="submit" value="Отправить"></form><div class="hidden question-success" id="feedback-success-popup2"><div class="wrap"><button type="button" class="feedback-popup-close">×</button><svg width="44" height="44" viewBox="0 0 44 44" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_212_2187)"><path d="M22 0.6875C10.2294 0.6875 0.6875 10.2294 0.6875 22C0.6875 33.7706 10.2294 43.3125 22 43.3125C33.7706 43.3125 43.3125 33.7706 43.3125 22C43.3125 10.2294 33.7706 0.6875 22 0.6875ZM22 40.5625C11.8023 40.5625 3.4375 32.3078 3.4375 22C3.4375 11.8024 11.6922 3.4375 22 3.4375C32.1977 3.4375 40.5625 11.6922 40.5625 22C40.5625 32.1976 32.3078 40.5625 22 40.5625ZM34.1713 16.933L18.6613 32.3186C18.257 32.7197 17.604 32.7171 17.203 32.3128L9.82283 24.873C9.42176 24.4686 9.42434 23.8157 9.82867 23.4146L10.5609 22.6884C10.9652 22.2873 11.6181 22.2899 12.0192 22.6942L17.9468 28.6697L31.9926 14.7366C32.3969 14.3356 33.0498 14.3382 33.4509 14.7425L34.1772 15.4747C34.5783 15.879 34.5757 16.532 34.1713 16.933Z" fill="#27AE60"/></g><defs><clipPath id="clip0_212_2187"><rect width="44" height="44" fill="white"/></clipPath></defs></svg><p>Ваш отзыв успешно отправлен!</p><span>Спасибо за обратную связь.</span></div></div></li>\n' +
' <li class="dialog"><img src="./help-dialog.svg" alt="side menu dialog"><div class="fade-in"><a href="https://community.elma365.com/ru/" target="_blank">Перейти в ELMA Community</a></div></li>\n' +
" </ul>\n" +
" </div>"
);
const list = document.querySelectorAll(".help-menu li");