diff --git a/public/assets/scripts/dash/app/ui/FileManager.js b/public/assets/scripts/dash/app/ui/FileManager.js index a88904c..08628bd 100644 --- a/public/assets/scripts/dash/app/ui/FileManager.js +++ b/public/assets/scripts/dash/app/ui/FileManager.js @@ -64,23 +64,13 @@ export default class FileManager { getFileOrder() { let imgList = ''; let fileList = ''; - //change file order this and chance data-source to data-id - //console.log('ORDER', this.mediaSort.toArray()); - for (var i = 0, length = this.imageList.childNodes.length; i < length; i++) { - try { - let div = this.imageList.childNodes[i]; - imgList = imgList + div.getAttribute('data-source') + ','; - } catch (e) { - //something is function - } + let mediaArray = this.mediaSort.toArray(); + let fileArray = this.fileSort.toArray(); + for (var i = 0, length = mediaArray.length; i < length; i++) { + imgList = imgList + mediaArray[i] + ','; } - for (var i = 0, length = this.fileList.childNodes.length; i < length; i++) { - try { - let div = this.fileList.childNodes[i]; - fileList = fileList + div.getAttribute('data-source') + ','; - } catch (e) { - //something is function - } + for (var i = 0, length = fileArray.length; i < length; i++) { + fileList = fileList + fileArray[i] + ','; } let media = { images: imgList, files: fileList }; return media; diff --git a/resources/views/back/page.blade.php b/resources/views/back/page.blade.php index 92fcc59..5965cd2 100644 --- a/resources/views/back/page.blade.php +++ b/resources/views/back/page.blade.php @@ -50,7 +50,7 @@ @if(count($media)>1) @foreach($media as $item) @if($item['type'] == "mp4") -