mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-02 15:38:15 +00:00
fix code bug
This commit is contained in:
@@ -6,7 +6,7 @@ import { seafileAPI } from '../../../utils/seafile-api';
|
||||
import { Utils } from '../../../utils/utils';
|
||||
import toaster from '../../toast';
|
||||
import SharePermissionEditor from '../../select-editor/share-permission-editor';
|
||||
import { SeahubSelect, NoGroupMessage } from '../common/select';
|
||||
import { SeahubSelect, NoGroupMessage } from '../../common/select';
|
||||
|
||||
class GroupItem extends React.Component {
|
||||
|
||||
|
@@ -119,7 +119,7 @@ class DirentGridView extends React.Component {
|
||||
onItemConvert = (currentObject, e, dstType) => {
|
||||
e.nativeEvent.stopImmediatePropagation(); //for document event
|
||||
this.props.onItemConvert(currentObject, dstType);
|
||||
}
|
||||
};
|
||||
|
||||
onMenuItemClick = (operation, currentObject, event) => {
|
||||
hideMenu();
|
||||
|
@@ -310,7 +310,7 @@ class DirentListItem extends React.Component {
|
||||
e.preventDefault();
|
||||
e.nativeEvent.stopImmediatePropagation(); //for document event
|
||||
this.props.onItemConvert(this.props.dirent, dstType);
|
||||
}
|
||||
};
|
||||
|
||||
onEditFileTagToggle = () => {
|
||||
this.setState({
|
||||
|
@@ -1242,14 +1242,12 @@ class LibContentView extends React.Component {
|
||||
seafileAPI.convertFile(repoID, path, dstType).then((res) => {
|
||||
let objName = res.data.obj_name;
|
||||
let parentDir = res.data.parent_dir;
|
||||
let file_size = res.data.size;
|
||||
path = parentDir + '/' + objName;
|
||||
let name = Utils.getFileName(path);
|
||||
let parentPath = Utils.getDirName(path);
|
||||
|
||||
if (this.state.currentMode === 'column') {
|
||||
this.updateMoveCopyTreeNode(parentPath);
|
||||
}
|
||||
this.updateMoveCopyTreeNode(parentPath);
|
||||
}
|
||||
this.loadDirentList(this.state.path);
|
||||
|
||||
}).catch((error) => {
|
||||
@@ -1260,7 +1258,7 @@ class LibContentView extends React.Component {
|
||||
}
|
||||
toaster.danger(errMessage);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onDirentClick = (dirent) => {
|
||||
let direntList = this.state.direntList.map(dirent => {
|
||||
|
@@ -598,13 +598,13 @@ export const Utils = {
|
||||
}
|
||||
|
||||
if ((permission == 'rw' || permission == 'cloud-edit') && enableSeadoc) {
|
||||
if (dirent.name.endsWith('.md')) {
|
||||
list.push(CONVERT_TO_SDOC);
|
||||
}
|
||||
if (dirent.name.endsWith('.md')) {
|
||||
list.push(CONVERT_TO_SDOC);
|
||||
}
|
||||
|
||||
if (dirent.name.endsWith('.sdoc')) {
|
||||
list.push(CONVERT_TO_MARKDOWN);
|
||||
}
|
||||
if (dirent.name.endsWith('.sdoc')) {
|
||||
list.push(CONVERT_TO_MARKDOWN);
|
||||
}
|
||||
}
|
||||
|
||||
if (permission == 'rw') {
|
||||
|
Reference in New Issue
Block a user