1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-31 22:54:11 +00:00

solve compatibility problems

This commit is contained in:
shanshuirenjia
2019-06-04 16:18:32 +08:00
parent 9ba1278eca
commit a0d5ad5e93
6 changed files with 27 additions and 7 deletions

View File

@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import listener from './globalEventListener';
import { hideMenu } from './actions';
import { callIfExists } from './helpers';
import { Utils } from '../../utils/utils';
const propTypes = {
id: PropTypes.string.isRequired,
@@ -192,7 +193,7 @@ class ContextMenu extends React.Component {
onMenuItemClick = (event) => {
event.stopPropagation();
let operation = event.target.dataset.operation;
let operation = Utils.getEventData(event, 'operation');
let currentObject = this.state.currentObject;
this.props.onMenuItemClick(operation, currentObject, event);
}

View File

@@ -4,6 +4,7 @@ import { Link } from '@reach/router';
import { UncontrolledTooltip } from 'reactstrap';
import { siteRoot, gettext } from '../../utils/constants';
import InternalLinkDialog from '../dialog/internal-link-dialog';
import { Utils } from '../../utils/utils';
const propTypes = {
repoName: PropTypes.string.isRequired,
@@ -19,7 +20,7 @@ const propTypes = {
class DirPath extends React.Component {
onPathClick = (e) => {
let path = e.target.dataset.path;
let path = Utils.getEventData(e, 'path');
this.props.onPathClick(path);
}