групировка фаилов
This commit is contained in:
@@ -103,29 +103,6 @@ function removeEditFile(index) {
|
||||
document.getElementById('edit-files').files = dataTransfer.files;
|
||||
}
|
||||
|
||||
async function loadTaskFiles(taskId) {
|
||||
try {
|
||||
const response = await fetch(`/api/tasks/${taskId}/files`);
|
||||
const files = await response.json();
|
||||
|
||||
const container = document.getElementById(`files-${taskId}`);
|
||||
if (container) {
|
||||
if (files.length === 0) {
|
||||
container.innerHTML = '<strong>Файлы:</strong> <span class="files-placeholder">скрыто</span>';
|
||||
} else {
|
||||
container.innerHTML = `
|
||||
<strong>Файлы:</strong>
|
||||
<div class="file-icons-container">
|
||||
${files.map(file => renderFileIcon(file)).join('')}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Ошибка загрузки файлов:', error);
|
||||
}
|
||||
}
|
||||
|
||||
function renderFileIcon(file) {
|
||||
// Исправляем кодировку имени файла
|
||||
const fixEncoding = (str) => {
|
||||
|
||||
Reference in New Issue
Block a user