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

Active item bug repair (#3260)

* repair interactive bug

* modify active color

* repair bug
This commit is contained in:
杨顺强
2019-04-13 09:57:44 +08:00
committed by Daniel Pan
parent 8ac5c9be9b
commit fce77f9985
4 changed files with 27 additions and 19 deletions

View File

@@ -303,10 +303,14 @@ class DirentListView extends React.Component {
this.handleContextClick(event, id, menuList);
} else {
if (this.props.selectedDirentList.length === 1) {
let dirent = this.props.selectedDirentList[0];
let id = 'dirent-item-menu';
let menuList = this.getDirentItemMenuList(dirent, true);
this.handleContextClick(event, id, menuList, dirent);
this.props.onDirentClick(null);
event.preventDefault();
event.persist();
setTimeout(() => {
let id = "dirent-container-menu"
let menuList = [TextTranslation.NEW_FOLDER, TextTranslation.NEW_FILE];
this.handleContextClick(event, id, menuList);
}, 0);
} else {
let id = 'dirents-menu';
let menuList = [TextTranslation.MOVE, TextTranslation.COPY, TextTranslation.DOWNLOAD, TextTranslation.DELETE];
@@ -366,11 +370,10 @@ class DirentListView extends React.Component {
}
onItemContextMenu = (event, dirent) => {
if (this.props.selectedDirentList.length === 0) {
let id = 'dirent-item-menu';
let menuList = this.getDirentItemMenuList(dirent, true);
this.handleContextClick(event, id, menuList, dirent);
}
this.props.onDirentClick(dirent);
let id = 'dirent-item-menu';
let menuList = this.getDirentItemMenuList(dirent, true);
this.handleContextClick(event, id, menuList, dirent);
}
setDirentItemRef = (index) => item => {