Реализовано открытие и закрытие вкладок на нажатие трех полосок, добавлена вкладка структуры страницы с возможностью вставки плагинов, подключена библиотека MarkedJS, исправлены баги, управление центральными блоками через CDATA.

This commit is contained in:
2025-11-17 22:57:36 +02:00
parent 5c3e28fd55
commit 68e516b45c
25 changed files with 1315 additions and 178 deletions

View File

@@ -67,7 +67,6 @@ function generateTreeHtml(items, checkChildren) {
html += `PageMenu: ${item.PageMenu}<br>`;
html += `users: ${item.users}<br>`;
html += `group: ${item.group}<br>`;
html += `plugins: ${item.plugins}<br>`;
let now = new Date();
let pad = n => n < 10 ? '0' + n : n;
@@ -100,7 +99,7 @@ function generateTreeHtml(items, checkChildren) {
html += `</li>`;
if (style) {
selectedTreeItemAdd = `url: ${item.url}<br>title: ${item.title}<br>name: ${item.name}<br>template: ${item.template}<br>PageMenu: ${item.PageMenu}<br>users: ${item.users}<br>group: ${item.group}<br>plugins: ${item.plugins}`;
selectedTreeItemAdd = `url: ${item.url}<br>title: ${item.title}<br>name: ${item.name}<br>template: ${item.template}<br>PageMenu: ${item.PageMenu}<br>users: ${item.users}<br>group: ${item.group}`;
}
});
@@ -888,13 +887,6 @@ function saveTreePropertiesDiv() {
.map(x => `<label><input type="checkbox" value="${x.value}"${x.checked?' checked':''}>${x.value}</label>`);
parts.push(`<div>${blocks.join(' ')}</div>`);
value = parts.join('');
}
else if (key.toLowerCase() === 'plugins') {
let cbs = valueCell.querySelectorAll('input[type="checkbox"][value]');
let active = Array.from(cbs)
.filter(cb => cb.checked)
.map(cb => cb.value);
value = active.join(',');
} else {
let input = valueCell.querySelector('input');
value = input ? input.value : valueCell.textContent.trim();
@@ -991,12 +983,6 @@ function treePropertiesDiv() {
inputHtml = `<input type="text" value="${value}" style="font-size: inherit;" readonly disabled>`;
} else if (key.toLowerCase() === "group") {
inputHtml = `<input type="text" value="${value}" style="font-size: inherit;" readonly disabled>`;
} else if (key.toLowerCase() === "plugins") {
let plugins = (value || '').split(',');
let allPlugins = ['dgrm','SvgEditorM', 'form_editor'];
inputHtml = allPlugins.map(p =>
`<label><input type="checkbox" value="${p}"${plugins.includes(p)?' checked':''}>${p}</label>`
).join(' ');
}