mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-04 00:20:07 +00:00
optimized onsearched handle
This commit is contained in:
@@ -186,16 +186,8 @@ class FileHistory extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
onSearchedClick = (selectedItem) => {
|
||||
if (selectedItem.is_dir === true) {
|
||||
let url = siteRoot + 'library/' + selectedItem.repo_id + '/' + selectedItem.repo_name + selectedItem.path;
|
||||
let newWindow = window.open('about:blank');
|
||||
newWindow.location.href = url;
|
||||
} else {
|
||||
let url = siteRoot + 'lib/' + selectedItem.repo_id + '/file' + Utils.encodePath(selectedItem.path);
|
||||
let newWindow = window.open('about:blank');
|
||||
newWindow.location.href = url;
|
||||
}
|
||||
onSearchedClick = (searchedItem) => {
|
||||
Utils.handleSearchedItemClick(searchedItem);
|
||||
}
|
||||
|
||||
render() {
|
||||
|
Reference in New Issue
Block a user