Title | Added | Status | Last reviewed |
---|---|---|---|
Content Node Dialog service |
v2.1.0 |
Active |
2018-11-14 |
Displays and manages dialogs for selecting content to open, copy or upload.
- 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
- action:
- 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
- action:
- 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)
- folderNodeId:
- openFileBrowseDialogBySite():
Observable
<
Node
[]>
Opens a file browser at a chosen site location.- Returns
Observable
<
Node
[]>
- Information about the selected file(s)
- Returns
- 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)
- folderNodeId:
- openFolderBrowseDialogBySite():
Observable
<
Node
[]>
Opens a folder browser at a chosen site location.- Returns
Observable
<
Node
[]>
- Information about the selected folder(s)
- Returns
- openLockNodeDialog(contentEntry:
Node
):Subject
<string>
Opens a lock node dialog. - 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)
- action:
- 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)
- action:
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-".