mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-10-01 14:41:14 +00:00
move search button to extensions
This commit is contained in:
committed by
Sheena Malhotra
parent
be64da15ef
commit
52cbf442d4
@@ -21,6 +21,5 @@
|
||||
</div>
|
||||
</mat-menu>
|
||||
|
||||
<adf-toolbar-divider *ngIf="canShowSearchSeparator()"></adf-toolbar-divider>
|
||||
<aca-search-input class="app-search-input"></aca-search-input>
|
||||
</adf-toolbar>
|
||||
|
@@ -78,8 +78,4 @@ export class HeaderActionsComponent implements OnInit, OnDestroy {
|
||||
canShowUploadButton(): boolean {
|
||||
return this.uploadActions.length > 0;
|
||||
}
|
||||
|
||||
canShowSearchSeparator(): boolean {
|
||||
return this.canShowUploadButton() || this.canShowCreateButton();
|
||||
}
|
||||
}
|
||||
|
@@ -28,13 +28,6 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<div *ngIf="!searchInputService.isSearchRoute()"
|
||||
class="app-search-container">
|
||||
<button mat-icon-button class="app-search-button" (click)="navigateToSearch()" [title]="'SEARCH.BUTTON.TOOLTIP' | translate">
|
||||
<mat-icon [attr.aria-label]="'SEARCH.BUTTON.ARIA-LABEL' | translate">search</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<mat-menu #searchOptionsMenu="matMenu" [overlapTrigger]="true" class="app-search-options-menu">
|
||||
<div (keydown.tab)="$event.stopPropagation()" (keydown.shift.tab)="$event.stopPropagation()">
|
||||
<div cdkTrapFocus>
|
||||
|
@@ -210,26 +210,6 @@ describe('SearchInputComponent', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('navigateToSearch()', () => {
|
||||
it('should navigate to search on click of search icon', async () => {
|
||||
spyOn(searchInputService, 'isSearchRoute').and.returnValue(false);
|
||||
spyOn(component, 'navigateToSearch').and.callThrough();
|
||||
spyOn(searchInputService, 'navigateToSearch').and.callThrough();
|
||||
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
|
||||
const searchIcon = fixture.debugElement.nativeElement.querySelector('.app-search-button');
|
||||
searchIcon.click();
|
||||
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
|
||||
expect(component.navigateToSearch).toHaveBeenCalled();
|
||||
expect(searchInputService.navigateToSearch).toHaveBeenCalledWith();
|
||||
});
|
||||
});
|
||||
|
||||
describe('exitSearch()', () => {
|
||||
it('should exit search on click of close icon', async () => {
|
||||
spyOn(searchInputService, 'isSearchRoute').and.returnValue(true);
|
||||
|
@@ -111,10 +111,6 @@ export class SearchInputComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
}
|
||||
|
||||
navigateToSearch() {
|
||||
this.searchInputService.navigateToSearch();
|
||||
}
|
||||
|
||||
exitSearch() {
|
||||
this.searchInputService.navigateBack();
|
||||
}
|
||||
|
Reference in New Issue
Block a user