mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
Close the dialog when the activiti content preview is cliecked (#1792)
This commit is contained in:
parent
f75e2b05ea
commit
548054c05e
@ -31,6 +31,7 @@ import { ActivitiForm } from './activiti-form.component';
|
|||||||
import { FormService } from './../services/form.service';
|
import { FormService } from './../services/form.service';
|
||||||
import { WidgetVisibilityService } from './../services/widget-visibility.service';
|
import { WidgetVisibilityService } from './../services/widget-visibility.service';
|
||||||
import { FormOutcomeModel } from './widgets/core/index';
|
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.
|
* 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()
|
@Output()
|
||||||
outcomeClick: EventEmitter<any> = new EventEmitter<any>();
|
outcomeClick: EventEmitter<any> = new EventEmitter<any>();
|
||||||
|
|
||||||
|
@Output()
|
||||||
|
formContentClicked: EventEmitter<ContentLinkModel> = new EventEmitter<ContentLinkModel>();
|
||||||
|
|
||||||
@ViewChild('outcomesContainer', {})
|
@ViewChild('outcomesContainer', {})
|
||||||
outcomesContainer: ElementRef = null;
|
outcomesContainer: ElementRef = null;
|
||||||
|
|
||||||
@ -91,6 +95,12 @@ export class ActivitiStartForm extends ActivitiForm implements AfterViewChecked,
|
|||||||
this.showTitle = false;
|
this.showTitle = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this.formService.formContentClicked.subscribe((content: ContentLinkModel) => {
|
||||||
|
this.formContentClicked.emit(content);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
ngOnChanges(changes: SimpleChanges) {
|
||||||
let processDefinitionId = changes['processDefinitionId'];
|
let processDefinitionId = changes['processDefinitionId'];
|
||||||
if (processDefinitionId && processDefinitionId.currentValue) {
|
if (processDefinitionId && processDefinitionId.currentValue) {
|
||||||
|
@ -75,7 +75,8 @@
|
|||||||
<h4 class="mdl-dialog__title">{{ 'DETAILS.LABELS.START_FORM'|translate }}</h4>
|
<h4 class="mdl-dialog__title">{{ 'DETAILS.LABELS.START_FORM'|translate }}</h4>
|
||||||
<div class="mdl-dialog__content form__size">
|
<div class="mdl-dialog__content form__size">
|
||||||
<activiti-start-form [processId]="processId" [processDefinitionId]="processInstanceDetails?.processDefinitionId"
|
<activiti-start-form [processId]="processId" [processDefinitionId]="processInstanceDetails?.processDefinitionId"
|
||||||
[showRefreshButton]="false" [readOnlyForm]="true" >
|
[showRefreshButton]="false" [readOnlyForm]="true"
|
||||||
|
(formContentClicked)='onFormContentClick($event)'>
|
||||||
</activiti-start-form>
|
</activiti-start-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="mdl-dialog__actions">
|
<div class="mdl-dialog__actions">
|
||||||
|
@ -183,4 +183,10 @@ export class ActivitiProcessInstanceTasks implements OnInit, OnChanges {
|
|||||||
onRefreshClicked() {
|
onRefreshClicked() {
|
||||||
this.load(this.processInstanceDetails.id);
|
this.load(this.processInstanceDetails.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onFormContentClick() {
|
||||||
|
if (this.startDialog) {
|
||||||
|
this.startDialog.nativeElement.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user