mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-05 17:02:47 +00:00
Repair eslint wraning (#2453)
This commit is contained in:
@@ -8,6 +8,7 @@ moment.locale(lang);
|
||||
const propTypes = {
|
||||
isItemFreezed: PropTypes.bool.isRequired,
|
||||
onMenuToggleClick: PropTypes.func.isRequired,
|
||||
draft: PropTypes.object.isRequired,
|
||||
};
|
||||
|
||||
class DraftListItem extends React.Component {
|
||||
@@ -49,14 +50,14 @@ class DraftListItem extends React.Component {
|
||||
let filePath = draft.draft_file_path;
|
||||
let repoID = draft.origin_repo_id;
|
||||
let url = siteRoot + 'lib/' + repoID + '/file' + filePath + '?mode=edit&draft_id=' + draft.id;
|
||||
window.open(url)
|
||||
window.open(url);
|
||||
}
|
||||
|
||||
onLibraryClick = () => {
|
||||
let draft = this.props.draft;
|
||||
let repoID = draft.origin_repo_id;
|
||||
let url = siteRoot + '#common/lib/' + repoID;
|
||||
window.open(url)
|
||||
window.open(url);
|
||||
}
|
||||
|
||||
onReviewClick = () => {
|
||||
@@ -77,7 +78,7 @@ class DraftListItem extends React.Component {
|
||||
localTime = moment(localTime).fromNow();
|
||||
return (
|
||||
<tr className={this.state.highlight} onMouseEnter={this.onMouseEnter} onMouseLeave={this.onMouseLeave}>
|
||||
<td className="icon"><img src={siteRoot + 'media/img/file/192/txt.png'} /></td>
|
||||
<td className="icon"><img src={siteRoot + 'media/img/file/192/txt.png'} alt='icon' /></td>
|
||||
<td className="name a-simulate" onClick={this.onDraftEditClick}>{fileName}</td>
|
||||
<td className="library a-simulate" onClick={this.onLibraryClick}>{draft.repo_name}</td>
|
||||
<td className="review">
|
||||
|
@@ -3,10 +3,12 @@ import PropTypes from 'prop-types';
|
||||
import { gettext } from '../../utils/constants';
|
||||
|
||||
const propTypes = {
|
||||
currentDraft: PropTypes.object.isRequired,
|
||||
isMenuShow: PropTypes.bool.isRequired,
|
||||
menuPosition: PropTypes.object.isRequired,
|
||||
onDeleteHandler: PropTypes.func.isRequired,
|
||||
onPublishHandler: PropTypes.func.isRequired
|
||||
onPublishHandler: PropTypes.func.isRequired,
|
||||
onReviewHandler: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
class DraftListMenu extends React.Component {
|
||||
|
Reference in New Issue
Block a user