mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-09 10:50:24 +00:00
@@ -65,7 +65,7 @@ class DirPath extends React.Component {
|
||||
|
||||
onDragEnter = (e) => {
|
||||
e.preventDefault();
|
||||
if (Utils.isIEBrower()) {
|
||||
if (Utils.isIEBrowser()) {
|
||||
return false;
|
||||
}
|
||||
this.setState({
|
||||
@@ -75,7 +75,7 @@ class DirPath extends React.Component {
|
||||
|
||||
onDragLeave = (e) => {
|
||||
e.preventDefault();
|
||||
if (Utils.isIEBrower()) {
|
||||
if (Utils.isIEBrowser()) {
|
||||
return false;
|
||||
}
|
||||
this.setState({
|
||||
@@ -84,7 +84,7 @@ class DirPath extends React.Component {
|
||||
};
|
||||
|
||||
onDragOver = (e) => {
|
||||
if (Utils.isIEBrower()) {
|
||||
if (Utils.isIEBrowser()) {
|
||||
return false;
|
||||
}
|
||||
e.preventDefault();
|
||||
@@ -92,7 +92,7 @@ class DirPath extends React.Component {
|
||||
};
|
||||
|
||||
onDrop = (e) => {
|
||||
if (Utils.isIEBrower()) {
|
||||
if (Utils.isIEBrowser()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@@ -108,7 +108,7 @@ class DirentGridItem extends React.Component {
|
||||
};
|
||||
|
||||
onGridItemDragStart = (e) => {
|
||||
if (Utils.isIEBrower() || !this.canDrag) {
|
||||
if (Utils.isIEBrowser() || !this.canDrag) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ class DirentGridItem extends React.Component {
|
||||
};
|
||||
|
||||
onGridItemDragEnter = (e) => {
|
||||
if (Utils.isIEBrower() || !this.canDrag) {
|
||||
if (Utils.isIEBrowser() || !this.canDrag) {
|
||||
return false;
|
||||
}
|
||||
if (this.props.dirent.type === 'dir') {
|
||||
@@ -134,7 +134,7 @@ class DirentGridItem extends React.Component {
|
||||
};
|
||||
|
||||
onGridItemDragOver = (e) => {
|
||||
if (Utils.isIEBrower() || !this.canDrag) {
|
||||
if (Utils.isIEBrowser() || !this.canDrag) {
|
||||
return false;
|
||||
}
|
||||
e.preventDefault();
|
||||
@@ -142,14 +142,14 @@ class DirentGridItem extends React.Component {
|
||||
};
|
||||
|
||||
onGridItemDragLeave = (e) => {
|
||||
if (Utils.isIEBrower() || !this.canDrag) {
|
||||
if (Utils.isIEBrowser() || !this.canDrag) {
|
||||
return false;
|
||||
}
|
||||
this.setState({ isGridDropTipShow: false });
|
||||
};
|
||||
|
||||
onGridItemDragDrop = (e) => {
|
||||
if (Utils.isIEBrower() || !this.canDrag) {
|
||||
if (Utils.isIEBrowser() || !this.canDrag) {
|
||||
return false;
|
||||
}
|
||||
this.setState({ isGridDropTipShow: false });
|
||||
|
@@ -491,7 +491,7 @@ class DirentListItem extends React.Component {
|
||||
};
|
||||
|
||||
onItemDragStart = (e) => {
|
||||
if (Utils.isIEBrower() || !this.state.canDrag) {
|
||||
if (Utils.isIEBrowser() || !this.state.canDrag) {
|
||||
return false;
|
||||
}
|
||||
e.dataTransfer.effectAllowed = 'move';
|
||||
@@ -521,7 +521,7 @@ class DirentListItem extends React.Component {
|
||||
};
|
||||
|
||||
onItemDragEnter = (e) => {
|
||||
if (Utils.isIEBrower() || !this.state.canDrag) {
|
||||
if (Utils.isIEBrowser() || !this.state.canDrag) {
|
||||
return false;
|
||||
}
|
||||
if (this.props.dirent.type === 'dir') {
|
||||
@@ -531,7 +531,7 @@ class DirentListItem extends React.Component {
|
||||
};
|
||||
|
||||
onItemDragOver = (e) => {
|
||||
if (Utils.isIEBrower() || !this.state.canDrag) {
|
||||
if (Utils.isIEBrowser() || !this.state.canDrag) {
|
||||
return false;
|
||||
}
|
||||
if (e.dataTransfer.dropEffect === 'copy') {
|
||||
@@ -542,7 +542,7 @@ class DirentListItem extends React.Component {
|
||||
};
|
||||
|
||||
onItemDragLeave = (e) => {
|
||||
if (Utils.isIEBrower() || !this.state.canDrag) {
|
||||
if (Utils.isIEBrowser() || !this.state.canDrag) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -553,7 +553,7 @@ class DirentListItem extends React.Component {
|
||||
};
|
||||
|
||||
onItemDragDrop = (e) => {
|
||||
if (Utils.isIEBrower() || !this.state.canDrag) {
|
||||
if (Utils.isIEBrowser() || !this.state.canDrag) {
|
||||
return false;
|
||||
}
|
||||
this.setState({ isDropTipshow: false });
|
||||
|
@@ -513,7 +513,7 @@ class DirentListView extends React.Component {
|
||||
};
|
||||
|
||||
onTableDragEnter = (e) => {
|
||||
if (Utils.isIEBrower() || !this.canDrop) {
|
||||
if (Utils.isIEBrowser() || !this.canDrop) {
|
||||
return false;
|
||||
}
|
||||
this.enteredCounter++;
|
||||
@@ -526,7 +526,7 @@ class DirentListView extends React.Component {
|
||||
};
|
||||
|
||||
onTableDragOver = (e) => {
|
||||
if (Utils.isIEBrower() || !this.canDrop) {
|
||||
if (Utils.isIEBrowser() || !this.canDrop) {
|
||||
return false;
|
||||
}
|
||||
if (e.dataTransfer.dropEffect === 'copy') {
|
||||
@@ -537,7 +537,7 @@ class DirentListView extends React.Component {
|
||||
};
|
||||
|
||||
onTableDragLeave = (e) => {
|
||||
if (Utils.isIEBrower() || !this.canDrop) {
|
||||
if (Utils.isIEBrowser() || !this.canDrop) {
|
||||
return false;
|
||||
}
|
||||
this.enteredCounter--;
|
||||
@@ -547,7 +547,7 @@ class DirentListView extends React.Component {
|
||||
};
|
||||
|
||||
tableDrop = (e) => {
|
||||
if (Utils.isIEBrower() || !this.canDrop) {
|
||||
if (Utils.isIEBrowser() || !this.canDrop) {
|
||||
return false;
|
||||
}
|
||||
e.persist();
|
||||
|
@@ -28,7 +28,7 @@ class DirentsDraggedPreview extends React.Component {
|
||||
};
|
||||
|
||||
handleDragOver = (event) => {
|
||||
if (Utils.isIEBrower()) {
|
||||
if (Utils.isIEBrowser()) {
|
||||
return false;
|
||||
}
|
||||
event.preventDefault();
|
||||
|
@@ -108,14 +108,14 @@ class TreeNodeView extends React.Component {
|
||||
};
|
||||
|
||||
onNodeDragStart = (e) => {
|
||||
if (Utils.isIEBrower() || !this.canDrag) {
|
||||
if (Utils.isIEBrowser() || !this.canDrag) {
|
||||
return false;
|
||||
}
|
||||
this.props.onNodeDragStart(e, this.props.node);
|
||||
};
|
||||
|
||||
onNodeDragEnter = (e) => {
|
||||
if (Utils.isIEBrower() || !this.canDrag) {
|
||||
if (Utils.isIEBrowser() || !this.canDrag) {
|
||||
return false;
|
||||
}
|
||||
if (this.props.node.object.type === 'dir') {
|
||||
@@ -125,14 +125,14 @@ class TreeNodeView extends React.Component {
|
||||
};
|
||||
|
||||
onNodeDragMove = (e) => {
|
||||
if (Utils.isIEBrower() || !this.canDrag) {
|
||||
if (Utils.isIEBrowser() || !this.canDrag) {
|
||||
return false;
|
||||
}
|
||||
this.props.onNodeDragMove(e);
|
||||
};
|
||||
|
||||
onNodeDragLeave = (e) => {
|
||||
if (Utils.isIEBrower() || !this.canDrag) {
|
||||
if (Utils.isIEBrowser() || !this.canDrag) {
|
||||
return false;
|
||||
}
|
||||
this.setState({ isNodeDropShow: false });
|
||||
@@ -140,7 +140,7 @@ class TreeNodeView extends React.Component {
|
||||
};
|
||||
|
||||
onNodeDrop = (e) => {
|
||||
if (Utils.isIEBrower() || !this.canDrag) {
|
||||
if (Utils.isIEBrowser() || !this.canDrag) {
|
||||
return false;
|
||||
}
|
||||
e.stopPropagation();
|
||||
|
@@ -49,7 +49,7 @@ class TreeView extends React.Component {
|
||||
};
|
||||
|
||||
onNodeDragStart = (e, node) => {
|
||||
if (Utils.isIEBrower()) {
|
||||
if (Utils.isIEBrowser()) {
|
||||
return false;
|
||||
}
|
||||
let dragStartNodeData = { nodeDirent: node.object, nodeParentPath: node.parentNode.path, nodeRootPath: node.path };
|
||||
@@ -60,7 +60,7 @@ class TreeView extends React.Component {
|
||||
};
|
||||
|
||||
onNodeDragEnter = (e, node) => {
|
||||
if (Utils.isIEBrower() || !this.canDrop) {
|
||||
if (Utils.isIEBrowser() || !this.canDrop) {
|
||||
return false;
|
||||
}
|
||||
e.persist();
|
||||
@@ -72,7 +72,7 @@ class TreeView extends React.Component {
|
||||
};
|
||||
|
||||
onNodeDragMove = (e) => {
|
||||
if (Utils.isIEBrower() || !this.canDrop) {
|
||||
if (Utils.isIEBrowser() || !this.canDrop) {
|
||||
return false;
|
||||
}
|
||||
e.preventDefault();
|
||||
@@ -80,7 +80,7 @@ class TreeView extends React.Component {
|
||||
};
|
||||
|
||||
onNodeDragLeave = (e, node) => {
|
||||
if (Utils.isIEBrower() || !this.canDrop) {
|
||||
if (Utils.isIEBrowser() || !this.canDrop) {
|
||||
return false;
|
||||
}
|
||||
if (e.target.className === 'tree-view tree tree-view-drop') {
|
||||
@@ -100,7 +100,7 @@ class TreeView extends React.Component {
|
||||
};
|
||||
|
||||
onNodeDrop = (e, node) => {
|
||||
if (Utils.isIEBrower() || !this.canDrop) {
|
||||
if (Utils.isIEBrowser() || !this.canDrop) {
|
||||
return false;
|
||||
}
|
||||
if (e.dataTransfer.files.length) { // uploaded files
|
||||
|
@@ -28,7 +28,7 @@ const ViewItem = ({
|
||||
return true;
|
||||
}, [userPerm]);
|
||||
const canDrop = useMemo(() => {
|
||||
if (Utils.isIEBrower() || !canUpdate) return false;
|
||||
if (Utils.isIEBrowser() || !canUpdate) return false;
|
||||
return true;
|
||||
}, [canUpdate]);
|
||||
const operations = useMemo(() => {
|
||||
|
@@ -347,7 +347,7 @@ export const Utils = {
|
||||
navigator.userAgent.indexOf('Safari') > -1;
|
||||
},
|
||||
|
||||
isIEBrower: function () { // is ie <= ie11 not include Edge
|
||||
isIEBrowser: function () { // is ie <= ie11 not include Edge
|
||||
var userAgent = navigator.userAgent;
|
||||
var isIE = userAgent.indexOf('compatible') > -1 && userAgent.indexOf('MSIE') > -1;
|
||||
var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf('rv:11.0') > -1;
|
||||
|
Reference in New Issue
Block a user