1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-28 08:06:56 +00:00

Merge branch '7.0'

This commit is contained in:
lian
2019-12-04 10:02:06 +08:00
6 changed files with 184 additions and 112 deletions

View File

@@ -198,6 +198,10 @@ class ContextMenu extends React.Component {
this.props.onMenuItemClick(operation, currentObject, event);
}
onContextMenu = (event) => {
event.stopPropagation();
}
render() {
const inlineStyle = { position: 'fixed', opacity: 0, pointerEvents: 'none', display: 'block' };
return (
@@ -212,6 +216,7 @@ class ContextMenu extends React.Component {
className="seafile-contextmenu-item dropdown-item"
data-operation={menuItem.key}
onClick={this.onMenuItemClick}
onContextMenu={this.onContextMenu}
>
{menuItem.value}
</button>

View File

@@ -76,8 +76,9 @@ class GenerateShareLink extends React.Component {
getDirentInfoAPI = seafileAPI.getDirInfo(repoID, path);
}
getDirentInfoAPI.then((res) => {
let canEdit = res.data.can_edit;
let permission = res.data.permission;
let permissionOptions = Utils.getShareLinkPermissionList(this.props.itemType, permission, path);
let permissionOptions = Utils.getShareLinkPermissionList(this.props.itemType, permission, path, canEdit);
this.setState({
permissionOptions: permissionOptions,
currentPermission: permissionOptions[0],