diff --git a/products/ASC.Files/Client/src/HOCs/withContextOptions.js b/products/ASC.Files/Client/src/HOCs/withContextOptions.js index c27959baa72..bd83bbfdd20 100644 --- a/products/ASC.Files/Client/src/HOCs/withContextOptions.js +++ b/products/ASC.Files/Client/src/HOCs/withContextOptions.js @@ -8,6 +8,13 @@ import config from "../../package.json"; export default function withContextOptions(WrappedComponent) { class WithContextOptions extends React.Component { + onOpenFolder = () => { + const { item, openLocationAction } = this.props; + const { id, folderId, fileExst } = item; + const locationId = !fileExst ? id : folderId; + openLocationAction(locationId, !fileExst); + }; + onOpenLocation = () => { const { item, openLocationAction } = this.props; const { parentId, folderId, fileExst } = item; @@ -261,7 +268,7 @@ export default function withContextOptions(WrappedComponent) { key: option, label: t("Open"), icon: "images/catalog.folder.react.svg", - onClick: this.onOpenLocation, + onClick: this.onOpenFolder, disabled: false, }; case "show-version-history": diff --git a/products/ASC.Files/Client/src/HOCs/withFileActions.js b/products/ASC.Files/Client/src/HOCs/withFileActions.js index 4cbb2840334..55643b12461 100644 --- a/products/ASC.Files/Client/src/HOCs/withFileActions.js +++ b/products/ASC.Files/Client/src/HOCs/withFileActions.js @@ -105,7 +105,7 @@ export default function withFileActions(WrappedFileItem) { if (e.target.closest(".edit-button") || e.target.tagName === "IMG") return; - if (e.detail === 1) this.onFilesClick(e); + if (e.detail === 1) this.fileContextClick(); } else { this.fileContextClick(); } diff --git a/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js b/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js index 688b589c734..2902482ae79 100644 --- a/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js +++ b/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js @@ -101,12 +101,22 @@ const StyledTile = styled.div` opacity: ${(props) => (props.checked ? 1 : 0)}; flex: 0 0 16px; margin-right: 4px; + + @media ${tablet} { + opacity: 1; + } } .file-checkbox { display: ${(props) => (props.checked ? "flex" : "none")}; flex: 0 0 16px; margin-right: 4px; + margin-top: 3px; + + @media ${tablet} { + display: flex; + margin-top: 2px; + } } .file-icon { @@ -116,8 +126,12 @@ const StyledTile = styled.div` user-select: none; margin-top: 3px; - height: 32px; - width: 32px; + height: 24px; + width: 24px; + + @media ${tablet} { + display: none; + } } :hover {