mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-08 18:30:53 +00:00
Use the same parameter
This commit is contained in:
@@ -59,7 +59,6 @@ class DirentGridView extends React.Component{
|
|||||||
isCreateFileDialogShow: false,
|
isCreateFileDialogShow: false,
|
||||||
|
|
||||||
isMutipleOperation: false,
|
isMutipleOperation: false,
|
||||||
contextMenuDirent: '',
|
|
||||||
isGridItemFreezed: false,
|
isGridItemFreezed: false,
|
||||||
activeDirent: null,
|
activeDirent: null,
|
||||||
}
|
}
|
||||||
@@ -264,7 +263,7 @@ class DirentGridView extends React.Component{
|
|||||||
this.setState({
|
this.setState({
|
||||||
isRenameDialogShow: !this.state.isRenameDialogShow,
|
isRenameDialogShow: !this.state.isRenameDialogShow,
|
||||||
});
|
});
|
||||||
this.props.onItemRename(this.state.contextMenuDirent, newName)
|
this.props.onItemRename(this.state.activeDirent, newName)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -351,9 +350,8 @@ class DirentGridView extends React.Component{
|
|||||||
|
|
||||||
gridContainerClick = () => {
|
gridContainerClick = () => {
|
||||||
if (!this.props.isDirentDetailShow) {
|
if (!this.props.isDirentDetailShow) {
|
||||||
this.props.onGridItemClick(null);
|
this.onGridItemClick(null);
|
||||||
}
|
}
|
||||||
this.onGridItemClick(null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onGridContainContextMenu = (event) => {
|
onGridContainContextMenu = (event) => {
|
||||||
@@ -384,7 +382,7 @@ class DirentGridView extends React.Component{
|
|||||||
|
|
||||||
hideMenu();
|
hideMenu();
|
||||||
|
|
||||||
this.setState({contextMenuDirent: currentObject});
|
this.setState({activeDirent: currentObject});
|
||||||
|
|
||||||
let showMenuConfig = {
|
let showMenuConfig = {
|
||||||
id: id,
|
id: id,
|
||||||
@@ -476,7 +474,7 @@ class DirentGridView extends React.Component{
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
let {direntList, path} = this.props;
|
let {direntList, path} = this.props;
|
||||||
let dirent = this.state.contextMenuDirent ? this.state.contextMenuDirent : '';
|
let dirent = this.state.activeDirent ? this.state.activeDirent : '';
|
||||||
let direntPath = Utils.joinPath(path, dirent.name);
|
let direntPath = Utils.joinPath(path, dirent.name);
|
||||||
|
|
||||||
if (this.props.isDirentListLoading) {
|
if (this.props.isDirentListLoading) {
|
||||||
@@ -543,7 +541,7 @@ class DirentGridView extends React.Component{
|
|||||||
isMutipleOperation={this.state.isMutipleOperation}
|
isMutipleOperation={this.state.isMutipleOperation}
|
||||||
onItemMove={this.props.onItemMove}
|
onItemMove={this.props.onItemMove}
|
||||||
onCancelMove={this.onMoveToggle}
|
onCancelMove={this.onMoveToggle}
|
||||||
dirent={this.state.contextMenuDirent}
|
dirent={this.state.activeDirent}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
{this.state.isZipDialogOpen &&
|
{this.state.isZipDialogOpen &&
|
||||||
@@ -564,7 +562,7 @@ class DirentGridView extends React.Component{
|
|||||||
isMutipleOperation={this.state.isMutipleOperation}
|
isMutipleOperation={this.state.isMutipleOperation}
|
||||||
onItemCopy={this.props.onItemCopy}
|
onItemCopy={this.props.onItemCopy}
|
||||||
onCancelCopy={this.onCopyToggle}
|
onCancelCopy={this.onCopyToggle}
|
||||||
dirent={this.state.contextMenuDirent}
|
dirent={this.state.activeDirent}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
{this.state.isShareDialogShow &&
|
{this.state.isShareDialogShow &&
|
||||||
@@ -585,7 +583,7 @@ class DirentGridView extends React.Component{
|
|||||||
{this.state.isRenameDialogShow && (
|
{this.state.isRenameDialogShow && (
|
||||||
<ModalPortal>
|
<ModalPortal>
|
||||||
<Rename
|
<Rename
|
||||||
dirent={this.state.contextMenuDirent}
|
dirent={this.state.activeDirent}
|
||||||
onRename={this.onItemRename}
|
onRename={this.onItemRename}
|
||||||
checkDuplicatedName={this.checkDuplicatedName}
|
checkDuplicatedName={this.checkDuplicatedName}
|
||||||
toggleCancel={this.onItemRenameToggle}
|
toggleCancel={this.onItemRenameToggle}
|
||||||
|
Reference in New Issue
Block a user