Improvements to the system console
Этот коммит содержится в:
@@ -5,6 +5,9 @@ import AdminSidebarHeader from './admin_sidebar_header.jsx';
|
|||||||
import SelectTeamModal from './select_team_modal.jsx';
|
import SelectTeamModal from './select_team_modal.jsx';
|
||||||
import * as Utils from '../../utils/utils.jsx';
|
import * as Utils from '../../utils/utils.jsx';
|
||||||
|
|
||||||
|
const Tooltip = ReactBootstrap.Tooltip;
|
||||||
|
const OverlayTrigger = ReactBootstrap.OverlayTrigger;
|
||||||
|
|
||||||
export default class AdminSidebar extends React.Component {
|
export default class AdminSidebar extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
@@ -80,6 +83,12 @@ export default class AdminSidebar extends React.Component {
|
|||||||
render() {
|
render() {
|
||||||
var count = '*';
|
var count = '*';
|
||||||
var teams = 'Loading';
|
var teams = 'Loading';
|
||||||
|
const removeTooltip = (
|
||||||
|
<Tooltip id='remove-team-tooltip'>{'Remove team from sidebar menu'}</Tooltip>
|
||||||
|
);
|
||||||
|
const addTeamTooltip = (
|
||||||
|
<Tooltip id='add-team-tooltip'>{'Add team from sidebar menu'}</Tooltip>
|
||||||
|
);
|
||||||
|
|
||||||
if (this.props.teams != null) {
|
if (this.props.teams != null) {
|
||||||
count = '' + Object.keys(this.props.teams).length;
|
count = '' + Object.keys(this.props.teams).length;
|
||||||
@@ -102,14 +111,19 @@ export default class AdminSidebar extends React.Component {
|
|||||||
className={'nav__sub-menu-item ' + this.isSelected('team_users', team.id)}
|
className={'nav__sub-menu-item ' + this.isSelected('team_users', team.id)}
|
||||||
>
|
>
|
||||||
{team.name}
|
{team.name}
|
||||||
|
<OverlayTrigger
|
||||||
|
delayShow={1000}
|
||||||
|
placement='top'
|
||||||
|
overlay={removeTooltip}
|
||||||
|
>
|
||||||
<span
|
<span
|
||||||
className='menu-icon--right menu__close'
|
className='menu-icon--right menu__close'
|
||||||
onClick={this.removeTeam.bind(this, team.id)}
|
onClick={this.removeTeam.bind(this, team.id)}
|
||||||
style={{cursor: 'pointer'}}
|
style={{cursor: 'pointer'}}
|
||||||
title='Remove team from sidebar menu'
|
|
||||||
>
|
>
|
||||||
{'x'}
|
{'×'}
|
||||||
</span>
|
</span>
|
||||||
|
</OverlayTrigger>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
@@ -245,15 +259,20 @@ export default class AdminSidebar extends React.Component {
|
|||||||
<span className='icon fa fa-gear'></span>
|
<span className='icon fa fa-gear'></span>
|
||||||
<span>{'TEAMS (' + count + ')'}</span>
|
<span>{'TEAMS (' + count + ')'}</span>
|
||||||
<span className='menu-icon--right'>
|
<span className='menu-icon--right'>
|
||||||
|
<OverlayTrigger
|
||||||
|
delayShow={1000}
|
||||||
|
placement='top'
|
||||||
|
overlay={addTeamTooltip}
|
||||||
|
>
|
||||||
<a
|
<a
|
||||||
href='#'
|
href='#'
|
||||||
onClick={this.showTeamSelect}
|
onClick={this.showTeamSelect}
|
||||||
>
|
>
|
||||||
<i
|
<i
|
||||||
className='fa fa-plus'
|
className='fa fa-plus'
|
||||||
title='Add team to sidebar menu'
|
|
||||||
></i>
|
></i>
|
||||||
</a>
|
</a>
|
||||||
|
</OverlayTrigger>
|
||||||
</span>
|
</span>
|
||||||
</h4>
|
</h4>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export default class SelectTeamModal extends React.Component {
|
|||||||
<select
|
<select
|
||||||
ref='team'
|
ref='team'
|
||||||
size='10'
|
size='10'
|
||||||
style={{width: '100%'}}
|
className='form-control'
|
||||||
>
|
>
|
||||||
{options}
|
{options}
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -37,13 +37,22 @@
|
|||||||
background: #333;
|
background: #333;
|
||||||
padding: 10px 10px;
|
padding: 10px 10px;
|
||||||
margin: 1px 0 0;
|
margin: 1px 0 0;
|
||||||
|
.menu-icon--right {
|
||||||
|
top: 6px;
|
||||||
|
right: 12px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.menu-icon--right {
|
.menu-icon--right {
|
||||||
vertical-align: top;
|
position: absolute;
|
||||||
padding: 5px 10px;
|
right: 10px;
|
||||||
margin: -5px;
|
top: 3px;
|
||||||
float: right;
|
font-size: 18px;
|
||||||
|
font-weight: 600;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
line-height: 20px;
|
||||||
|
text-align: center;
|
||||||
.fa {
|
.fa {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
right: -2px;
|
right: -2px;
|
||||||
@@ -60,7 +69,7 @@
|
|||||||
li {
|
li {
|
||||||
> a {
|
> a {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
padding: 5px 15px;
|
padding: 5px 35px 5px 15px;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
color: #bbb;
|
color: #bbb;
|
||||||
&:hover {
|
&:hover {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user