Merge branch 'master' into feature/translations

This commit is contained in:
Daniil Senkiv 2020-01-22 16:26:21 +03:00
commit 7a43461e7a
5 changed files with 12 additions and 20 deletions

View File

@ -222,7 +222,7 @@ namespace ASC.Core.Data
if (from != default)
{
q = q.Where(r => r.LastModified == from);
q = q.Where(r => r.LastModified >= from);
}
return q.Select(FromUserGroupToUserGroupRef).ToDictionary(r => r.CreateKey(), r => r);

View File

@ -1,6 +1,6 @@
{
"name": "asc-web-common",
"version": "1.0.51",
"version": "1.0.52",
"description": "Ascensio System SIA common components and solutions library",
"license": "AGPL-3.0",
"files": [

View File

@ -9,18 +9,14 @@ const StyledSectionBody = styled.div`
flex-grow: 1;
height: 100%;
/* TODO: Fix overflow scrollbar */
${props => props.withScroll && `
margin-left: -24px;
.scroll-body {
padding-left: 24px;
}
`}
`;
const StyledSectionWrapper = styled.div`
margin: 16px 8px 16px 0;
padding-left: 24px;
@media ${tablet} {
margin: 16px 0;

View File

@ -1,6 +1,6 @@
{
"name": "asc-web-components",
"version": "1.0.320",
"version": "1.0.321",
"description": "Ascensio System SIA component library",
"license": "AGPL-3.0",
"main": "dist/asc-web-components.js",

View File

@ -25,28 +25,26 @@ class ContextMenu extends React.PureComponent {
moveMenu = e => {
const menu = document.getElementById(this.props.id);
//if (!menu) return;
const bounds = (this.container !== document) && this.container.getBoundingClientRect();
const clickX = e.clientX - bounds.left;
const clickY = e.clientY - bounds.top;
const containerWidth = this.container.offsetWidth;
const containerHeight = this.container.offsetHeight;
const menuWidth = menu && menu.offsetWidth;
const menuWidth = menu && menu.offsetWidth || 180;
const menuHeight = menu && menu.offsetHeight;
const right = (containerWidth - clickX) > menuWidth;
const left = !right;
const right = (containerWidth - clickX) < menuWidth && clickX > menuWidth;
const bottom = (containerHeight - clickY) < menuHeight && clickY > menuHeight;
let newTop = `0px`;
let newLeft = `0px`;
newLeft = left ? `${clickX - menuWidth - 8}px` : `${clickX + 8}px`;
newLeft = right ? `${clickX - menuWidth - 8}px` : `${clickX + 8}px`;
newTop = bottom ? `${clickY - menuHeight}px` : `${clickY}px`;
if(menu) {
menu.style.top = newTop;
menu.style.left = newLeft;
if (menu) {
menu.style.top = newTop;
menu.style.left = newLeft;
}
}
@ -58,9 +56,7 @@ class ContextMenu extends React.PureComponent {
this.setState({
visible: true
});
if (e) this.moveMenu(e);
}, () => this.moveMenu(e));
}
handleClick = (e) => {