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