1
0
mirror of https://github.com/ascribe/onion.git synced 2025-01-03 10:25:08 +01:00

Unknot (and maybe reknot) layouting for FileDragAndDrop

This commit is contained in:
Tim Daubenschütz 2015-11-20 15:02:39 +01:00
parent 1cf8ac2f31
commit 96ad05cef4
6 changed files with 44 additions and 51 deletions

View File

@ -154,7 +154,8 @@ let RegisterPieceForm = React.createClass({
</div> </div>
<Property <Property
name="digital_work_key" name="digital_work_key"
ignoreFocus={true}> ignoreFocus={true}
label={'Your Work'}>
<InputFineUploader <InputFineUploader
keyRoutine={{ keyRoutine={{
url: AppConstants.serverUrl + 's3/key/', url: AppConstants.serverUrl + 's3/key/',

View File

@ -29,13 +29,13 @@ let FileDragAndDropPreviewIterator = React.createClass({
areAssetsDownloadable, areAssetsDownloadable,
areAssetsEditable areAssetsEditable
} = this.props; } = this.props;
files = files.filter(displayValidFilesFilter); files = files.filter(displayValidFilesFilter);
const style = files && files.length > 1 ? {marginTop: '2.5em'} : null;
if(files && files.length > 0) { if(files && files.length > 0) {
return ( return (
<div className="file-drag-and-drop-preview-iterator"> <div style={style}>
<div className="file-drag-and-drop-preview-iterator-spacing">
{files.map((file, i) => { {files.map((file, i) => {
return ( return (
<FileDragAndDropPreview <FileDragAndDropPreview
@ -50,7 +50,6 @@ let FileDragAndDropPreviewIterator = React.createClass({
numberOfDisplayedFiles={files.length}/> numberOfDisplayedFiles={files.length}/>
); );
})} })}
</div>
<FileDragAndDropPreviewProgress files={files} /> <FileDragAndDropPreviewProgress files={files} />
</div> </div>
); );

View File

@ -43,7 +43,7 @@ const FileDragAndDropPreviewOther = React.createClass({
downloadUrl, downloadUrl,
type, type,
showProgress } = this.props; showProgress } = this.props;
const style = !showProgress ? { visibility: 'hidden' }: null; const style = !showProgress ? { visibility: 'hidden' } : null;
let actionSymbol; let actionSymbol;
// only if assets are actually downloadable, there should be a // only if assets are actually downloadable, there should be a

View File

@ -55,11 +55,13 @@ let FileDragAndDropPreviewProgress = React.createClass({
} }
return ( return (
<div style={{marginTop: '2em'}}>
<ProgressBar <ProgressBar
now={Math.ceil(overallProgress)} now={Math.ceil(overallProgress)}
label={getLangText('Overall progress%s', ': %(percent)s%')} label={getLangText('Overall progress%s', ': %(percent)s%')}
className="ascribe-progress-bar" className="ascribe-progress-bar"
style={style} /> style={style} />
</div>
); );
} }
}); });

View File

@ -89,6 +89,10 @@ $ascribe-red-error: rgb(169, 68, 66);
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
} }
> .file-drag-and-drop {
margin-top: .5em;
}
> p { > p {
height: 20px; height: 20px;
margin-bottom: 0; margin-bottom: 0;

View File

@ -8,14 +8,7 @@
overflow: auto; overflow: auto;
text-align: center; text-align: center;
vertical-align: middle; vertical-align: middle;
padding: 1.5em 0 1.5em 0; padding-top: 1.5em;
.file-drag-and-drop-dialog > p:first-child {
font-size: 1.5em !important;
margin-bottom: 0;
margin-top: 0;
padding-bottom: 0;
}
} }
.inactive-dropzone { .inactive-dropzone {
@ -34,25 +27,19 @@
} }
} }
.file-drag-and-drop-preview-iterator {
margin: 2.5em 0 0 0;
text-align: right;
> div:first-child {
text-align: center;
}
}
.file-drag-and-drop-preview-iterator-spacing {
margin-bottom: 1em;
.file-name {
font-size: 1.1em;
}
}
.file-drag-and-drop-dialog { .file-drag-and-drop-dialog {
margin: 1.5em 0 1.5em 0; margin: 1.5em 0 1.5em 0;
> p:first-child {
font-size: 1.5em !important;
margin-bottom: 0;
margin-top: 0;
padding-bottom: 0;
}
> .btn {
margin-bottom: 2em;
}
} }
.file-drag-and-drop-hashing-dialog { .file-drag-and-drop-hashing-dialog {
@ -150,7 +137,7 @@
width: 104px; width: 104px;
.action-file, .spinner-file { .action-file, .spinner-file {
margin-top: .8em; margin-top: 1em;
} }
.ascribe-progress-bar + .action-file, .ascribe-progress-bar + .spinner-file { .ascribe-progress-bar + .action-file, .ascribe-progress-bar + .spinner-file {