mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
[ACS-3550] a 11 y aca move copy dialog small correction (#7986)
* ACS-3550 Removed redundant attributes * ACS-3550 Removed redundant code
This commit is contained in:
parent
afc6e19152
commit
d3d917d010
@ -8,11 +8,9 @@
|
||||
class="adf-site-dropdown-list-element"
|
||||
id="site-dropdown"
|
||||
placeholder="{{placeholder | translate}}"
|
||||
[aria-label]="ariaLabel"
|
||||
floatPlaceholder="never"
|
||||
[(value)]="selected"
|
||||
(selectionChange)="selectedSite($event)"
|
||||
role="listbox">
|
||||
(selectionChange)="selectedSite($event)">
|
||||
<mat-option *ngFor="let site of siteList?.list.entries;" [value]="site">
|
||||
{{ site.entry.title | translate}}
|
||||
</mat-option>
|
||||
|
@ -76,7 +76,6 @@ export class DropdownSitesComponent implements OnInit {
|
||||
|
||||
private loading = true;
|
||||
private skipCount = 0;
|
||||
private _ariaLabel = '';
|
||||
|
||||
selected: SiteEntry = null;
|
||||
MY_FILES_VALUE = '-my-';
|
||||
@ -88,16 +87,11 @@ export class DropdownSitesComponent implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.updateAriaLabel(this.selected);
|
||||
if (!this.siteList) {
|
||||
this.loadSiteList();
|
||||
}
|
||||
}
|
||||
|
||||
get ariaLabel(): string {
|
||||
return this._ariaLabel;
|
||||
}
|
||||
|
||||
loadAllOnScroll() {
|
||||
if (this.isInfiniteScrollingEnabled()) {
|
||||
this.loading = true;
|
||||
@ -106,7 +100,6 @@ export class DropdownSitesComponent implements OnInit {
|
||||
}
|
||||
|
||||
selectedSite(event: MatSelectChange) {
|
||||
this.updateAriaLabel(event.value);
|
||||
this.liveAnnouncer.announce(this.translateService.instant('ADF_DROPDOWN.SELECTION_ARIA_LABEL', {
|
||||
placeholder: this.translateService.instant(this.placeholder),
|
||||
selectedOption: this.translateService.instant(event.value.entry.title)
|
||||
@ -155,7 +148,6 @@ export class DropdownSitesComponent implements OnInit {
|
||||
}
|
||||
|
||||
this.selected = this.siteList.list.entries.find((site: SiteEntry) => site.entry.id === this.value);
|
||||
this.updateAriaLabel(this.selected);
|
||||
|
||||
if (this.value && !this.selected && this.siteListHasMoreItems()) {
|
||||
this.loadSiteList();
|
||||
@ -190,8 +182,4 @@ export class DropdownSitesComponent implements OnInit {
|
||||
return site.entry.visibility === 'PUBLIC' ||
|
||||
!!site.relations.members.list.entries.find((member) => member.entry.id.toLowerCase() === loggedUserName.toLowerCase());
|
||||
}
|
||||
|
||||
private updateAriaLabel(site: SiteEntry): void {
|
||||
this._ariaLabel = `${this.translateService.instant(this.placeholder)} ${site ? this.translateService.instant(site.entry.title) : ''}`;
|
||||
}
|
||||
}
|
||||
|
@ -582,6 +582,6 @@
|
||||
},
|
||||
"ADF_DROPDOWN": {
|
||||
"LOADING": "Loading...",
|
||||
"SELECTION_ARIA_LABEL": "{{placeholder}} listbox {{selectedOption}}"
|
||||
"SELECTION_ARIA_LABEL": "{{placeholder}} combobox {{selectedOption}}"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user