mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-3854] Destination picker - exclude site content option (#4130)
This commit is contained in:
committed by
Eugenio Romano
parent
6be1cf56e3
commit
c17241fedc
@@ -32,6 +32,14 @@ import { switchMap } from 'rxjs/operators';
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ContentNodeDialogService {
|
||||
static nonDocumentSiteContent = [
|
||||
'blog',
|
||||
'calendar',
|
||||
'dataLists',
|
||||
'discussions',
|
||||
'links',
|
||||
'wiki'
|
||||
];
|
||||
|
||||
/** Emitted when an error occurs. */
|
||||
@Output()
|
||||
@@ -117,9 +125,10 @@ export class ContentNodeDialogService {
|
||||
* @param action Name of the action (eg, "Copy" or "Move") to show in the title
|
||||
* @param contentEntry Item to be copied or moved
|
||||
* @param permission Permission for the operation
|
||||
* @param excludeSiteContent The site content that should be filtered out
|
||||
* @returns Information about files that were copied/moved
|
||||
*/
|
||||
openCopyMoveDialog(action: string, contentEntry: Node, permission?: string): Observable<Node[]> {
|
||||
openCopyMoveDialog(action: string, contentEntry: Node, permission?: string, excludeSiteContent?: string[]): Observable<Node[]> {
|
||||
if (this.contentService.hasPermission(contentEntry, permission)) {
|
||||
|
||||
const select = new Subject<Node[]>();
|
||||
@@ -136,6 +145,7 @@ export class ContentNodeDialogService {
|
||||
imageResolver: this.imageResolver.bind(this),
|
||||
rowFilter: this.rowFilter.bind(this, contentEntry.id),
|
||||
isSelectionValid: this.isCopyMoveSelectionValid.bind(this),
|
||||
excludeSiteContent: excludeSiteContent || ContentNodeDialogService.nonDocumentSiteContent,
|
||||
select: select
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user