Merge branch 'master' of https://github.com/ONLYOFFICE/AppServer
This commit is contained in:
commit
fe044697d3
@ -51,15 +51,15 @@ const MainContainer = styled.div`
|
||||
|
||||
.search_container {
|
||||
margin-top: 32px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.selected-members_container {
|
||||
margin-top: 16px;
|
||||
margin-top: 32px;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
grid-row-gap: 8px;
|
||||
grid-column-gap: 16px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.buttons_container {
|
||||
|
@ -1384,7 +1384,8 @@ namespace ASC.Employee.Core.Controllers
|
||||
PermissionContext.DemandPermissions(new UserSecurityProvider(user.ID), Constants.Action_EditUser);
|
||||
|
||||
if (contacts == null) return;
|
||||
user.Contacts = contacts.Select(r => $"{r.Type}|{r.Value}").Aggregate((a, b) => $"{a}|{b}");
|
||||
var values = contacts.Where(r => !string.IsNullOrEmpty(r.Value)).Select(r => $"{r.Type}|{r.Value}");
|
||||
user.Contacts = string.Join('|', values);
|
||||
}
|
||||
|
||||
private void DeleteContacts(IEnumerable<Contact> contacts, UserInfo user)
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "asc-web-common",
|
||||
"version": "1.0.29",
|
||||
"version": "1.0.30",
|
||||
"description": "Ascensio System SIA common components and solutions library",
|
||||
"license": "AGPL-3.0",
|
||||
"files": [
|
||||
|
@ -87,6 +87,7 @@ class ProfileActions extends React.PureComponent {
|
||||
withArrow
|
||||
directionX="right"
|
||||
open={this.state.opened}
|
||||
clickOutsideAction={this.onAvatarClick}
|
||||
>
|
||||
<DropDownProfileItem
|
||||
avatarRole={this.getUserRole(this.state.user)}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "asc-web-components",
|
||||
"version": "1.0.279",
|
||||
"version": "1.0.282",
|
||||
"description": "Ascensio System SIA component library",
|
||||
"license": "AGPL-3.0",
|
||||
"main": "dist/asc-web-components.js",
|
||||
|
@ -49,7 +49,7 @@ class ComboBox extends React.Component {
|
||||
comboBoxClick = (e) => {
|
||||
if (this.props.isDisabled || e && e.target.closest('.optionalBlock')) return;
|
||||
this.toggle(!this.state.isOpen);
|
||||
this.props.toggleAction && this.props.toggleAction(e);
|
||||
this.props.toggleAction && this.props.toggleAction(e, this.state.isOpen);
|
||||
};
|
||||
|
||||
optionClick = (option) => {
|
||||
|
@ -58,7 +58,8 @@ const StyledComboButton = styled.div`
|
||||
`}
|
||||
}
|
||||
.combo-button-label{
|
||||
margin-right: 8px;
|
||||
margin-right: ${props => props.noBorder ? `4px` : `8px`};
|
||||
color: ${props => props.isDisabled ? '#D0D5DA' : '#333333'};
|
||||
max-width: 175px;
|
||||
${props => props.noBorder && `
|
||||
line-height: 15px;
|
||||
@ -66,7 +67,7 @@ const StyledComboButton = styled.div`
|
||||
`}
|
||||
}
|
||||
.combo-button-label:hover{
|
||||
${props => props.noBorder && `
|
||||
${props => props.noBorder && !props.isDisabled && `
|
||||
border-bottom: 1px dashed;
|
||||
`}
|
||||
}
|
||||
@ -149,6 +150,7 @@ class ComboButton extends React.Component {
|
||||
truncate={true}
|
||||
fontWeight={600}
|
||||
className="combo-button-label"
|
||||
color={boxIconColor + ' !important'}
|
||||
>
|
||||
{selectedOption.label}
|
||||
</Text>
|
||||
|
@ -116,7 +116,11 @@ class ContextMenuButton extends React.Component {
|
||||
onMouseOver={onMouseOver}
|
||||
onMouseOut={onMouseOut}
|
||||
/>
|
||||
<DropDown directionX={directionX} open={isOpen}>
|
||||
<DropDown
|
||||
directionX={directionX}
|
||||
open={isOpen}
|
||||
clickOutsideAction={this.onIconButtonClick}
|
||||
>
|
||||
{
|
||||
this.state.data.map((item, index) =>
|
||||
(item && (item.label || item.icon || item.key)) && <DropDownItem {...item} key={item.key || index} onClick={this.onDropDownItemClick.bind(this, item)}
|
||||
|
@ -69,7 +69,7 @@ const StyledDropdownItem = styled.div`
|
||||
padding: 0px 16px;
|
||||
border: 0.5px solid #ECEEF1;
|
||||
cursor: default;
|
||||
margin: 6px 16px 4px;
|
||||
margin: 6px 16px 6px;
|
||||
line-height: 1px;
|
||||
height: 1px;
|
||||
width: calc(100% - 32px);
|
||||
|
@ -34,4 +34,4 @@ When using component, it should be noted that parent must have CSS property _pos
|
||||
| `open` | `bool` | - | - | `false` | Tells when the dropdown should be opened |
|
||||
| `style` | `obj`, `array` | - | - | - | Accepts css style |
|
||||
| `withArrow` | `bool` | - | - | `false` | It is used if it is necessary to display blue protruding angle as when viewing profile |
|
||||
| `withBackdrop` | `bool` | - | - | `false` | Used to display backdrop |
|
||||
| `withBackdrop` | `bool` | - | - | `true` | Used to display backdrop |
|
||||
|
@ -170,7 +170,7 @@ DropDown.defaultProps = {
|
||||
directionX: 'left',
|
||||
directionY: 'bottom',
|
||||
withArrow: false,
|
||||
withBackdrop: false
|
||||
withBackdrop: true
|
||||
};
|
||||
|
||||
export default DropDown
|
@ -5,7 +5,7 @@ import PropTypes from 'prop-types';
|
||||
|
||||
const StyledCloseButton = styled.div`
|
||||
margin-left: 7px;
|
||||
margin-top: -2px;
|
||||
margin-top: -1px;
|
||||
`;
|
||||
const CloseButton = props => {
|
||||
//console.log("CloseButton render");
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import styled, {css} from 'styled-components';
|
||||
import FilterButton from './filter-button';
|
||||
import HideFilter from './hide-filter';
|
||||
import ComboBox from '../combobox';
|
||||
@ -17,11 +17,11 @@ const StyledFilterItem = styled.div`
|
||||
margin-bottom: ${props => props.block ? '8px' : '0'};
|
||||
position: relative;
|
||||
height: 100%;
|
||||
padding: 4px 22px 2px 7px;
|
||||
margin-right: 2px;
|
||||
border: 1px solid #ECEEF1;
|
||||
border-radius: 3px;
|
||||
background-color: #F8F9F9;
|
||||
padding-right: 22px;
|
||||
|
||||
font-weight: 600;
|
||||
font-size: 13px;
|
||||
@ -33,6 +33,20 @@ const StyledFilterItem = styled.div`
|
||||
margin-bottom: 0;
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledFilterItemContent = styled.div`
|
||||
display: flex;
|
||||
padding: 5px 0 2px 7px;
|
||||
|
||||
${props =>
|
||||
!props.isDisabled &&
|
||||
css`
|
||||
&:active{
|
||||
background: #ECEEF1;
|
||||
}
|
||||
`}
|
||||
`;
|
||||
|
||||
const StyledCloseButtonBlock = styled.div`
|
||||
display: flex;
|
||||
cursor: ${props =>
|
||||
@ -43,7 +57,18 @@ const StyledCloseButtonBlock = styled.div`
|
||||
width: 25px;
|
||||
border-left: 1px solid #ECEEF1;
|
||||
right: 0;
|
||||
top: 1px;
|
||||
top: 0;
|
||||
background-color: #F8F9F9;
|
||||
${props =>
|
||||
!props.isDisabled &&
|
||||
css`
|
||||
&:active{
|
||||
background: #ECEEF1;
|
||||
svg path:first-child {
|
||||
fill: #333;
|
||||
}
|
||||
}
|
||||
`}
|
||||
`;
|
||||
const StyledComboBox = styled(ComboBox)`
|
||||
display: inline-block;
|
||||
@ -51,6 +76,7 @@ const StyledComboBox = styled(ComboBox)`
|
||||
max-width: 185px;
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
margin-top: -1px;
|
||||
> div:first-child{
|
||||
width: auto;
|
||||
padding-left: 4px;
|
||||
@ -87,7 +113,8 @@ class FilterItem extends React.Component {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<StyledFilterItem key={this.state.id} id={this.state.id} block={this.props.block} >
|
||||
<StyledFilterItem key={this.state.id} id={this.state.id} block={this.props.block} opened={this.props.opened} >
|
||||
<StyledFilterItemContent isDisabled={this.props.isDisabled}>
|
||||
{this.props.groupLabel}:
|
||||
{this.props.groupItems.length > 1 ?
|
||||
<StyledComboBox
|
||||
@ -106,8 +133,10 @@ class FilterItem extends React.Component {
|
||||
></StyledComboBox>
|
||||
: <StyledFilterName>{this.props.label}</StyledFilterName>
|
||||
}
|
||||
</StyledFilterItemContent>
|
||||
|
||||
<StyledCloseButtonBlock onClick={this.onClick}>
|
||||
|
||||
<StyledCloseButtonBlock onClick={this.onClick} isDisabled={this.props.isDisabled} isClickable={true}>
|
||||
<CloseButton
|
||||
isDisabled={this.props.isDisabled}
|
||||
onClick={this.onClick}
|
||||
|
@ -111,6 +111,7 @@ class HideFilter extends React.Component {
|
||||
className="drop-down"
|
||||
manualY="8px"
|
||||
open={this.state.popoverOpen}
|
||||
clickOutsideAction={this.handleClick}
|
||||
>
|
||||
{this.props.children}
|
||||
</DropDown>
|
||||
|
Loading…
Reference in New Issue
Block a user