diff --git a/src/app/components/adf-layout/layout-container.component.scss b/src/app/components/adf-layout/layout-container.component.scss index eca3fb0e3..ec728774d 100644 --- a/src/app/components/adf-layout/layout-container.component.scss +++ b/src/app/components/adf-layout/layout-container.component.scss @@ -1,15 +1,11 @@ +@import 'mixins'; + :host { - display: block; - width: 100%; - height: 100%; - overflow: hidden; + @include flex-column; } ng-content { - display: block; - width: 100%; - height: 100%; - overflow: hidden; + @include flex-column; } .sidenav--hidden { @@ -20,10 +16,7 @@ ng-content { } .mat-sidenav-container { - display: block; - width: 100%; - height: 100%; - overflow: hidden; + @include flex-column; } .mat-sidenav { diff --git a/src/app/components/adf-layout/sidenav-layout.component.scss b/src/app/components/adf-layout/sidenav-layout.component.scss index 5247cb8e7..a71d91a31 100644 --- a/src/app/components/adf-layout/sidenav-layout.component.scss +++ b/src/app/components/adf-layout/sidenav-layout.component.scss @@ -1,9 +1,10 @@ +@import 'mixins'; + :host { - display: flex; - flex: 1; + @include flex-column; .sidenav-layout { - width: 100%; + @include flex-column; } router-outlet { diff --git a/src/app/components/favorites/favorites.component.html b/src/app/components/favorites/favorites.component.html index 27494bc3e..7e7a6e2c3 100644 --- a/src/app/components/favorites/favorites.component.html +++ b/src/app/components/favorites/favorites.component.html @@ -97,9 +97,9 @@
-
+
- - + + + + +
-
+
-
-
+
+
-
+
- - + + + +
diff --git a/src/app/components/recent-files/recent-files.component.html b/src/app/components/recent-files/recent-files.component.html index 322786828..620293c2c 100644 --- a/src/app/components/recent-files/recent-files.component.html +++ b/src/app/components/recent-files/recent-files.component.html @@ -91,9 +91,9 @@
-
+
- - + + + + +
-
+
- - + + + + +
-
+
- - - + + + + +
diff --git a/src/app/ui/_layout.scss b/src/app/ui/_layout.scss index ef86872d8..83641f933 100644 --- a/src/app/ui/_layout.scss +++ b/src/app/ui/_layout.scss @@ -1,65 +1,21 @@ -@import 'variables'; +@import 'mixins'; $app-layout--header-height: 65px; $app-layout--side-width: 320px; - $app-inner-layout--header-height: 48px; $app-inner-layout--footer-height: 48px; .layout { - display: flex; - flex-direction: column; - flex: 1 0; - overflow: hidden; - - &__header { - flex: 0 0 $app-layout--header-height; - } - - &__content { - display: flex; - flex: 1; - flex-direction: row; - overflow: hidden; - - & > * { - display: flex; - flex: 1; - } - } - - .content--hide { - display: none !important; - } + @include flex-column; } .inner-layout { - display: flex; - flex: 1; - flex-direction: column; - - .adf-info-drawer { - width: 350px; - height: 100%; - overflow-y: auto; - } - - .no-border { - border: unset - } - - &--scroll { - overflow: auto; - } - - &__header, - &__footer { - display: flex; - flex: 0 0; - align-items: center; - } + @include flex-column; &__header { + display: flex; + align-items: center; + flex: 0 0 $app-layout--header-height; flex-basis: $app-inner-layout--header-height; background: $alfresco-gray-background; border-bottom: 1px solid $alfresco-divider-color; @@ -67,39 +23,30 @@ $app-inner-layout--footer-height: 48px; } &__content { - display: flex; - flex-direction: row; - flex: 1; - overflow: hidden; - background: #fff; - } - - &__panel { - width: 100%; - height: 100%; - display: flex; - flex:1; - flex-direction: column; - border-right: 1px solid rgba(0, 0, 0, 0.07); - } - - &__side-panel { - display: flex; - width: 350px; - height: 100%; + @include flex-row; } &__content--scroll { overflow: auto; } - &__footer { - flex-basis: $app-inner-layout--footer-height; - border-top: 1px solid $alfresco-divider-color; + &__content--hide { + display: none !important; } - app-generic-error { + &__panel { + @include flex-column; + border-right: 1px solid rgba(0, 0, 0, 0.07); + } + + &__side-panel { + display: block; height: 100%; - width: 100%; + overflow-y: scroll; } } + +app-generic-error { + height: 100%; + width: 100%; +} diff --git a/src/app/ui/application.scss b/src/app/ui/application.scss index 0532caaa6..3b9d34263 100644 --- a/src/app/ui/application.scss +++ b/src/app/ui/application.scss @@ -1,25 +1,25 @@ +@import 'mixins'; @import 'variables'; @import 'theme'; -html, body, ng-component { - display: flex; +html, body { + @include flex-column; font-size: 14px; font-family: "Muli", sans-serif; color: $alfresco-primary-text-color; - overflow: hidden; - width: 100%; - height: 100%; margin: 0; } -app-root > ng-component { - display: block; - width: 100%; - height: 100%; +app-root, +app-layout, +adf-layout-container, +ng-component { + @include flex-column; } @import 'layout'; +@import './overrides/adf-login'; @import './overrides/alfresco-document-list'; @import './overrides/alfresco-upload-drag-area'; @import './overrides/alfresco-upload-button'; diff --git a/src/app/ui/mixins.scss b/src/app/ui/mixins.scss new file mode 100644 index 000000000..8e6dc3b42 --- /dev/null +++ b/src/app/ui/mixins.scss @@ -0,0 +1,15 @@ +@mixin flex-column { + display: flex; + flex-direction: column; + flex: 1; + height: 100%; + overflow: hidden; +} + +@mixin flex-row { + display: flex; + flex-direction: row; + flex: 1; + height: 100%; + overflow: hidden; +} \ No newline at end of file diff --git a/src/app/ui/overrides/_adf-login.scss b/src/app/ui/overrides/_adf-login.scss new file mode 100644 index 000000000..3d8305f0a --- /dev/null +++ b/src/app/ui/overrides/_adf-login.scss @@ -0,0 +1,5 @@ +@import 'mixins'; + +adf-login { + @include flex-column; +} \ No newline at end of file diff --git a/src/app/ui/overrides/_alfresco-document-list.scss b/src/app/ui/overrides/_alfresco-document-list.scss index 1e03f7719..241621d2e 100644 --- a/src/app/ui/overrides/_alfresco-document-list.scss +++ b/src/app/ui/overrides/_alfresco-document-list.scss @@ -1,16 +1,27 @@ -@import '../variables'; +@import 'variables-color'; + +@import 'mixins'; adf-document-list { - display: flex; - flex-direction: column; - flex: 1; - overflow: auto; + @include flex-column; +} - & > adf-datatable { - height: 100%; +.adf-document-list--loading { + .adf-data-table { + @include flex-column; + justify-content: center; + align-items: center; + } + + .adf-datatable-table-cell { + border: none !important; } } +adf-datatable { + @include flex-column; + overflow-y: scroll; +} .adf-data-table { border: none !important; @@ -54,8 +65,7 @@ adf-document-list { } } - .adf-datatable-header:first-of-type, .adf-datatable-header.adf-data-table-cell--image, - .adf-data-table-cell:first-of-type, .adf-data-table-cell.adf-data-table-cell--image { + .adf-datatable-body .adf-data-table-cell--image { padding-left: 24px; padding-right: 0; width: 10px; @@ -89,13 +99,16 @@ adf-document-list { } } -.empty-list { +.adf-document-list--empty { .adf-data-table { - height: 100%; + @include flex-column; + justify-content: center; + align-items: center; + } - .adf-datatable-row:hover, .adf-datatable-row:focus { - background-color: unset; - cursor: default; - } + .adf-data-table .adf-datatable-row:hover, + .adf-data-table .adf-datatable-row:focus { + background-color: unset; + cursor: default; } } diff --git a/src/app/ui/overrides/_alfresco-upload-drag-area.scss b/src/app/ui/overrides/_alfresco-upload-drag-area.scss index d34560800..afafe9d43 100644 --- a/src/app/ui/overrides/_alfresco-upload-drag-area.scss +++ b/src/app/ui/overrides/_alfresco-upload-drag-area.scss @@ -1,4 +1,5 @@ -@import '../_variables.scss'; +@import 'mixins'; +@import 'variables.scss'; @mixin file-draggable__input-focus { color: $alfresco-secondary-text-color !important; @@ -6,6 +7,17 @@ margin-left: 0 !important; } +adf-upload-drag-area { + @include flex-column; + + .upload-border { + @include flex-column; + + vertical-align: unset; + text-align: unset; + } +} + adf-upload-drag-area:first-child { & > div { adf-upload-drag-area { @@ -34,15 +46,6 @@ adf-upload-drag-area:first-child { } adf-upload-drag-area { - height: 100%; - width: 100%; - - & > div { - height: 100%; - display: flex; - flex-direction: column; - } - .file-draggable__input-focus { adf-document-list { background: $alfresco-app-color--hue-1;