mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[AAE-3405] - Optimise attach file widget UI (#6271)
* Optimise attach file widget UI * Show filter button only when there are custom models
This commit is contained in:
@@ -47,6 +47,7 @@ import { NodeEntryEvent, ShareDataRow } from '../document-list';
|
||||
import { Subject } from 'rxjs';
|
||||
import { SEARCH_QUERY_SERVICE_TOKEN } from '../search/search-query-service.token';
|
||||
import { SearchQueryBuilderService } from '../search/search-query-builder.service';
|
||||
import { ContentNodeSelectorPanelService } from './content-node-selector-panel.service';
|
||||
|
||||
export type ValidationFunction = (entry: Node) => boolean;
|
||||
|
||||
@@ -240,6 +241,8 @@ export class ContentNodeSelectorPanelComponent implements OnInit, OnDestroy {
|
||||
target: PaginatedComponent;
|
||||
preselectNodes: NodeEntry[] = [];
|
||||
|
||||
searchPanelExpanded: boolean = false;
|
||||
|
||||
private onDestroy$ = new Subject<boolean>();
|
||||
|
||||
constructor(private customResourcesService: CustomResourcesService,
|
||||
@@ -247,7 +250,8 @@ export class ContentNodeSelectorPanelComponent implements OnInit, OnDestroy {
|
||||
private userPreferencesService: UserPreferencesService,
|
||||
private nodesApiService: NodesApiService,
|
||||
private uploadService: UploadService,
|
||||
private sitesService: SitesService) {
|
||||
private sitesService: SitesService,
|
||||
private contentNodeSelectorPanelService: ContentNodeSelectorPanelService) {
|
||||
}
|
||||
|
||||
set chosenNode(value: Node[]) {
|
||||
@@ -317,6 +321,14 @@ export class ContentNodeSelectorPanelComponent implements OnInit, OnDestroy {
|
||||
this.onDestroy$.complete();
|
||||
}
|
||||
|
||||
toggleSearchPanel() {
|
||||
this.searchPanelExpanded = !this.searchPanelExpanded;
|
||||
}
|
||||
|
||||
hasCustomModels(): boolean {
|
||||
return this.contentNodeSelectorPanelService?.customModels?.length > 0;
|
||||
}
|
||||
|
||||
private onFileUploadEvent() {
|
||||
this.uploadService.fileUploadComplete
|
||||
.pipe(
|
||||
|
Reference in New Issue
Block a user