mirror of
https://github.com/haiwen/seahub.git
synced 2025-07-14 15:35:35 +00:00
fix file extended properties path (#6739)
* fix file extended properties path * delete ueseless codes
This commit is contained in:
parent
0bd807ecbf
commit
b32c4ab215
@ -122,6 +122,9 @@ class DirPath extends React.Component {
|
||||
path = path[path.length - 1] === '/' ? path.slice(0, path.length - 1) : path;
|
||||
let pathList = path.split('/');
|
||||
let nodePath = '';
|
||||
if (pathList.length === 2 && !pathList[0] && pathList[1] === PRIVATE_FILE_TYPE.FILE_EXTENDED_PROPERTIES) {
|
||||
return null;
|
||||
}
|
||||
let pathElem = pathList.map((item, index) => {
|
||||
if (item === '') {
|
||||
return null;
|
||||
|
@ -36,17 +36,11 @@ class DirColumnFile extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
onEditClick = (e) => {
|
||||
e.preventDefault();
|
||||
let { path, repoID } = this.props;
|
||||
let url = siteRoot + 'lib/' + repoID + '/file' + Utils.encodePath(path) + '?mode=edit';
|
||||
window.open(url);
|
||||
};
|
||||
|
||||
onOpenFile = (e) => {
|
||||
e.preventDefault();
|
||||
let { path, repoID } = this.props;
|
||||
let newUrl = siteRoot + 'lib/' + repoID + '/file' + Utils.encodePath(path);
|
||||
let { path, repoID, currentDirent } = this.props;
|
||||
let { name } = currentDirent || {};
|
||||
let newUrl = siteRoot + 'lib/' + repoID + '/file' + Utils.encodePath(path) + '/' + name;
|
||||
window.open(newUrl, '_blank');
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user