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:
@@ -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);
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user