mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 23:20:51 +00:00
Item right menu (#3203)
* Add item right menu * Add item right menu * Pass value bug * Add item right menu * modify style problem * Add some style * Modifying naming issues * Modify Priority * Add showShare jurisdiction and modify priority * Modify subscript to itemIndex * Communication between sibling components * Improve interaction * modify style problem * Promotion isItemFreezed and onUnfreezedItem level * modify bugs * have tree-node bug * Solve tree-node item-click bug * Complete right click menu * modify style * modify style * item-right-menu finash * modify style to dirent-=list-item * modify some style problem * modify styles * stop thead contextmenu
This commit is contained in:
@@ -84,6 +84,7 @@ class LibContentContainer extends React.Component {
|
||||
super(props);
|
||||
this.state = {
|
||||
currentDirent: null,
|
||||
appMenuType: 'item_op_menu',
|
||||
};
|
||||
|
||||
this.errMessage = (<div className="message err-tip">{gettext('Folder does not exist.')}</div>);
|
||||
@@ -117,6 +118,25 @@ class LibContentContainer extends React.Component {
|
||||
this.props.closeDirentDetail();
|
||||
}
|
||||
|
||||
switchAnotherMenuToShow = (type) => {
|
||||
switch(type) {
|
||||
case 'list_view_contextmenu':
|
||||
this.setState({appMenuType: 'list_view_contextmenu'});
|
||||
break;
|
||||
case 'item_contextmenu':
|
||||
this.setState({appMenuType: 'item_contextmenu'});
|
||||
break;
|
||||
case 'tree_contextmenu':
|
||||
this.setState({appMenuType: 'tree_contextmenu'});
|
||||
break;
|
||||
case 'item_op_menu':
|
||||
this.setState({appMenuType: 'item_op_menu'});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
componentWillReceiveProps (nextProps) {
|
||||
if (nextProps.isDirentDetailShow) {
|
||||
this.setState({
|
||||
@@ -190,6 +210,9 @@ class LibContentContainer extends React.Component {
|
||||
updateDirent={this.props.updateDirent}
|
||||
isAllItemSelected={this.props.isAllDirentSelected}
|
||||
onAllItemSelected={this.props.onAllDirentSelected}
|
||||
appMenuType={this.state.appMenuType}
|
||||
switchAnotherMenuToShow={this.switchAnotherMenuToShow}
|
||||
onAddFolder={this.props.onAddFolder}
|
||||
/>
|
||||
)}
|
||||
{this.props.currentMode === 'grid' && (
|
||||
@@ -248,6 +271,9 @@ class LibContentContainer extends React.Component {
|
||||
updateDirent={this.props.updateDirent}
|
||||
isAllItemSelected={this.props.isAllDirentSelected}
|
||||
onAllItemSelected={this.props.onAllDirentSelected}
|
||||
appMenuType={this.state.appMenuType}
|
||||
switchAnotherMenuToShow={this.switchAnotherMenuToShow}
|
||||
onAddFolder={this.props.onAddFolder}
|
||||
/>
|
||||
)}
|
||||
</Fragment>
|
||||
|
Reference in New Issue
Block a user