mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2540] Lock node feature (#3138)
* add adf-node-lock directive * add lock-node service + button in context menu * unit tests * docs * unit tests fix * Remove unnecessary imports * PR changes * Remove fit from tests * Update specific node from list on lock/ulock
This commit is contained in:
committed by
Denys Vuika
parent
7b7e39d989
commit
7d1b4bf14a
@@ -24,6 +24,7 @@ import { ContentActionHandler } from '../models/content-action.model';
|
||||
import { PermissionModel } from '../models/permissions.model';
|
||||
import { DocumentListService } from './document-list.service';
|
||||
import { NodeActionsService } from './node-actions.service';
|
||||
import { ContentNodeDialogService } from '../../content-node-selector/content-node-dialog.service';
|
||||
import 'rxjs/add/observable/throw';
|
||||
|
||||
@Injectable()
|
||||
@@ -36,6 +37,7 @@ export class DocumentActionsService {
|
||||
private handlers: { [id: string]: ContentActionHandler; } = {};
|
||||
|
||||
constructor(private nodeActionsService: NodeActionsService,
|
||||
private contentNodeDialogService: ContentNodeDialogService,
|
||||
private documentListService?: DocumentListService,
|
||||
private contentService?: ContentService) {
|
||||
this.setupActionHandlers();
|
||||
@@ -83,6 +85,11 @@ export class DocumentActionsService {
|
||||
this.handlers['move'] = this.moveNode.bind(this);
|
||||
this.handlers['delete'] = this.deleteNode.bind(this);
|
||||
this.handlers['download'] = this.downloadNode.bind(this);
|
||||
this.handlers['lock'] = this.lockNode.bind(this);
|
||||
}
|
||||
|
||||
private lockNode(node: MinimalNodeEntity, target?: any, permission?: string) {
|
||||
return this.contentNodeDialogService.openLockNodeDialog(node.entry);
|
||||
}
|
||||
|
||||
private downloadNode(obj: MinimalNodeEntity, target?: any, permission?: string) {
|
||||
|
Reference in New Issue
Block a user