1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-04 00:20:07 +00:00

Optimized module code (#2574)

This commit is contained in:
杨顺强
2018-11-28 12:41:49 +08:00
committed by Daniel Pan
parent 330407be0b
commit 09f32f2312
21 changed files with 120 additions and 38 deletions

View File

@@ -1,7 +1,7 @@
import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
import { Utils } from '../../utils/utils';
import { gettext, serviceUrl } from '../../utils/constants';
import { gettext } from '../../utils/constants';
import ModalPortal from '../modal-portal';
import CreateFolder from '../../components/dialog/create-folder-dialog';
import CreateFile from '../../components/dialog/create-file-dialog';
@@ -10,6 +10,7 @@ const propTypes = {
isViewFile: PropTypes.bool,
path: PropTypes.string.isRequired,
repoID: PropTypes.string.isRequired,
serviceUrl: PropTypes.string.isRequired,
permission: PropTypes.string.isRequired,
onAddFile: PropTypes.func.isRequired,
onAddFolder: PropTypes.func.isRequired,
@@ -57,7 +58,7 @@ class DirOperationToolbar extends React.Component {
onEditClick = (e) => {
e.preventDefault();
let { path, repoID} = this.props;
let { path, repoID, serviceUrl } = this.props;
window.location.href= serviceUrl + '/lib/' + repoID + '/file' + path + '?mode=edit';
}