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

Resolve PR comments

This commit is contained in:
Brett Sun 2016-06-17 18:26:38 +02:00
parent 685ac0d941
commit 9c47c22e91
3 changed files with 4 additions and 6 deletions

View File

@ -73,7 +73,7 @@ const InputContractAgreementCheckbox = React.createClass({
// If there is no contract available, hide this `Property` from the user // If there is no contract available, hide this `Property` from the user
this.props.setExpanded(!!contractAgreement); this.props.setExpanded(!!contractAgreement);
state = Object.assign(state, { this.setState({
value: { value: {
// If `email` is defined in this component, `getContractAgreementsOrCreatePublic` // If `email` is defined in this component, `getContractAgreementsOrCreatePublic`
// is either: // is either:
@ -93,8 +93,6 @@ const InputContractAgreementCheckbox = React.createClass({
terms: !contractAgreement || !!contractAgreement.datetime_accepted terms: !contractAgreement || !!contractAgreement.datetime_accepted
} }
}); });
this.setState(state);
}, },
onChange(event) { onChange(event) {

View File

@ -76,7 +76,7 @@ const FileDragAndDropPreview = React.createClass({
if (numberOfDisplayedFiles === 1) { if (numberOfDisplayedFiles === 1) {
return ( return (
<span className="file-name"> <span className="file-name">
{truncateText(file.name, 30, '(...).' + extractFileExtensionFromString(file.name))} {truncateText(file.name, 30, `(...).${extractFileExtensionFromString(file.name)}`)}
</span> </span>
); );
} else { } else {

View File

@ -127,7 +127,7 @@ export default function UploadButton({ className = 'btn btn-default btn-sm', sho
if (uploadingFiles.length) { if (uploadingFiles.length) {
return ( return (
<span> <span>
{' ' + truncateText(uploadingFiles[0].name, 40) + ' '} {` ${truncateText(uploadingFiles[0].name, 40)} `}
[<a onClick={this.onClickRemove}>{getLangText('cancel upload')}</a>] [<a onClick={this.onClickRemove}>{getLangText('cancel upload')}</a>]
</span> </span>
); );
@ -135,7 +135,7 @@ export default function UploadButton({ className = 'btn btn-default btn-sm', sho
return ( return (
<span> <span>
<span className='ascribe-icon icon-ascribe-ok'/> <span className='ascribe-icon icon-ascribe-ok'/>
{' ' + truncateText(uploadedFile.name, 40) + ' '} {` ${truncateText(uploadedFile.name, 40)} `}
[<a onClick={this.onClickRemove}>{getLangText('remove')}</a>] [<a onClick={this.onClickRemove}>{getLangText('remove')}</a>]
</span> </span>
); );