mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-08-07 17:48:54 +00:00
Use the activiti people with the new look and feel inside the demo shell (#2008)
This commit is contained in:
committed by
Eugenio Romano
parent
beba80d8e8
commit
88114952c2
@@ -24,3 +24,10 @@
|
|||||||
.activiti-task-details__action-button {
|
.activiti-task-details__action-button {
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.people-dialog {
|
||||||
|
position: fixed;
|
||||||
|
top: 50%;
|
||||||
|
transform: translate(0, -50%);
|
||||||
|
width: 40%;
|
||||||
|
}
|
||||||
|
@@ -20,12 +20,7 @@
|
|||||||
</activiti-task-header>
|
</activiti-task-header>
|
||||||
<div *ngIf="showHeaderContent" class="mdl-grid">
|
<div *ngIf="showHeaderContent" class="mdl-grid">
|
||||||
<div *ngIf="showInvolvePeople" class="mdl-cell mdl-cell--4-col">
|
<div *ngIf="showInvolvePeople" class="mdl-cell mdl-cell--4-col">
|
||||||
<activiti-people
|
<button type="button" md-button md-raised-button (click)="showPeopleDialog()">{{'TASK_DETAILS.LABELS.INVOLVED_PEOPLE'|translate}}</button>
|
||||||
[iconImageUrl]="peopleIconImageUrl"
|
|
||||||
[people]="taskPeople"
|
|
||||||
[readOnly]="readOnlyForm"
|
|
||||||
[taskId]="taskDetails.id">
|
|
||||||
</activiti-people>
|
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="showComments" class="mdl-cell mdl-cell--4-col">
|
<div *ngIf="showComments" class="mdl-cell mdl-cell--4-col">
|
||||||
<activiti-comments #activiticomments
|
<activiti-comments #activiticomments
|
||||||
@@ -74,4 +69,16 @@
|
|||||||
<button type="button" class="mdl-button" (click)="closeErrorDialog()">{{'TASK_DETAILS.ERROR.CLOSE'|translate}}</button>
|
<button type="button" class="mdl-button" (click)="closeErrorDialog()">{{'TASK_DETAILS.ERROR.CLOSE'|translate}}</button>
|
||||||
</div>
|
</div>
|
||||||
</dialog>
|
</dialog>
|
||||||
|
<dialog class="mdl-dialog people-dialog" #dialogPeople>
|
||||||
|
<div class="mdl-dialog__content">
|
||||||
|
<activiti-people
|
||||||
|
[iconImageUrl]="peopleIconImageUrl"
|
||||||
|
[people]="taskPeople"
|
||||||
|
[readOnly]="readOnlyForm"
|
||||||
|
[taskId]="taskDetails.id">
|
||||||
|
</activiti-people>
|
||||||
|
<br><br>
|
||||||
|
<button type="button" md-button md-raised-button (click)="closePeopleDialog()">{{'TASK_DETAILS.ERROR.CLOSE'|translate}}</button>
|
||||||
|
</div>
|
||||||
|
</dialog>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -35,6 +35,7 @@ import { FormService, FormModel, FormOutcomeEvent, ContentLinkModel } from 'ng2-
|
|||||||
import { TaskQueryRequestRepresentationModel } from '../models/filter.model';
|
import { TaskQueryRequestRepresentationModel } from '../models/filter.model';
|
||||||
|
|
||||||
declare var require: any;
|
declare var require: any;
|
||||||
|
declare let dialogPolyfill: any;
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'activiti-task-details',
|
selector: 'activiti-task-details',
|
||||||
@@ -52,6 +53,9 @@ export class ActivitiTaskDetails implements OnInit, OnChanges {
|
|||||||
@ViewChild('errorDialog')
|
@ViewChild('errorDialog')
|
||||||
errorDialog: DebugElement;
|
errorDialog: DebugElement;
|
||||||
|
|
||||||
|
@ViewChild('dialogPeople')
|
||||||
|
peopleDialog: any;
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
debugMode: boolean = false;
|
debugMode: boolean = false;
|
||||||
|
|
||||||
@@ -289,6 +293,19 @@ export class ActivitiTaskDetails implements OnInit, OnChanges {
|
|||||||
this.errorDialog.nativeElement.close();
|
this.errorDialog.nativeElement.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public showPeopleDialog() {
|
||||||
|
if (!this.peopleDialog.nativeElement.showModal) {
|
||||||
|
dialogPolyfill.registerDialog(this.peopleDialog.nativeElement);
|
||||||
|
}
|
||||||
|
this.peopleDialog.nativeElement.showModal();
|
||||||
|
}
|
||||||
|
|
||||||
|
public closePeopleDialog() {
|
||||||
|
if (this.peopleDialog) {
|
||||||
|
this.peopleDialog.nativeElement.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onClaimTask(taskId: string) {
|
onClaimTask(taskId: string) {
|
||||||
this.loadDetails(taskId);
|
this.loadDetails(taskId);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user