mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 15:09:14 +00:00
@@ -230,6 +230,14 @@ class DirentListItem extends React.Component {
|
||||
this.setState({isShareDialogShow: !this.state.isShareDialogShow});
|
||||
};
|
||||
|
||||
exportDocx = () => {
|
||||
const serviceUrl = window.app.config.serviceURL;
|
||||
let repoID = this.props.repoID;
|
||||
let filePath = this.getDirentPath(this.props.dirent);
|
||||
let exportToDocxUrl = serviceUrl + '/repo/sdoc_export_to_docx/' + repoID + '/?file_path=' + filePath;
|
||||
window.location.href = exportToDocxUrl;
|
||||
};
|
||||
|
||||
closeSharedDialog = () => {
|
||||
this.setState({isShareDialogShow: !this.state.isShareDialogShow});
|
||||
};
|
||||
@@ -277,6 +285,12 @@ class DirentListItem extends React.Component {
|
||||
case 'Convert to Markdown':
|
||||
this.onItemConvert(event, 'markdown');
|
||||
break;
|
||||
case 'Convert to docx':
|
||||
this.onItemConvert(event, 'docx');
|
||||
break;
|
||||
case 'Export docx':
|
||||
this.exportDocx();
|
||||
break;
|
||||
case 'Convert to sdoc':
|
||||
this.onItemConvert(event, 'sdoc');
|
||||
break;
|
||||
|
Reference in New Issue
Block a user