mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
* [ADF-2764] Updated doc files with latest script features * [ADF-2764] Rebuilt full index instead of just content services index
4.5 KiB
4.5 KiB
Added, Status, Last reviewed
Added | Status | Last reviewed |
---|---|---|
v2.1.0 | Active | 2018-05-03 |
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
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
=null
, contentEntry:MinimalNodeEntryEntity
=null
, permission?:string
=null
):Observable<MinimalNodeEntryEntity[]>
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:
MinimalNodeEntryEntity
- Item to be copied or moved - permission:
string
- (Optional)Permission for the operation - Returns
Observable<MinimalNodeEntryEntity[]>
- Information about files that were copied/moved
- action:
- openFileBrowseDialogByFolderId(folderNodeId:
string
=null
):Observable<MinimalNodeEntryEntity[]>
Opens a file browser at a chosen folder location.- folderNodeId:
string
- ID of the folder to use - Returns
Observable<MinimalNodeEntryEntity[]>
- Information about the selected file(s)
- folderNodeId:
- openFileBrowseDialogBySite():
Observable<MinimalNodeEntryEntity[]>
Opens a file browser at a chosen site location.- Returns
Observable<MinimalNodeEntryEntity[]>
- Information about the selected file(s)
- Returns
- openFolderBrowseDialogByFolderId(folderNodeId:
string
=null
):Observable<MinimalNodeEntryEntity[]>
Opens a folder browser at a chosen folder location.- folderNodeId:
string
- ID of the folder to use - Returns
Observable<MinimalNodeEntryEntity[]>
- Information about the selected folder(s)
- folderNodeId:
- openFolderBrowseDialogBySite():
Observable<MinimalNodeEntryEntity[]>
Opens a folder browser at a chosen site location.- Returns
Observable<MinimalNodeEntryEntity[]>
- Information about the selected folder(s)
- Returns
- openLockNodeDialog(contentEntry:
MinimalNodeEntryEntity
=null
):Subject<string>
Opens a lock node dialog.- contentEntry:
MinimalNodeEntryEntity
- Node to lock - Returns
Subject<string>
- Error/status message (if any)
- contentEntry:
- openUploadFileDialog(action:
string
=null
, contentEntry:MinimalNodeEntryEntity
=null
):Observable<MinimalNodeEntryEntity[]>
Opens a dialog to choose a file to upload.- action:
string
- Name of the action to show in the title - contentEntry:
MinimalNodeEntryEntity
- Item to upload - Returns
Observable<MinimalNodeEntryEntity[]>
- Information about the chosen file(s)
- action:
- openUploadFolderDialog(action:
string
=null
, contentEntry:MinimalNodeEntryEntity
=null
):Observable<MinimalNodeEntryEntity[]>
Opens a dialog to choose folders to upload.- action:
string
- Name of the action to show in the title - contentEntry:
MinimalNodeEntryEntity
- Item to upload - Returns
Observable<MinimalNodeEntryEntity[]>
- Information about the chosed folder(s)
- action:
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-".