mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-523] Fix delete operation in the search component (#2020)
* Search delete permission notification fix * Support content deletion inside search results * Forgotten broken test fix. * Update alfresco-document-list READDME.md * Update alfresco-document-list READDME.md II * Adding TOC to README.md * Build fix * Fix the build for now and ever!
This commit is contained in:
committed by
Eugenio Romano
parent
ee871ba578
commit
843afdbcc6
@@ -19,7 +19,7 @@ import {
|
||||
Component, OnInit, Input, OnChanges, Output, SimpleChanges, EventEmitter, ElementRef,
|
||||
AfterContentInit, TemplateRef, NgZone, ViewChild, HostListener, ContentChild
|
||||
} from '@angular/core';
|
||||
import { Subject } from 'rxjs/Rx';
|
||||
import { Subject, Observable } from 'rxjs/Rx';
|
||||
import { MinimalNodeEntity, MinimalNodeEntryEntity, NodePaging, Pagination } from 'alfresco-js-api';
|
||||
import { AlfrescoTranslationService, DataColumnListComponent } from 'ng2-alfresco-core';
|
||||
import {
|
||||
@@ -343,7 +343,17 @@ export class DocumentListComponent implements OnInit, OnChanges, AfterContentIni
|
||||
*/
|
||||
executeContentAction(node: MinimalNodeEntity, action: ContentActionModel) {
|
||||
if (node && node.entry && action) {
|
||||
action.handler(node, this, action.permission);
|
||||
let handlerSub;
|
||||
|
||||
if (typeof action.handler === 'function') {
|
||||
handlerSub = action.handler(node, this, action.permission);
|
||||
} else {
|
||||
handlerSub = Observable.of(true);
|
||||
}
|
||||
|
||||
if (typeof action.execute === 'function') {
|
||||
handlerSub.subscribe(() => { action.execute(node); });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user