Welcome to the Alfresco Builder Network

Displays and manages dialogs for selecting content to open, copy or upload.

Class members

Methods

  • close()
    Closes the currently open dialog.
  • getTitleTranslation(action: string, name: string): string
    Gets the translation of the dialog title.
    • action: string - Name of the action to display in the dialog title
    • name: string - Name of the item on which the action is being performed
    • Returns string - Translated version of the title
  • openCopyMoveDialog(action: string, contentEntry: Node, permission?: string, excludeSiteContent?: string[]): Observable<Node[]>
    Opens a dialog to copy or move an item to a new location.
    • action: string - Name of the action (eg, "Copy" or "Move") to show in the title
    • contentEntry: Node - Item to be copied or moved
    • permission: string - (Optional) Permission for the operation
    • excludeSiteContent: string[] - (Optional) The site content that should be filtered out
    • Returns Observable<Node[]> - Information about files that were copied/moved
  • openFileBrowseDialogByFolderId(folderNodeId: string): Observable<Node[]>
    Opens a file browser at a chosen folder location.
    • folderNodeId: string - ID of the folder to use
    • Returns Observable<Node[]> - Information about the selected file(s)
  • openFileBrowseDialogBySite(): Observable<Node[]>
    Opens a file browser at a chosen site location.
  • openFolderBrowseDialogByFolderId(folderNodeId: string): Observable<Node[]>
    Opens a folder browser at a chosen folder location.
    • folderNodeId: string - ID of the folder to use
    • Returns Observable<Node[]> - Information about the selected folder(s)
  • openFolderBrowseDialogBySite(): Observable<Node[]>
    Opens a folder browser at a chosen site location.
  • openLockNodeDialog(contentEntry: Node): Subject<string>
    Opens a lock node dialog.
    • contentEntry: Node - Node to lock
    • Returns Subject<string> - Error/status message (if any)
  • openUploadFileDialog(action: string, contentEntry: Node): Observable<Node[]>
    Opens a dialog to choose a file to upload.
    • action: string - Name of the action to show in the title
    • contentEntry: Node - Item to upload
    • Returns Observable<Node[]> - Information about the chosen file(s)
  • openUploadFolderDialog(action: string, contentEntry: Node): Observable<Node[]>
    Opens a dialog to choose folders to upload.
    • action: string - Name of the action to show in the title
    • contentEntry: Node - Item to upload
    • Returns Observable<Node[]> - Information about the chosen folder(s)

Details

The openXXX methods return an Observable that you can subscribe to in order to get the information from the result:

import { ContentNodeDialogService } from '@adf/content-services'


constructor(private contentDialogService: ContentNodeDialogService){}

yourFunctionOnCopyOrMove(){
        this.contentDialogService
            .openCopyMoveDialog(actionName, targetNode, neededPermissionForAction)
            .subscribe((selections: MinimalNode[]) => {
                // place your action here on operation success!
            });
}

The openXXXByFolderId methods let you set the initial folder location of the browser using a folder ID string. This can be obtained from the id property of a MinimalNode object (returned from a previous dialog operation, say) or be set to one of the well-known names "-my-" , "-shared-" or "-root-".

See Also

Interested in trying Alfresco?

Try Now