mirror of
https://github.com/haiwen/seahub.git
synced 2025-07-14 07:24:58 +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;
|
path = path[path.length - 1] === '/' ? path.slice(0, path.length - 1) : path;
|
||||||
let pathList = path.split('/');
|
let pathList = path.split('/');
|
||||||
let nodePath = '';
|
let nodePath = '';
|
||||||
|
if (pathList.length === 2 && !pathList[0] && pathList[1] === PRIVATE_FILE_TYPE.FILE_EXTENDED_PROPERTIES) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
let pathElem = pathList.map((item, index) => {
|
let pathElem = pathList.map((item, index) => {
|
||||||
if (item === '') {
|
if (item === '') {
|
||||||
return null;
|
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) => {
|
onOpenFile = (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
let { path, repoID } = this.props;
|
let { path, repoID, currentDirent } = this.props;
|
||||||
let newUrl = siteRoot + 'lib/' + repoID + '/file' + Utils.encodePath(path);
|
let { name } = currentDirent || {};
|
||||||
|
let newUrl = siteRoot + 'lib/' + repoID + '/file' + Utils.encodePath(path) + '/' + name;
|
||||||
window.open(newUrl, '_blank');
|
window.open(newUrl, '_blank');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user