Close the dialog when the activiti content preview is cliecked (#1792)

This commit is contained in:
Maurizio Vitale
2017-03-30 18:10:26 +01:00
committed by Denys Vuika
parent 04f343b28f
commit a608bc40a4
3 changed files with 18 additions and 1 deletions

View File

@@ -31,6 +31,7 @@ import { ActivitiForm } from './activiti-form.component';
import { FormService } from './../services/form.service';
import { WidgetVisibilityService } from './../services/widget-visibility.service';
import { FormOutcomeModel } from './widgets/core/index';
import { ContentLinkModel } from './widgets/core/content-link.model';
/**
* Displays the start form for a named process definition, which can be used to retrieve values to start a new process.
@@ -75,6 +76,9 @@ export class ActivitiStartForm extends ActivitiForm implements AfterViewChecked,
@Output()
outcomeClick: EventEmitter<any> = new EventEmitter<any>();
@Output()
formContentClicked: EventEmitter<ContentLinkModel> = new EventEmitter<ContentLinkModel>();
@ViewChild('outcomesContainer', {})
outcomesContainer: ElementRef = null;
@@ -91,6 +95,12 @@ export class ActivitiStartForm extends ActivitiForm implements AfterViewChecked,
this.showTitle = false;
}
ngOnInit() {
this.formService.formContentClicked.subscribe((content: ContentLinkModel) => {
this.formContentClicked.emit(content);
});
}
ngOnChanges(changes: SimpleChanges) {
let processDefinitionId = changes['processDefinitionId'];
if (processDefinitionId && processDefinitionId.currentValue) {