From 22bccd2c313cfdb9f0565b2171f75e6a3efa4c3d Mon Sep 17 00:00:00 2001 From: "Satur@it-depot.ru" Date: Thu, 6 Mar 2025 15:43:42 +0300 Subject: [PATCH] fix notes 2 --- templates/index.html | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/templates/index.html b/templates/index.html index 464ca2e..b163517 100644 --- a/templates/index.html +++ b/templates/index.html @@ -435,6 +435,13 @@ document.querySelector('.header').classList.add('dark-theme'); $('#folder-tree').addClass('jstree-default-dark'); } + + // Делегирование событий для кнопок "Заметка" + $('#installs-list').on('click', '.action-buttons button:nth-child(2)', function () { + const installId = $(this).closest('.install-item').data('id'); + const install = allInstalls.find(i => i.id === installId); + openNoteModal(installId, install?.note || ''); + }); }); function toggleTheme() { @@ -645,7 +652,7 @@
${item.computer_name}
${protocolIcons[item.protocol]}${item.rust_id}
${item.install_time}
-
+
`).join('')); } @@ -939,7 +946,8 @@ function closeNoteModal() { $('#note-modal').hide(); $('#modal-overlay').hide(); - $('#note-textarea').val(''); + $('#note-textarea').val(''); // Очищаем текстовое поле + selectedInstallId = null; // Сбрасываем выбранный ID } function updateNotesPanel() {