From: Laurence Maultsby Date: Tue, 4 Apr 2017 13:10:06 +0000 (-0400) Subject: RIFT-16086, 16089, support folder names with spaces X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=0338306d99f0bf4a522b0ae07e678c7da3e10038;p=osm%2FUI.git RIFT-16086, 16089, support folder names with spaces Signed-off-by: Laurence Maultsby --- diff --git a/skyquake/plugins/composer/src/src/components/filemanager/FileManager.jsx b/skyquake/plugins/composer/src/src/components/filemanager/FileManager.jsx index 498cd2aec..ed9ea93a5 100644 --- a/skyquake/plugins/composer/src/src/components/filemanager/FileManager.jsx +++ b/skyquake/plugins/composer/src/src/components/filemanager/FileManager.jsx @@ -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 (