mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-15 06:44:16 +00:00
feat: start revise style (#5540)
* feat: start revise style * restore code * restore code
This commit is contained in:
@@ -270,9 +270,6 @@ class DirentListItem extends React.Component {
|
||||
case 'Unmask as draft':
|
||||
this.onUnmaskAsDraft();
|
||||
break;
|
||||
case 'Start revise':
|
||||
this.onStartRevise();
|
||||
break;
|
||||
case 'List revisions':
|
||||
this.openRevisionsPage();
|
||||
break;
|
||||
@@ -387,18 +384,6 @@ class DirentListItem extends React.Component {
|
||||
});
|
||||
}
|
||||
|
||||
onStartRevise = () => {
|
||||
const repoID = this.props.repoID;
|
||||
const filePath = this.getDirentPath(this.props.dirent);
|
||||
seafileAPI.sdocStartRevise(repoID, filePath).then((res) => {
|
||||
const url = siteRoot + 'lib/' + repoID + '/file' + Utils.encodePath(res.data.file_path);
|
||||
window.open(url);
|
||||
}).catch(error => {
|
||||
const errMessage = Utils.getErrorMsg(error);
|
||||
toaster.danger(errMessage);
|
||||
});
|
||||
}
|
||||
|
||||
openRevisionsPage = () => {
|
||||
const repoID = this.props.repoID;
|
||||
const filePath = this.getDirentPath(this.props.dirent);
|
||||
|
Reference in New Issue
Block a user