diff --git a/packages/asc-web-common/components/PageLayout/index.js b/packages/asc-web-common/components/PageLayout/index.js index 5b6d8220cdb..5fae6ae94ef 100644 --- a/packages/asc-web-common/components/PageLayout/index.js +++ b/packages/asc-web-common/components/PageLayout/index.js @@ -210,7 +210,6 @@ class PageLayout extends React.Component { isBackdropVisible, isArticlePinned, isDesktop, - isLoadingContent, } = this.props; let articleHeaderContent = null; let articleMainButtonContent = null; @@ -378,7 +377,6 @@ class PageLayout extends React.Component { autoFocus={isMobile || isTabletView ? false : true} pinned={isArticlePinned} viewAs={viewAs} - isLoadingContent={isLoadingContent} > {isSectionFilterAvailable && ( diff --git a/packages/asc-web-common/components/PageLayout/sub-components/section-body.js b/packages/asc-web-common/components/PageLayout/sub-components/section-body.js index 7d99eea116c..941d33b7233 100644 --- a/packages/asc-web-common/components/PageLayout/sub-components/section-body.js +++ b/packages/asc-web-common/components/PageLayout/sub-components/section-body.js @@ -10,6 +10,12 @@ import Scrollbar from "@appserver/components/scrollbar"; import DragAndDrop from "@appserver/components/drag-and-drop"; import { tablet, desktop } from "@appserver/components/utils/device"; +const paddingStyles = css` + padding: 17px 7px 16px 24px; + @media ${tablet} { + padding: 16px 0 16px 24px; + } +`; const commonStyles = css` flex-grow: 1; ${(props) => !props.withScroll && `height: 100%;`} @@ -18,20 +24,15 @@ const commonStyles = css` -webkit-user-select: none; .section-wrapper { - ${(props) => !props.withScroll && `display: flex; height: 100%;`} + ${(props) => + !props.withScroll && + `display: flex; height: 100%; box-sizing:border-box`}; + ${(props) => !props.withScroll && paddingStyles} } .section-wrapper-content { - ${(props) => - !props.withScroll && - ` height: 100%; - box-sizing: border-box; -`} - padding: 17px 7px 16px 24px; - ${(props) => - !props.isLoadingContent && - css` - flex: 1 0 auto; + ${paddingStyles} + flex: 1 0 auto; outline: none; ${(props) => @@ -41,19 +42,15 @@ const commonStyles = css` padding-left: 20px; `} - .section-wrapper { - display: flex; - flex-direction: column; - min-height: 100%; - } + .section-wrapper { + display: flex; + flex-direction: column; + min-height: 100%; + } - .people-row-container, - .files-row-container { - margin-top: -22px; - } - `} - @media ${tablet} { - padding: 16px 0 16px 24px; + .people-row-container, + .files-row-container { + margin-top: -22px; } .section-wrapper { @@ -147,7 +144,6 @@ class SectionBody extends React.Component { viewAs, withScroll, isLoaded, - isLoadingContent, } = this.props; console.log("isLoaded", isLoaded); const focusProps = autoFocus @@ -198,7 +194,6 @@ class SectionBody extends React.Component { withScroll={withScroll} pinned={pinned} isLoaded={isLoaded} - isLoadingContent={isLoadingContent} > {withScroll ? ( !isMobile ? ( @@ -220,7 +215,7 @@ class SectionBody extends React.Component { ) ) : (
-
{children}
+ {children} {/* */}
)} @@ -244,7 +239,6 @@ SectionBody.propTypes = { ]), viewAs: PropTypes.string, isLoaded: PropTypes.bool, - isLoadingContent: PropTypes.bool, }; SectionBody.defaultProps = { @@ -252,7 +246,6 @@ SectionBody.defaultProps = { pinned: false, uploadFiles: false, withScroll: true, - isLoadingContent: false, }; export default inject(({ auth }) => { diff --git a/products/ASC.Files/Client/src/pages/VersionHistory/index.js b/products/ASC.Files/Client/src/pages/VersionHistory/index.js index 331b3a85ba1..9a27c830cf8 100644 --- a/products/ASC.Files/Client/src/pages/VersionHistory/index.js +++ b/products/ASC.Files/Client/src/pages/VersionHistory/index.js @@ -51,7 +51,6 @@ class PureVersionHistory extends React.Component { secondaryProgressBarIcon="file" showSecondaryButtonAlert={false} withBodyScroll={false} - isLoadingContent={isLoading} >