From 2f2149a014af906cfd886733cdabe01f35f8cf36 Mon Sep 17 00:00:00 2001 From: "Satur@it-depot.ru" Date: Thu, 6 Mar 2025 09:33:17 +0300 Subject: [PATCH] test --- templates/index.html | 1027 ++++++++++++++++++------------------------ 1 file changed, 448 insertions(+), 579 deletions(-) diff --git a/templates/index.html b/templates/index.html index 3c8c670..35de522 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,420 +1,327 @@ - - - - - Органайзер АйТи-Депо - - - - - - - -
-

Папки

-
- -
-
-

- АйТи-Депо логотип - Органайзер АйТи-Депо -

-
- - - -
- - -
-
-
-

Добавить запись

- - - - - - -
Пример: 2025-03-05 14:30:00
-
-
-
Имя компьютера
-
ID подключения
-
Время установки
-
Действия
-
-
-
-
-

Заметка

-
-
+ - - \ No newline at end of file + } + + function updateFolderActions() { + $('.folder-actions').hide(); + if (selectedFolderId) { + $(`#${selectedFolderId} .folder-actions`).show(); + } else { + $('#root .folder-actions').show(); + } + } + + function updateFolderSelect() { + const $folderSelect = $('#folder-select'); + $folderSelect.empty().append(''); + allFolders.forEach(folder => { + $folderSelect.append(``); + }); + } + + $('#installs-list').on('click', '.install-item', function () { + selectedInstallId = $(this).data('id'); + $('.install-item').removeClass('selected'); + $(this).addClass('selected'); + updateNotesPanel(); + }); + + function formatBold() { + const textarea = $('#note-textarea'); + const start = textarea[0].selectionStart; + const end = textarea[0].selectionEnd; + const text = textarea.val(); + const selected = text.substring(start, end); + const newText = `**${selected}**`; + textarea.val(text.substring(0, start) + newText + text.substring(end)); + textarea[0].selectionStart = start; + textarea[0].selectionEnd = start + newText.length - 4; + } + + function formatItalic() { + const textarea = $('#note-textarea'); + const start = textarea[0].selectionStart; + const end = textarea[0].selectionEnd; + const text = textarea.val(); + const selected = text.substring(start, end); + const newText = `*${selected}*`; + textarea.val(text.substring(0, start) + newText + text.substring(end)); + textarea[0].selectionStart = start; + textarea[0].selectionEnd = start + newText.length - 2; + } + + function formatLink() { + const textarea = $('#note-textarea'); + const start = textarea[0].selectionStart; + const end = textarea[0].selectionEnd; + const text = textarea.val(); + const selected = text.substring(start, end) || 'текст'; + const url = prompt('Введите URL ссылки:', 'https://example.com'); + if (url) { + const newText = `[${selected}](${url})`; + textarea.val(text.substring(0, start) + newText + text.substring(end)); + textarea[0].selectionStart = start; + textarea[0].selectionEnd = start + newText.length - (selected ? 0 : '[текст]'.length); + } + } + \ No newline at end of file