[ACA-537] remove permission check on toolbar options (#74)

This commit is contained in:
Cilibiu Bogdan
2017-11-21 18:28:18 +02:00
committed by Denys Vuika
parent 4cb51469ab
commit 025210fcce
2 changed files with 9 additions and 12 deletions

View File

@@ -58,7 +58,6 @@
<button
mat-menu-item
*ngIf="canMove(documentList.selection)"
[app-move-node]="documentList.selection">
<mat-icon>library_books</mat-icon>
<span>{{ 'APP.ACTIONS.MOVE' | translate }}</span>
@@ -66,7 +65,6 @@
<button
mat-menu-item
*ngIf="canDelete(documentList.selection)"
[app-delete-node]="documentList.selection">
<mat-icon>delete</mat-icon>
<span>{{ 'APP.ACTIONS.DELETE' | translate }}</span>

View File

@@ -34,9 +34,7 @@ export class FavoritesComponent extends PageComponent implements OnInit, OnDestr
@ViewChild(DocumentListComponent)
documentList: DocumentListComponent;
private onEditFolder: Subscription;
private onMoveNode: Subscription;
private onToggleFavorite: Subscription;
private subscriptions: any = [];
constructor(
private router: Router,
@@ -47,16 +45,17 @@ export class FavoritesComponent extends PageComponent implements OnInit, OnDestr
}
ngOnInit() {
this.onEditFolder = this.contentService.folderEdit.subscribe(() => this.refresh());
this.onMoveNode = this.content.moveNode.subscribe(() => this.refresh());
this.onToggleFavorite = this.content.toggleFavorite
.debounceTime(300).subscribe(() => this.refresh());
this.subscriptions = this.subscriptions.concat([
this.content.deleteNode.subscribe(() => this.refresh()),
this.content.restoreNode.subscribe(() => this.refresh()),
this.contentService.folderEdit.subscribe(() => this.refresh()),
this.content.moveNode.subscribe(() => this.refresh()),
this.content.toggleFavorite.debounceTime(300).subscribe(() => this.refresh())
]);
}
ngOnDestroy() {
this.onEditFolder.unsubscribe();
this.onMoveNode.unsubscribe();
this.onToggleFavorite.unsubscribe();
this.subscriptions.forEach(s => s.unsubscribe());
}
fetchNodes(): void {