My Files: add handler for closing delete modal
This commit is contained in:
parent
3dd961b70a
commit
5f5a460a6d
1 changed files with 7 additions and 1 deletions
|
@ -28,6 +28,11 @@ var MyFilesRowMoreMenu = React.createClass({
|
||||||
modal: null,
|
modal: null,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
closeModal: function() {
|
||||||
|
this.setState({
|
||||||
|
modal: null,
|
||||||
|
});
|
||||||
|
},
|
||||||
getInitialState: function() {
|
getInitialState: function() {
|
||||||
return {
|
return {
|
||||||
modal: null,
|
modal: null,
|
||||||
|
@ -43,7 +48,8 @@ var MyFilesRowMoreMenu = React.createClass({
|
||||||
<MenuItem onClick={this.handleDeleteClicked} label="Remove and delete file" />
|
<MenuItem onClick={this.handleDeleteClicked} label="Remove and delete file" />
|
||||||
</section>
|
</section>
|
||||||
</Menu>
|
</Menu>
|
||||||
<Modal isOpen={this.state.modal == 'confirmDelete'} type="confirm" confirmButtonLabel="Delete File" onConfirmed={this.handleDeleteConfirmed}>
|
<Modal isOpen={this.state.modal == 'confirmDelete'} type="confirm" confirmButtonLabel="Delete File"
|
||||||
|
onConfirmed={this.handleDeleteConfirmed} onAborted={this.closeModal}>
|
||||||
Are you sure you'd like to delete <cite>{this.props.title}</cite>? This will {this.props.completed ? ' stop the download and ' : ''}
|
Are you sure you'd like to delete <cite>{this.props.title}</cite>? This will {this.props.completed ? ' stop the download and ' : ''}
|
||||||
permanently remove the file from your system.
|
permanently remove the file from your system.
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
Loading…
Add table
Reference in a new issue