From: Laurence Maultsby Date: Wed, 1 Feb 2017 14:47:47 +0000 (-0500) Subject: RIFT-15487: composer assets download file fix X-Git-Tag: v1.1.0~5 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=5bd1094cce6f4d46084e38bcd22dbb1ecdf659c3;p=osm%2FUI.git RIFT-15487: composer assets download file fix 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 ce490a0e0..3833ab451 100644 --- a/skyquake/plugins/composer/src/src/components/filemanager/FileManager.jsx +++ b/skyquake/plugins/composer/src/src/components/filemanager/FileManager.jsx @@ -105,7 +105,13 @@ class FileManager extends React.Component { let html = (
- {self.props.files && self.props.files.id && buildList(self, self.props.files) } + +
+ +
+
+ {self.props.files && self.props.files.id && buildList(self, self.props.files) }
) @@ -125,7 +131,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; - const onboardDropZone = createDropZone.bind(this, FileManagerUploadDropZone.ACTIONS.onboard, '.ComposerAppAddFile.' + path.replace('/', '-'), type, id, path); + const onboardDropZone = createDropZone.bind(this, FileManagerUploadDropZone.ACTIONS.onboard, '.ComposerAppAddFile.' + path.replace(/\//g, '-'), type, id, path); return (
@@ -167,7 +173,7 @@ class ItemUpload extends React.Component {
) @@ -177,6 +183,7 @@ function contentFile(context, file, path, key, deleteFn) { const name = stripPath(file.name, path); const id = context.props.item.id; const type = context.props.type; + const downloadHost = API_SERVER.match('localhost') || API_SERVER.match('127.0.0.1') ? `${window.location.protocol}//${window.location.hostname}` : API_SERVER; //{`${window.location.protocol}//${API_SERVER}:4567/api/package${type}/${id}/${path}/${name}`} return (
@@ -186,7 +193,7 @@ function contentFile(context, file, path, key, deleteFn) { {file.status && (file.status == 'IN_PROGRESS' || file.status == 'DOWNLOADING' ) ? : file.status }
- {name} + {name}
X