mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACA-1045] use ADF favorite node directive (#118)
This commit is contained in:
committed by
Denys Vuika
parent
6625ddf845
commit
8424fc8cdb
@@ -33,10 +33,10 @@
|
||||
class="secondary-options">
|
||||
<button
|
||||
mat-menu-item
|
||||
#favorite="favorite"
|
||||
[app-favorite-node]="documentList.selection">
|
||||
<mat-icon [ngClass]="{ 'icon-highlight': favorite.hasFavorites() }">
|
||||
{{ favorite.hasFavorites() ? 'star' :'star_border' }}
|
||||
#selection="adfFavorite"
|
||||
[adf-node-favorite]="documentList.selection">
|
||||
<mat-icon [ngClass]="{ 'icon-highlight': selection.hasFavorites() }">
|
||||
{{ selection.hasFavorites() ? 'star' :'star_border' }}
|
||||
</mat-icon>
|
||||
<span>{{ 'APP.ACTIONS.FAVORITE' | translate }}</span>
|
||||
</button>
|
||||
|
@@ -98,14 +98,6 @@ describe('RecentFiles Routed Component', () => {
|
||||
expect(component.refresh).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should reload on toggleFavorite event', () => {
|
||||
fixture.detectChanges();
|
||||
|
||||
contentService.toggleFavorite.next();
|
||||
|
||||
expect(component.refresh).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should reload on move node event', () => {
|
||||
fixture.detectChanges();
|
||||
|
||||
|
@@ -46,8 +46,7 @@ export class RecentFilesComponent extends PageComponent implements OnInit, OnDes
|
||||
this.subscriptions = this.subscriptions.concat([
|
||||
this.content.deleteNode.subscribe(() => this.refresh()),
|
||||
this.content.moveNode.subscribe(() => this.refresh()),
|
||||
this.content.restoreNode.subscribe(() => this.refresh()),
|
||||
this.content.toggleFavorite.subscribe(() => this.refresh())
|
||||
this.content.restoreNode.subscribe(() => this.refresh())
|
||||
]);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user