diff --git a/projects/aca-content/assets/i18n/en.json b/projects/aca-content/assets/i18n/en.json index de1acbfe5c..47896d3b34 100644 --- a/projects/aca-content/assets/i18n/en.json +++ b/projects/aca-content/assets/i18n/en.json @@ -98,7 +98,8 @@ "CREATE_TOOLTIP": "Create content", "UPLOAD": "Upload", "UPLOAD_TOOLTIP": "Upload content" - } + }, + "SELECTED": "Selected ({{ count }})" }, "BROWSE": { "FILE": { diff --git a/projects/aca-content/src/lib/components/favorite-libraries/favorite-libraries.component.html b/projects/aca-content/src/lib/components/favorite-libraries/favorite-libraries.component.html index c8ae1db407..be50d28c98 100644 --- a/projects/aca-content/src/lib/components/favorite-libraries/favorite-libraries.component.html +++ b/projects/aca-content/src/lib/components/favorite-libraries/favorite-libraries.component.html @@ -1,6 +1,8 @@
-

{{ 'APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.TITLE' | translate }}

+

+ {{ selectedRowItemsCount < 1 ? ('APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.TITLE' | translate) : ('APP.HEADER.SELECTED' | translate: { count: selectedRowItemsCount }) }} +

@@ -19,6 +21,7 @@

{{ 'APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.TITL [sortingMode]="'client'" (node-dblclick)="handleNodeClick($event)" [imageResolver]="imageResolver" + (selectedItemsCountChanged)="onSelectedItemsCountChanged($event)" [isResizingEnabled]="true" [blurOnResize]="false" (name-click)="handleNodeClick($event)" diff --git a/projects/aca-content/src/lib/components/favorites/favorites.component.html b/projects/aca-content/src/lib/components/favorites/favorites.component.html index c95652f541..a125a492b0 100644 --- a/projects/aca-content/src/lib/components/favorites/favorites.component.html +++ b/projects/aca-content/src/lib/components/favorites/favorites.component.html @@ -1,6 +1,8 @@
-

{{ 'APP.BROWSE.FAVORITES.TITLE' | translate }}

+

+ {{ selectedRowItemsCount < 1 ? ('APP.BROWSE.FAVORITES.TITLE' | translate) : ('APP.HEADER.SELECTED' | translate: { count: selectedRowItemsCount }) }} +

@@ -17,6 +19,7 @@

{{ 'APP.BROWSE.FAVORITES.TITLE' | translate }}

[sorting]="['modifiedAt', 'desc']" [sortingMode]="'client'" [imageResolver]="imageResolver" + (selectedItemsCountChanged)="onSelectedItemsCountChanged($event)" [isResizingEnabled]="true" [blurOnResize]="false" (node-dblclick)="handleNodeClick($event)" diff --git a/projects/aca-content/src/lib/components/files/files.component.html b/projects/aca-content/src/lib/components/files/files.component.html index af6d4ec325..4206ed672b 100644 --- a/projects/aca-content/src/lib/components/files/files.component.html +++ b/projects/aca-content/src/lib/components/files/files.component.html @@ -1,6 +1,11 @@
- + +
@@ -31,6 +36,7 @@ [blurOnResize]="false" (node-dblclick)="handleNodeClick($event)" (name-click)="handleNodeClick($event)" + (selectedItemsCountChanged)="onSelectedItemsCountChanged($event)" (filterSelection)="onFilterSelected($event)" (error)="onError()" > diff --git a/projects/aca-content/src/lib/components/libraries/libraries.component.html b/projects/aca-content/src/lib/components/libraries/libraries.component.html index 6f74f05ec5..8de6640cd8 100644 --- a/projects/aca-content/src/lib/components/libraries/libraries.component.html +++ b/projects/aca-content/src/lib/components/libraries/libraries.component.html @@ -1,6 +1,8 @@
-

{{ 'APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.TITLE' | translate }}

+

+ {{ selectedRowItemsCount < 1 ? ('APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.TITLE' | translate) : ('APP.HEADER.SELECTED' | translate: { count: selectedRowItemsCount }) }} +

@@ -18,6 +20,7 @@

{{ 'APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.TITLE' | t [sortingMode]="'client'" [imageResolver]="imageResolver" [isResizingEnabled]="true" + (selectedItemsCountChanged)="onSelectedItemsCountChanged($event)" [blurOnResize]="false" (node-dblclick)="handleNodeClick($event)" (name-click)="handleNodeClick($event)" diff --git a/projects/aca-content/src/lib/components/recent-files/recent-files.component.html b/projects/aca-content/src/lib/components/recent-files/recent-files.component.html index ef06f8ed9b..08cf5ed67a 100644 --- a/projects/aca-content/src/lib/components/recent-files/recent-files.component.html +++ b/projects/aca-content/src/lib/components/recent-files/recent-files.component.html @@ -1,6 +1,8 @@
-

{{ 'APP.BROWSE.RECENT.TITLE' | translate }}

+

+ {{ selectedRowItemsCount < 1 ? ('APP.BROWSE.RECENT.TITLE' | translate) : ('APP.HEADER.SELECTED' | translate: { count: selectedRowItemsCount }) }} +

@@ -18,6 +20,7 @@

{{ 'APP.BROWSE.RECENT.TITLE' | translate }}

[sortingMode]="'client'" [imageResolver]="imageResolver" [isResizingEnabled]="true" + (selectedItemsCountChanged)="onSelectedItemsCountChanged($event)" [blurOnResize]="false" (node-dblclick)="handleNodeClick($event)" (name-click)="handleNodeClick($event)" diff --git a/projects/aca-content/src/lib/components/shared-files/shared-files.component.html b/projects/aca-content/src/lib/components/shared-files/shared-files.component.html index f896aacd78..2ea23d66c1 100644 --- a/projects/aca-content/src/lib/components/shared-files/shared-files.component.html +++ b/projects/aca-content/src/lib/components/shared-files/shared-files.component.html @@ -1,6 +1,9 @@
-

{{ 'APP.BROWSE.SHARED.TITLE' | translate }}

+

+ {{ selectedRowItemsCount < 1 ? ('APP.BROWSE.SHARED.TITLE' | translate) : ('APP.HEADER.SELECTED' | translate: { count: selectedRowItemsCount }) }} +

+
@@ -17,6 +20,7 @@

{{ 'APP.BROWSE.SHARED.TITLE' | translate }}

[imageResolver]="imageResolver" [sortingMode]="'client'" [isResizingEnabled]="true" + (selectedItemsCountChanged)="onSelectedItemsCountChanged($event)" [blurOnResize]="false" (node-dblclick)="handleNodeClick($event)" (name-click)="handleNodeClick($event)" diff --git a/projects/aca-content/src/lib/components/trashcan/trashcan.component.html b/projects/aca-content/src/lib/components/trashcan/trashcan.component.html index 5e9f75849f..b22dec43ef 100644 --- a/projects/aca-content/src/lib/components/trashcan/trashcan.component.html +++ b/projects/aca-content/src/lib/components/trashcan/trashcan.component.html @@ -1,6 +1,9 @@
-

{{ 'APP.BROWSE.TRASHCAN.TITLE' | translate }}

+

+ {{ selectedRowItemsCount < 1 ? ('APP.BROWSE.TRASHCAN.TITLE' | translate) : ('APP.HEADER.SELECTED' | translate: { count: selectedRowItemsCount }) }} +

+
@@ -16,6 +19,7 @@

{{ 'APP.BROWSE.TRASHCAN.TITLE' | translate }}

[navigate]="false" [sortingMode]="'client'" [imageResolver]="imageResolver" + (selectedItemsCountChanged)="onSelectedItemsCountChanged($event)" [sorting]="['archivedAt', 'desc']" [isResizingEnabled]="true" [blurOnResize]="false" diff --git a/projects/aca-content/src/lib/ui/theme.scss b/projects/aca-content/src/lib/ui/theme.scss index 0600543ee9..83de1a6a91 100644 --- a/projects/aca-content/src/lib/ui/theme.scss +++ b/projects/aca-content/src/lib/ui/theme.scss @@ -49,6 +49,15 @@ mat-toolbar.mat-toolbar.mat-toolbar-single-row { } } +.mat-checkbox-indeterminate, +.mat-checkbox-checked { + &.mat-accent { + .mat-checkbox-background { + background-color: var(--theme-blue-checkbox-color); + } + } +} + .adf-property-field { .adf-textitem-edit-icon.mat-icon { color: var(--theme-secondary-text); diff --git a/projects/aca-content/src/lib/ui/variables/variables.scss b/projects/aca-content/src/lib/ui/variables/variables.scss index aa2e77f543..eab087d6d1 100644 --- a/projects/aca-content/src/lib/ui/variables/variables.scss +++ b/projects/aca-content/src/lib/ui/variables/variables.scss @@ -25,6 +25,7 @@ $grey-background: rgba(33, 33, 33, 0.12); $grey-text-background: rgba(33, 33, 33, 0.05); $grey-hover-background: rgba(33, 33, 33, 0.24); $blue-save-button-background: #1f74db; +$blue-checkbox-background: #0a60ce; $black-heading: #4e4c4c; $theme-dropdown-background: darken($background-color, 5%); $theme-dropdown-background-hover: darken($background-color, 10%); @@ -67,6 +68,7 @@ $defaults: ( --theme-grey-background-color: $grey-background, --theme-grey-hover-background-color: $grey-hover-background, --theme-blue-button-color: $blue-save-button-background, + --theme-blue-checkbox-color: $blue-save-button-background, --theme-heading-color: $black-heading, --theme-dropdown-color: $theme-dropdown-background, --theme-dropdown-background-hover: $theme-dropdown-background-hover, diff --git a/projects/aca-shared/src/lib/components/document-base-page/document-base-page.component.ts b/projects/aca-shared/src/lib/components/document-base-page/document-base-page.component.ts index fe17f45c29..61b438431a 100644 --- a/projects/aca-shared/src/lib/components/document-base-page/document-base-page.component.ts +++ b/projects/aca-shared/src/lib/components/document-base-page/document-base-page.component.ts @@ -70,6 +70,7 @@ export abstract class PageComponent implements OnInit, OnDestroy, OnChanges { filterSorting = 'name-asc'; createActions: Array = []; isSmallScreen = false; + selectedRowItemsCount = 0; protected extensions = inject(AppExtensionService); protected content = inject(DocumentBasePageService); @@ -162,6 +163,10 @@ export abstract class PageComponent implements OnInit, OnDestroy, OnChanges { } } + onSelectedItemsCountChanged(count: number) { + this.selectedRowItemsCount = count; + } + getParentNodeId(): string { return this.node ? this.node.id : null; }