X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=skyquake%2Fplugins%2Fcomposer%2Fsrc%2Fsrc%2Fcomponents%2Ffilemanager%2FFileManager.jsx;h=ed9ea93a5c83041b1436f366d6071b221be82299;hb=b882ecd7bca6965de18bca855d54f699131da34d;hp=913f71ac64f03e7e23388f0e8d7a3e34e354fd32;hpb=799655b0200adbe6ff65cb54a35be653b92a3972;p=osm%2FUI.git diff --git a/skyquake/plugins/composer/src/src/components/filemanager/FileManager.jsx b/skyquake/plugins/composer/src/src/components/filemanager/FileManager.jsx index 913f71ac6..ed9ea93a5 100644 --- a/skyquake/plugins/composer/src/src/components/filemanager/FileManager.jsx +++ b/skyquake/plugins/composer/src/src/components/filemanager/FileManager.jsx @@ -124,7 +124,7 @@ class FileManager extends React.Component { function buildList(self, data) { let toReturn = []; data.id.map(function(k,i) { - toReturn.push (contentFolder(self, data.data[k], k, i, self.props.filesState, self.updateFileLocationInput, self.sendDownloadFileRequst, self.deleteFile)); + toReturn.push (contentFolder(self, data.data[k], k, k+i, self.props.filesState, self.updateFileLocationInput, self.sendDownloadFileRequst, self.deleteFile)); }); return toReturn.reverse(); } @@ -132,7 +132,7 @@ function buildList(self, data) { function contentFolder(context, folder, path, key, inputState, updateFn, sendDownloadFileRequst, deleteFn) { let type = context.props.type; let id = context.props.item.id; - let classId = `DZ-${path.replace(/\//g, '-')}`; + let classId = `DZ-${path.replace(/\/|\s+/g, '-')}`; const onboardDropZone = createDropZone.bind(this, FileManagerUploadDropZone.ACTIONS.onboard, '.ComposerAppAddFile.' + classId, type, id, path); return ( @@ -171,7 +171,7 @@ class ItemUpload extends React.Component { } render() { let {type, id, path, key, ...props} = this.props; - let classId = `DZ-${path.replace(/\//g, '-')}`; + let classId = `DZ-${path.replace(/\/|\s+/g, '-')}`; return (