mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ACS-3888] Correct role for new version dialog (#7965)
* [ACS-3888] Correct role for new version dialog * [ACS-3888] Correct role for move/copy dialog * [ACS-3888] Unit test fix
This commit is contained in:
@@ -66,7 +66,8 @@ describe('ContentNodeSelectorComponent', () => {
|
||||
keydownEvents: () => of(null),
|
||||
backdropClick: () => of(null),
|
||||
close: jasmine.createSpy('close'),
|
||||
afterClosed: () => of(null)
|
||||
afterClosed: () => of(null),
|
||||
afterOpened: () => of(null)
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@@ -23,6 +23,7 @@ import { Node } from '@alfresco/js-api';
|
||||
import { ContentNodeSelectorComponentData } from './content-node-selector.component-data.interface';
|
||||
import { NodeEntryEvent } from '../document-list/components/node.event';
|
||||
import { NodeAction } from '../document-list/models/node-action.enum';
|
||||
import { OverlayContainer } from '@angular/cdk/overlay';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-content-node-selector',
|
||||
@@ -50,6 +51,7 @@ export class ContentNodeSelectorComponent implements OnInit {
|
||||
private notificationService: NotificationService,
|
||||
private uploadService: UploadService,
|
||||
private dialog: MatDialogRef<ContentNodeSelectorComponent>,
|
||||
private overlayContainer: OverlayContainer,
|
||||
@Inject(MAT_DIALOG_DATA) public data: ContentNodeSelectorComponentData) {
|
||||
this.action = data.actionName ?? NodeAction.CHOOSE;
|
||||
this.buttonActionName = `NODE_SELECTOR.${this.action}`;
|
||||
@@ -71,6 +73,10 @@ export class ContentNodeSelectorComponent implements OnInit {
|
||||
this.close();
|
||||
});
|
||||
|
||||
this.dialog.afterOpened().subscribe(() => {
|
||||
this.overlayContainer.getContainerElement().setAttribute('role', 'main');
|
||||
});
|
||||
|
||||
this.uploadService.fileUploadStarting.subscribe(() => {
|
||||
this.uploadStarted = true;
|
||||
});
|
||||
@@ -78,6 +84,7 @@ export class ContentNodeSelectorComponent implements OnInit {
|
||||
|
||||
close() {
|
||||
this.dialog.close();
|
||||
this.overlayContainer.getContainerElement().setAttribute('role', 'region');
|
||||
}
|
||||
|
||||
onSelect(nodeList: Node[]) {
|
||||
|
Reference in New Issue
Block a user