1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-04 08:28:11 +00:00

Merge branch '7.0'

This commit is contained in:
plt
2019-06-24 17:32:31 +08:00
7 changed files with 10 additions and 11 deletions

View File

@@ -149,7 +149,7 @@ class LibSubFolderSerGroupPermissionDialog extends React.Component {
const request = this.props.isDepartmentRepo ?
seafileAPI.addDepartmentRepoGroupFolderPerm(this.props.repoID, this.state.permission, folderPath, selectedOption.id) :
seafileAPI.addGroupFolderPerm(this.props.repoID, this.state.permission, folderPath, selectedOption.id)
seafileAPI.addGroupFolderPerm(this.props.repoID, this.state.permission, folderPath, selectedOption.id);
request.then(res => {
let errorMsg = [];
if (res.data.failed.length > 0) {
@@ -185,7 +185,7 @@ class LibSubFolderSerGroupPermissionDialog extends React.Component {
deleteGroupPermissionItem = (item) => {
const request = this.props.isDepartmentRepo ?
seafileAPI.deleteDepartmentRepoGroupFolderPerm(item.repo_id, item.permission, item.folder_path, item.group_id) :
seafileAPI.deleteGroupFolderPerm(item.repo_id, item.permission, item.folder_path, item.group_id)
seafileAPI.deleteGroupFolderPerm(item.repo_id, item.permission, item.folder_path, item.group_id);
request.then(() => {
this.setState({
groupPermissionItems: this.state.groupPermissionItems.filter(deletedItem => { return deletedItem != item; })

View File

@@ -202,7 +202,7 @@ class DirentDetail extends React.Component {
}
let direntName = dirent ? dirent.name : folderDirent.name;
if (dirent && dirent.type === 'file') {
if ((dirent && dirent.type === 'file') || path.lastIndexOf('.') > -1) {
return (
<div className="detail-container">
{this.renderHeader(smallIconUrl, direntName)}
@@ -212,7 +212,7 @@ class DirentDetail extends React.Component {
<TabPane tabId="comments" className="comments h-100">
<DetailCommentList
repoID={this.props.repoID}
filePath={this.props.path + dirent.name}
filePath={(dirent && dirent.type === 'file') ? path + dirent.name : path}
/>
</TabPane>
</TabContent>

View File

@@ -4,7 +4,6 @@ import { processor } from '../../utils/seafile-markdown2html';
import { Button, Dropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap';
import { seafileAPI } from '../../utils/seafile-api';
import { gettext, draftFilePath, draftRepoID } from '../../utils/constants';
import Loading from '../../components/loading.js';
import { username } from '../../utils/constants.js';
import '../../css/review-comments.css';

View File

@@ -164,7 +164,7 @@ class SharedRepoListItem extends React.Component {
}
onItemDeleteToggle = () => {
this.setState({isDeleteDialogShow: !this.state.isDeleteDialogShow})
this.setState({isDeleteDialogShow: !this.state.isDeleteDialogShow});
}
toggleShareDialog = () => {