drag color
parent
ae6dcee956
commit
e8c32e0b62
|
|
@ -83,6 +83,15 @@
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
/* Стили для подсветки папки при перетаскивании */
|
||||||
|
.jstree-node.highlight {
|
||||||
|
background-color: #d4edda !important; /* Светлая тема */
|
||||||
|
border: 2px dashed #28a745;
|
||||||
|
}
|
||||||
|
.jstree-node.highlight.dark-theme {
|
||||||
|
background-color: #2f4f4f !important; /* Темная тема */
|
||||||
|
border: 2px dashed #5cb85c;
|
||||||
|
}
|
||||||
.jstree-default-dark .jstree-clicked {
|
.jstree-default-dark .jstree-clicked {
|
||||||
background: #005580 !important;
|
background: #005580 !important;
|
||||||
color: #e0e0e0 !important;
|
color: #e0e0e0 !important;
|
||||||
|
|
@ -498,6 +507,28 @@
|
||||||
const movedNode = data.node;
|
const movedNode = data.node;
|
||||||
const newParentId = movedNode.parent === '#' ? null : movedNode.parent;
|
const newParentId = movedNode.parent === '#' ? null : movedNode.parent;
|
||||||
saveFolderPosition(movedNode.id, newParentId);
|
saveFolderPosition(movedNode.id, newParentId);
|
||||||
|
}).on('dragover.jstree', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
const node = $(e.target).closest('.jstree-node');
|
||||||
|
if (node.length) {
|
||||||
|
node.addClass('highlight').addClass(document.body.classList.contains('dark-theme') ? 'dark-theme' : '');
|
||||||
|
}
|
||||||
|
}).on('dragenter.jstree', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
const node = $(e.target).closest('.jstree-node');
|
||||||
|
if (node.length) {
|
||||||
|
node.addClass('highlight').addClass(document.body.classList.contains('dark-theme') ? 'dark-theme' : '');
|
||||||
|
}
|
||||||
|
}).on('dragleave.jstree', function (e) {
|
||||||
|
const node = $(e.target).closest('.jstree-node');
|
||||||
|
if (node.length) {
|
||||||
|
node.removeClass('highlight');
|
||||||
|
}
|
||||||
|
}).on('drop.jstree', function (e) {
|
||||||
|
const node = $(e.target).closest('.jstree-node');
|
||||||
|
if (node.length) {
|
||||||
|
node.removeClass('highlight');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#search-input').on('input', function () {
|
$('#search-input').on('input', function () {
|
||||||
|
|
@ -746,7 +777,7 @@
|
||||||
}
|
}
|
||||||
const install = allInstalls.find(i => i.id === installId);
|
const install = allInstalls.find(i => i.id === installId);
|
||||||
if (install) {
|
if (install) {
|
||||||
data['protocol'] = install.protocol; // Сохраняем текущий protocol
|
data['protocol'] = install.protocol;
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: `${API_URL}/install/${installId}`,
|
url: `${API_URL}/install/${installId}`,
|
||||||
|
|
@ -792,7 +823,7 @@
|
||||||
contentType: 'application/json',
|
contentType: 'application/json',
|
||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
folder_id: folderId,
|
folder_id: folderId,
|
||||||
protocol: install.protocol // Добавляем текущее значение protocol
|
protocol: install.protocol
|
||||||
}),
|
}),
|
||||||
success: function () {
|
success: function () {
|
||||||
console.log('Move successful');
|
console.log('Move successful');
|
||||||
|
|
@ -857,7 +888,7 @@
|
||||||
contentType: 'application/json',
|
contentType: 'application/json',
|
||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
note: note,
|
note: note,
|
||||||
protocol: install.protocol // Сохраняем текущий protocol
|
protocol: install.protocol
|
||||||
}),
|
}),
|
||||||
success: function () {
|
success: function () {
|
||||||
loadInstalls(selectedFolderId);
|
loadInstalls(selectedFolderId);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue