From 4520c9b6089ba32a4c71cf82b45e53324d31bd5e Mon Sep 17 00:00:00 2001 From: ro Date: Tue, 9 Jul 2024 13:38:02 -0600 Subject: [PATCH] FIX: misnamed sorting attribute for uploaded files when creating new ui elements for uploaded files, the 'data-source' attribute was being created to store the upload path for the file which is used to save that info in the page doc. that attribute should be 'data-id' as that is what sortablejs looks for when sorting element data into arrays --- public/assets/scripts/dash/app/ui/FileManager.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/assets/scripts/dash/app/ui/FileManager.js b/public/assets/scripts/dash/app/ui/FileManager.js index 59db1b3..44b6c72 100644 --- a/public/assets/scripts/dash/app/ui/FileManager.js +++ b/public/assets/scripts/dash/app/ui/FileManager.js @@ -143,7 +143,7 @@ export default class FileManager { self.mm .filesUpload(theFile.type, upload, progress) .then(result => { - item.setAttribute('data-source', result.filePath); + item.setAttribute('data-id', result.filePath); let video = document.createElement('video'); let source = document.createElement('source'); source.src = f.target.result; @@ -169,7 +169,7 @@ export default class FileManager { self.mm .filesUpload(theFile.type, upload, progress) .then(result => { - item.setAttribute('data-source', result.filePath); + item.setAttribute('data-id', result.filePath); let audio = document.createElement('audio'); audio.setAttribute('controls', true); let source = document.createElement('source'); @@ -198,7 +198,7 @@ export default class FileManager { self.mm .filesUpload(theFile.type, upload, progress) .then(result => { - item.setAttribute('data-source', result.filePath); + item.setAttribute('data-id', result.filePath); let link = document.createElement('a'); link.href = result.filePath; link.innerHTML = result.fileName;