Merge "Bug 242 - delete error not reported - add delete error handler"
authorkashalkar <kiran.kashalkar@riftio.com>
Tue, 4 Apr 2017 14:00:24 +0000 (16:00 +0200)
committerGerrit Code Review <root@osm.etsi.org>
Tue, 4 Apr 2017 14:00:24 +0000 (16:00 +0200)
skyquake/plugins/composer/src/src/components/filemanager/FileManager.jsx

index 498cd2a..ed9ea93 100644 (file)
@@ -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 (
         <Panel title={path} key={key} itemClassName="nested" no-corners>
@@ -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 (
             <div className="inputSection">
                 <label className="sqTextInput" style={{flexDirection: 'row', alignItems:'center'}}>