1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-17 15:53:28 +00:00

fix warnings

fix warnings in previous codes
This commit is contained in:
Michael An
2019-04-17 18:21:00 +08:00
parent 5a835ad397
commit 73d41e2b57
18 changed files with 99 additions and 99 deletions

View File

@@ -157,7 +157,7 @@ class CopyDirent extends React.Component {
} else {
title = gettext('Copy selected item(s) to:');
}
let mode = this.props.repoEncrypted ? 'only_current_library':'current_repo_and_other_repos'
let mode = this.props.repoEncrypted ? 'only_current_library':'current_repo_and_other_repos';
return (
<Modal isOpen={true} toggle={this.toggle}>
<ModalHeader toggle={this.toggle}><div dangerouslySetInnerHTML={{__html: title}}></div></ModalHeader>

View File

@@ -130,8 +130,8 @@ class LibHistorySetting extends React.Component {
</Form>
</ModalBody>
<ModalFooter>
<Button color="secondary" onClick={this.props.toggleDialog}>{gettext('Cancel')}</Button>
<Button color="primary" onClick={this.submit}>{gettext('Submit')}</Button>
<Button color="secondary" onClick={this.props.toggleDialog}>{gettext('Cancel')}</Button>
<Button color="primary" onClick={this.submit}>{gettext('Submit')}</Button>
</ModalFooter>
</Modal>
);

View File

@@ -36,7 +36,7 @@ class ListCreatedFileDialog extends React.Component {
if (item.name.endsWith('(draft).md')) {
fileURL = serviceURL + '/drafts/' + item.draft_id + '/';
}
let fileLink = <a href={fileURL} target='_blank'>{item.name}</a>
let fileLink = <a href={fileURL} target='_blank'>{item.name}</a>;
if (item.name.endsWith('(draft).md') && !item.draft_id) {
fileLink = item.name;
}

View File

@@ -127,7 +127,7 @@ class TaggedFile extends React.Component {
return ( taggedFile.file_deleted ?
<tr onMouseEnter={this.onMouseEnter} onMouseLeave={this.onMouseLeave}>
<td colSpan='3' className="name">{taggedFile.filename}{' '}
<span style={{color:"red"}}>{gettext('deleted')}</span>
<span style={{color:'red'}}>{gettext('deleted')}</span>
</td>
<td><i className={className} onClick={this.props.onDeleteTaggedFile.bind(this, taggedFile)}></i></td>
</tr>

View File

@@ -157,7 +157,7 @@ class MoveDirent extends React.Component {
} else {
title = gettext('Move selected item(s) to:');
}
let mode = this.props.repoEncrypted ? 'only_current_library':'current_repo_and_other_repos'
let mode = this.props.repoEncrypted ? 'only_current_library':'current_repo_and_other_repos';
return (
<Modal isOpen={true} toggle={this.toggle}>
<ModalHeader toggle={this.toggle}><div dangerouslySetInnerHTML={{__html: title}}></div></ModalHeader>