mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[ACS-5725]fixed failing e2es
This commit is contained in:
committed by
Anukriti Singh
parent
1c4c508381
commit
35791f6828
+5
-5
@@ -16,12 +16,12 @@
|
||||
{{ 'CORE.METADATA.BASIC.HEADER' | translate }}
|
||||
</mat-panel-title>
|
||||
</div>
|
||||
<button *ngIf="!editable"
|
||||
<button *ngIf="!editable && !readOnly && hasAllowableOperations()"
|
||||
mat-icon-button
|
||||
(click)="toggleGeneralEdit($event)"
|
||||
[attr.title]="'CORE.METADATA.ACTIONS.EDIT' | translate"
|
||||
[attr.aria-label]="'CORE.METADATA.ACCESSIBILITY.EDIT' | translate"
|
||||
data-automation-id="meta-data-card-toggle-generalInfo-edit"
|
||||
data-automation-id="meta-data-generalInfo-edit"
|
||||
class="adf-edit-icon-buttons">
|
||||
<mat-icon>mode_edit</mat-icon>
|
||||
</button>
|
||||
@@ -29,7 +29,7 @@
|
||||
class="adf-metadata-action-buttons">
|
||||
<button mat-icon-button
|
||||
(click)="cancelGeneralInfoChanges($event)"
|
||||
data-automation-id="reset-general-metadata">
|
||||
data-automation-id="reset-metadata">
|
||||
<mat-icon>clear</mat-icon>
|
||||
</button>
|
||||
<button mat-icon-button
|
||||
@@ -174,7 +174,7 @@
|
||||
class="adf-metadata-grouped-properties-container">
|
||||
<mat-expansion-panel
|
||||
[attr.data-automation-id]="'adf-metadata-group-' + group.title"
|
||||
[expanded]="group.expanded"
|
||||
[expanded]="canExpandTheCard(group) || !displayDefaultProperties && first || group.expanded"
|
||||
(opened)="group.expanded= true"
|
||||
(closed)="group.expanded= false"
|
||||
hideToggle>
|
||||
@@ -187,7 +187,7 @@
|
||||
{{ group.title | translate }}
|
||||
</mat-panel-title>
|
||||
</div>
|
||||
<button *ngIf="!group.editable"
|
||||
<button *ngIf="!group.editable && !readOnly && hasAllowableOperations()"
|
||||
mat-icon-button
|
||||
[attr.title]="'CORE.METADATA.ACTIONS.EDIT' | translate"
|
||||
[attr.aria-label]="'CORE.METADATA.ACCESSIBILITY.EDIT' | translate"
|
||||
|
||||
+7
-1
@@ -45,6 +45,7 @@ import { TagService } from '../../../tag/services/tag.service';
|
||||
import { CategoryService } from '../../../category/services/category.service';
|
||||
import { CategoriesManagementMode } from '../../../category/categories-management/categories-management-mode';
|
||||
import { MatExpansionPanel } from '@angular/material/expansion';
|
||||
import { AllowableOperationsEnum, ContentService } from '../../../common';
|
||||
|
||||
const DEFAULT_SEPARATOR = ', ';
|
||||
|
||||
@@ -158,7 +159,8 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
|
||||
private appConfig: AppConfigService,
|
||||
private tagService: TagService,
|
||||
private categoryService: CategoryService,
|
||||
private cdr: ChangeDetectorRef
|
||||
private cdr: ChangeDetectorRef,
|
||||
private contentService: ContentService,
|
||||
) {
|
||||
this.copyToClipboardAction = this.appConfig.get<boolean>('content-metadata.copy-to-clipboard-action');
|
||||
this.multiValueSeparator = this.appConfig.get<string>('content-metadata.multi-value-pipe-separator') || DEFAULT_SEPARATOR;
|
||||
@@ -423,6 +425,10 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
|
||||
return !this.expanded || this.displayAspect === 'Properties';
|
||||
}
|
||||
|
||||
hasAllowableOperations() {
|
||||
return this.contentService.hasAllowableOperations(this.node, AllowableOperationsEnum.UPDATE);
|
||||
}
|
||||
|
||||
keyDown(event: KeyboardEvent) {
|
||||
if (event.keyCode === 37 || event.keyCode === 39) { // ArrowLeft && ArrowRight
|
||||
event.stopPropagation();
|
||||
|
||||
Reference in New Issue
Block a user