[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:
Popovics András
2017-07-06 09:45:03 +01:00
committed by Eugenio Romano
parent ee871ba578
commit 843afdbcc6
14 changed files with 214 additions and 46 deletions

View File

@@ -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); });
}
}
}