fix notes 2
parent
43dde5d3f3
commit
22bccd2c31
|
|
@ -435,6 +435,13 @@
|
||||||
document.querySelector('.header').classList.add('dark-theme');
|
document.querySelector('.header').classList.add('dark-theme');
|
||||||
$('#folder-tree').addClass('jstree-default-dark');
|
$('#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() {
|
function toggleTheme() {
|
||||||
|
|
@ -645,7 +652,7 @@
|
||||||
<div class="computer-name">${item.computer_name} <button class="edit-button ${isDarkTheme ? 'dark-theme' : ''}" onclick="editField(${item.id}, 'computer_name', '${item.computer_name}')">✏️</button></div>
|
<div class="computer-name">${item.computer_name} <button class="edit-button ${isDarkTheme ? 'dark-theme' : ''}" onclick="editField(${item.id}, 'computer_name', '${item.computer_name}')">✏️</button></div>
|
||||||
<div class="connection-id"><span class="protocol-icon">${protocolIcons[item.protocol]}</span><a href="${protocolLinks[item.protocol]}${item.rust_id}" class="connection-link ${isDarkTheme ? 'dark-theme' : ''}" target="_blank">${item.rust_id}</a> <button class="copy-button ${isDarkTheme ? 'dark-theme' : ''}" onclick="copyToClipboard('${item.rust_id}')">📋</button> <button class="edit-button ${isDarkTheme ? 'dark-theme' : ''}" onclick="editField(${item.id}, 'rust_id', '${item.rust_id}')">✏️</button></div>
|
<div class="connection-id"><span class="protocol-icon">${protocolIcons[item.protocol]}</span><a href="${protocolLinks[item.protocol]}${item.rust_id}" class="connection-link ${isDarkTheme ? 'dark-theme' : ''}" target="_blank">${item.rust_id}</a> <button class="copy-button ${isDarkTheme ? 'dark-theme' : ''}" onclick="copyToClipboard('${item.rust_id}')">📋</button> <button class="edit-button ${isDarkTheme ? 'dark-theme' : ''}" onclick="editField(${item.id}, 'rust_id', '${item.rust_id}')">✏️</button></div>
|
||||||
<div class="install-time">${item.install_time} <button class="edit-button ${isDarkTheme ? 'dark-theme' : ''}" onclick="editField(${item.id}, 'install_time', '${item.install_time}')">✏️</button></div>
|
<div class="install-time">${item.install_time} <button class="edit-button ${isDarkTheme ? 'dark-theme' : ''}" onclick="editField(${item.id}, 'install_time', '${item.install_time}')">✏️</button></div>
|
||||||
<div class="actions"><span class="action-buttons"><button onclick="deleteInstall(${item.id})">Удалить</button> <button onclick="openNoteModal(${item.id}, '${item.note || ''}')">Заметка</button></span></div>
|
<div class="actions"><span class="action-buttons"><button onclick="deleteInstall(${item.id})">Удалить</button> <button class="note-button">Заметка</button></span></div>
|
||||||
</div>
|
</div>
|
||||||
`).join(''));
|
`).join(''));
|
||||||
}
|
}
|
||||||
|
|
@ -939,7 +946,8 @@
|
||||||
function closeNoteModal() {
|
function closeNoteModal() {
|
||||||
$('#note-modal').hide();
|
$('#note-modal').hide();
|
||||||
$('#modal-overlay').hide();
|
$('#modal-overlay').hide();
|
||||||
$('#note-textarea').val('');
|
$('#note-textarea').val(''); // Очищаем текстовое поле
|
||||||
|
selectedInstallId = null; // Сбрасываем выбранный ID
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateNotesPanel() {
|
function updateNotesPanel() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue