mirror of
https://github.com/haiwen/seahub.git
synced 2025-04-28 03:10:45 +00:00
fix reactstrap 9.x DropdownMenu style (#7472)
This commit is contained in:
parent
79413cb4fd
commit
ef8cd06f72
@ -2,7 +2,7 @@ import React, { Fragment } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { UncontrolledTooltip } from 'reactstrap';
|
||||
import { Link } from '@gatsbyjs/reach-router';
|
||||
import DirOperationToolBar from '../../components/toolbar/dir-operation-toolbar';
|
||||
import DirOperationToolbar from '../../components/toolbar/dir-operation-toolbar';
|
||||
import MetadataViewName from '../../metadata/components/metadata-view-name';
|
||||
import TagViewName from '../../tag/components/tag-view-name';
|
||||
import { siteRoot, gettext } from '../../utils/constants';
|
||||
@ -182,7 +182,7 @@ class DirPath extends React.Component {
|
||||
return (
|
||||
<Fragment key={index}>
|
||||
<span className="path-split">/</span>
|
||||
<DirOperationToolBar
|
||||
<DirOperationToolbar
|
||||
path={this.props.currentPath}
|
||||
repoID={this.props.repoID}
|
||||
repoName={this.props.repoName}
|
||||
@ -199,7 +199,7 @@ class DirPath extends React.Component {
|
||||
loadDirentList={this.props.loadDirentList}
|
||||
>
|
||||
<span className="path-file-name">{item}</span>
|
||||
</DirOperationToolBar>
|
||||
</DirOperationToolbar>
|
||||
</Fragment>
|
||||
);
|
||||
} else {
|
||||
@ -241,19 +241,19 @@ class DirPath extends React.Component {
|
||||
);
|
||||
})}
|
||||
{this.props.pathPrefix && this.props.pathPrefix.length === 0 && (
|
||||
<Fragment>
|
||||
<>
|
||||
<Link to={siteRoot + 'libraries/'} className="path-item normal" onClick={(e) => this.onTabNavClick(e, 'libraries')}>{gettext('Files')}</Link>
|
||||
<span className="path-split">/</span>
|
||||
</Fragment>
|
||||
</>
|
||||
)}
|
||||
{!this.props.pathPrefix && (
|
||||
<Fragment>
|
||||
<>
|
||||
<Link to={siteRoot + 'libraries/'} className="path-item normal" onClick={(e) => this.onTabNavClick(e, 'libraries')}>{gettext('Files')}</Link>
|
||||
<span className="path-split">/</span>
|
||||
</Fragment>
|
||||
</>
|
||||
)}
|
||||
{(currentPath === '/' || currentPath === '') ?
|
||||
<DirOperationToolBar
|
||||
<DirOperationToolbar
|
||||
path={this.props.currentPath}
|
||||
repoID={this.props.repoID}
|
||||
repoName={this.props.repoName}
|
||||
@ -270,7 +270,7 @@ class DirPath extends React.Component {
|
||||
loadDirentList={this.props.loadDirentList}
|
||||
>
|
||||
<span className="path-repo-name">{repoName}</span>
|
||||
</DirOperationToolBar> :
|
||||
</DirOperationToolbar> :
|
||||
<span className="path-item" data-path="/" onClick={this.onPathClick} role="button">{repoName}</span>
|
||||
}
|
||||
{pathElem}
|
||||
|
@ -197,8 +197,7 @@ class ItemDropdownMenu extends React.Component {
|
||||
<ModalPortal>
|
||||
<DropdownMenu
|
||||
style={menuStyle}
|
||||
className={this.props.menuClassname}
|
||||
positionFixed={true}
|
||||
className={`${this.props.menuClassname} position-fixed`}
|
||||
flip={false}
|
||||
modifiers={[{ name: 'preventOverflow', options: { boundary: document.body } }]}
|
||||
>
|
||||
@ -224,7 +223,7 @@ class ItemDropdownMenu extends React.Component {
|
||||
<i className="sf3-font-down sf3-font rotate-270"></i>
|
||||
</DropdownToggle>
|
||||
<DropdownMenu
|
||||
positionFixed={true}
|
||||
className="position-fixed"
|
||||
flip={false}
|
||||
modifiers={[{ name: 'preventOverflow', options: { boundary: document.body } }]}
|
||||
>
|
||||
|
@ -21,10 +21,9 @@ const HeaderDropdownMenu = ({ column, ColumnDropdownMenu, customProps }) => {
|
||||
const renderDropdownMenu = useCallback(() => {
|
||||
return (
|
||||
<DropdownMenu
|
||||
positionFixed={true}
|
||||
flip={false}
|
||||
modifiers={[{ name: 'preventOverflow', options: { boundary: document.body } }]}
|
||||
className="sf-table-dropdown-menu"
|
||||
className="sf-table-dropdown-menu position-fixed"
|
||||
>
|
||||
{cloneElement(ColumnDropdownMenu, { column, ...customProps })}
|
||||
</DropdownMenu>
|
||||
|
@ -295,7 +295,7 @@ class DirOperationToolbar extends React.Component {
|
||||
{this.props.children}
|
||||
<i className="sf3-font-down sf3-font ml-1 path-item-dropdown-toggle"></i>
|
||||
</DropdownToggle>
|
||||
<DropdownMenu onMouseMove={this.onDropDownMouseMove} positionFixed={true}>
|
||||
<DropdownMenu onMouseMove={this.onDropDownMouseMove} className='position-fixed'>
|
||||
{opList.map((item, index) => {
|
||||
if (item == 'Divider') {
|
||||
return <DropdownItem key={index} divider />;
|
||||
@ -353,7 +353,7 @@ class DirOperationToolbar extends React.Component {
|
||||
{this.props.children}
|
||||
<i className="sf3-font-down sf3-font ml-1 path-item-dropdown-toggle"></i>
|
||||
</DropdownToggle>
|
||||
<DropdownMenu positionFixed={true}>
|
||||
<DropdownMenu className='position-fixed'>
|
||||
{canUpload && (
|
||||
<DropdownItem onClick={this.onUploadFile}>{gettext('Upload')}</DropdownItem>
|
||||
)}
|
||||
|
@ -50,7 +50,7 @@ class SingleDropdownToolbar extends React.Component {
|
||||
{withPlusIcon && <i className="sf3-font-new sf3-font main-icon"></i>}
|
||||
<i className="sf3-font-down sf3-font"></i>
|
||||
</DropdownToggle>
|
||||
<DropdownMenu positionFixed={true}>
|
||||
<DropdownMenu className='position-fixed'>
|
||||
{opList.map((item, index) => {
|
||||
if (item == 'Divider') {
|
||||
return <DropdownItem key={index} divider />;
|
||||
|
@ -159,7 +159,7 @@ class ViewFileToolbar extends React.Component {
|
||||
{this.props.children}
|
||||
<i className="sf3-font-down sf3-font ml-1 path-item-dropdown-toggle"></i>
|
||||
</DropdownToggle>
|
||||
<DropdownMenu positionFixed={true} onMouseMove={this.onDropDownMouseMove}>
|
||||
<DropdownMenu className='position-fixed' onMouseMove={this.onDropDownMouseMove}>
|
||||
{opList.map((item, index) => {
|
||||
if (item == 'Divider') {
|
||||
return <DropdownItem key={index} divider />;
|
||||
|
@ -7,7 +7,7 @@ function DepartmentNodeMenu({ node, toggleDelete, toggleRename, toggleAddMembers
|
||||
return (
|
||||
<DropdownMenu
|
||||
modifiers={[{ name: 'preventOverflow', options: { boundary: document.body } }]}
|
||||
positionFixed={true}
|
||||
className="position-fixed"
|
||||
>
|
||||
<DropdownItem key={`${node.id}-add-department`} onClick={() => toggleAddDepartment(node)}>
|
||||
{gettext('Add sub-department')}
|
||||
|
@ -7,7 +7,7 @@ function DepartmentNodeMenu({ node, toggleDelete, toggleRename, toggleAddMembers
|
||||
return (
|
||||
<DropdownMenu
|
||||
modifiers={[{ name: 'preventOverflow', options: { boundary: document.body } }]}
|
||||
positionFixed={true}
|
||||
className="position-fixed"
|
||||
>
|
||||
<DropdownItem key={`${node.id}-add-department`} onClick={() => toggleAddDepartment(node)}>
|
||||
{gettext('Add sub-department')}
|
||||
|
@ -95,10 +95,9 @@ export default class PageDropdownMenu extends Component {
|
||||
>
|
||||
<DropdownToggle className="page-operation-dropdown-toggle" tag="span" data-toggle="dropdown"></DropdownToggle>
|
||||
<DropdownMenu
|
||||
className="page-operation-dropdown-menu dtable-dropdown-menu large"
|
||||
className="page-operation-dropdown-menu dtable-dropdown-menu large position-fixed"
|
||||
flip={false}
|
||||
modifiers={[{ name: 'preventOverflow', options: { boundary: document.body } }]}
|
||||
positionFixed={true}
|
||||
>
|
||||
<DropdownItem onClick={this.handleCopyLink}>
|
||||
<i className="sf3-font sf3-font-link" aria-hidden="true" />
|
||||
|
@ -335,7 +335,7 @@ class SharedDirView extends React.Component {
|
||||
: <i className="sf3-font-down sf3-font ml-1"></i>
|
||||
}
|
||||
</DropdownToggle>
|
||||
<DropdownMenu positionFixed={true}>
|
||||
<DropdownMenu className='position-fixed'>
|
||||
{opList.map((item, index) => {
|
||||
if (item == 'Divider') {
|
||||
return <DropdownItem key={index} divider />;
|
||||
|
@ -54,7 +54,7 @@ const AllTagsOperationToolbar = ({ children }) => {
|
||||
{children}
|
||||
<i className="sf3-font-down sf3-font ml-1 path-item-dropdown-toggle"></i>
|
||||
</DropdownToggle>
|
||||
<DropdownMenu positionFixed={true}>
|
||||
<DropdownMenu className='position-fixed'>
|
||||
<DropdownItem onClick={openAddTag}>
|
||||
<i className="sf3-font sf3-font-new mr-2 dropdown-item-icon"></i>
|
||||
{gettext('New tag')}
|
||||
|
Loading…
Reference in New Issue
Block a user