mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-1041] Node picker, first iteration (#2122)
* First try * Dialog basic functionality * Search input * Hammering it together * Fist working proto for copy * Fix the tests and tslint errors for a happier world * Add more tests (and test shells for the future) * copyNode and moveNode methods * Copy and move actions for content type * Extract common parts in favor of using them in folder content type also * Small fixes * Copy and Move actions for folders as well * Style fixes, ui behaviours and tests needed to be written * Move duplicated search service from documentlist to core * Use search service from core within the search component * Fix dialog width * Update docs * Tests for node selector * Change seletionMade event's name to select
This commit is contained in:
committed by
Eugenio Romano
parent
952da3ab99
commit
4fd8bfb875
@@ -65,6 +65,28 @@ export class DocumentListService {
|
||||
return Observable.fromPromise(this.apiService.getInstance().nodes.deleteNode(nodeId));
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy a node to destination node
|
||||
*
|
||||
* @param nodeId The id of the node to be copied
|
||||
* @param targetParentId The id of the folder-node where the node have to be copied to
|
||||
*/
|
||||
copyNode(nodeId: string, targetParentId: string) {
|
||||
return Observable.fromPromise(this.apiService.getInstance().nodes.copyNode(nodeId, { targetParentId }))
|
||||
.catch(err => this.handleError(err));
|
||||
}
|
||||
|
||||
/**
|
||||
* Move a node to destination node
|
||||
*
|
||||
* @param nodeId The id of the node to be moved
|
||||
* @param targetParentId The id of the folder-node where the node have to be moved to
|
||||
*/
|
||||
moveNode(nodeId: string, targetParentId: string) {
|
||||
return Observable.fromPromise(this.apiService.getInstance().nodes.moveNode(nodeId, { targetParentId }))
|
||||
.catch(err => this.handleError(err));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new folder in the path.
|
||||
* @param name Folder name
|
||||
|
Reference in New Issue
Block a user