* [ADF-2847] Added class members heading to content services docs * [ADF-2847] Updated all prop/method tables in content services
4.3 KiB
Added, Status, Last reviewed
Added | Status | Last reviewed |
---|---|---|
v2.1.0 | Active | 2018-03-13 |
Content Node Dialog service
Displays and manages dialogs for selecting content to open, copy or upload.
Class members
Methods
-
close()
Closes the currently open dialog.-
getTitleTranslation(action: string = null, name: string = null): string
-
action: string = null
- -
name: string = null
- Name of the item on which the action is being performed -
Returns
string
-
-
-
openCopyMoveDialog(action: string = null, contentEntry: MinimalNodeEntryEntity = null, permission?: string = null): Observable<MinimalNodeEntryEntity[]>
action: string = null
-contentEntry: MinimalNodeEntryEntity = null
-permission?: string = null
- (Optional) Permission for the operation- Returns
Observable<MinimalNodeEntryEntity[]>
-
-
openFileBrowseDialogByFolderId(folderNodeId: string = null): Observable<MinimalNodeEntryEntity[]>
folderNodeId: string = null
- ID of the folder to use- Returns
Observable<MinimalNodeEntryEntity[]>
-
-
openFileBrowseDialogBySite(): Observable<MinimalNodeEntryEntity[]>
Opens a file browser at a chosen site location.- Returns
Observable<MinimalNodeEntryEntity[]>
-
- Returns
-
openFolderBrowseDialogByFolderId(folderNodeId: string = null): Observable<MinimalNodeEntryEntity[]>
folderNodeId: string = null
- ID of the folder to use- Returns
Observable<MinimalNodeEntryEntity[]>
-
-
openFolderBrowseDialogBySite(): Observable<MinimalNodeEntryEntity[]>
Opens a folder browser at a chosen site location.- Returns
Observable<MinimalNodeEntryEntity[]>
-
- Returns
-
openLockNodeDialog(contentEntry: MinimalNodeEntryEntity = null): Subject<string>
Opens a lock node dialogcontentEntry: MinimalNodeEntryEntity = null
- Node to lock- Returns
Subject<string>
-
-
openUploadFileDialog(action: string = null, contentEntry: MinimalNodeEntryEntity = null): Observable<MinimalNodeEntryEntity[]>
action: string = null
-contentEntry: MinimalNodeEntryEntity = null
- Item to upload- Returns
Observable<MinimalNodeEntryEntity[]>
-
-
openUploadFolderDialog(action: string = null, contentEntry: MinimalNodeEntryEntity = null): Observable<MinimalNodeEntryEntity[]>
action: string = null
-contentEntry: MinimalNodeEntryEntity = null
- Item to upload- Returns
Observable<MinimalNodeEntryEntity[]>
-
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: MinimalNodeEntryEntity[]) => {
// 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
MinimalNodeEntryEntity object (returned from a previous
dialog operation, say) or be set to one of the well-known names "-my-" , "-shared-" or
"-root-".
The openCopyMoveDialog
and openUploadXXX
methods require the following parameters:
Name | Type | Description |
---|---|---|
action | string | The label for the confirm button of the dialog. |
contentEntry | MinimalNodeEntryEntity | The node we want to be copied/moved or uploaded. |
neededPermissionForAction | string | (openCopyMoveDialog only) Permission required to perform the relative action (eg: copy will need the 'update' permission ). |