mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[ADF-897] - ActivitiPeopleList - use the adf prefix (#2001)
* Use the adf as prexif instead of activiti * Fix typo * Fix wrong import
This commit is contained in:
committed by
Eugenio Romano
parent
f1f6c5095e
commit
859bf7a01d
@@ -37,7 +37,7 @@ import {
|
||||
ActivitiPeopleSearch,
|
||||
TaskAttachmentListComponent,
|
||||
ActivitiCreateTaskAttachmentComponent,
|
||||
ActivitiPeopleList
|
||||
PeopleList
|
||||
} from './src/components/index';
|
||||
|
||||
export * from './src/components/index';
|
||||
@@ -59,7 +59,7 @@ export const ACTIVITI_TASKLIST_DIRECTIVES: any[] = [
|
||||
ActivitiPeopleSearch,
|
||||
TaskAttachmentListComponent,
|
||||
ActivitiCreateTaskAttachmentComponent,
|
||||
ActivitiPeopleList
|
||||
PeopleList
|
||||
];
|
||||
|
||||
export const ACTIVITI_TASKLIST_PROVIDERS: any[] = [
|
||||
|
||||
+5
-5
@@ -24,7 +24,7 @@
|
||||
|
||||
.mdl-chip-search-people:hover{
|
||||
background-color: #c1c1c1;
|
||||
cursor: pointer;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.mdl-chip-search-people img{
|
||||
@@ -46,7 +46,7 @@
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
activiti-people-list >>> alfresco-datatable >>> thead {
|
||||
adf-people-list >>> alfresco-datatable >>> thead {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -66,11 +66,11 @@ activiti-people-list >>> alfresco-datatable >>> thead {
|
||||
color: rgb(255, 152, 0);
|
||||
}
|
||||
|
||||
activiti-people-list >>> alfresco-datatable >>> .people-full-name {
|
||||
adf-people-list >>> alfresco-datatable >>> .people-full-name {
|
||||
font-family: 'Muli';
|
||||
}
|
||||
|
||||
activiti-people-list >>> alfresco-datatable >>> .people-pic {
|
||||
adf-people-list >>> alfresco-datatable >>> .people-pic {
|
||||
background: #ffc800;
|
||||
padding: 10px 6px;
|
||||
border-radius: 100px;
|
||||
@@ -83,7 +83,7 @@ activiti-people-list >>> alfresco-datatable >>> .people-pic {
|
||||
min-width: 30px;
|
||||
}
|
||||
|
||||
activiti-people-list >>> alfresco-datatable >>> td.mdl-data-table__cell--non-numeric.non-selectable.data-cell{
|
||||
adf-people-list >>> alfresco-datatable >>> td.mdl-data-table__cell--non-numeric.non-selectable.data-cell{
|
||||
padding: 4px 12px;
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -6,7 +6,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-list-container" id="search-people-list" *ngIf="hasUsers()">
|
||||
<activiti-people-list
|
||||
<adf-people-list
|
||||
[users]="users"
|
||||
(clickRow)="onRowClick($event)">
|
||||
<data-columns>
|
||||
@@ -21,7 +21,7 @@
|
||||
</ng-template>
|
||||
</data-column>
|
||||
</data-columns>
|
||||
</activiti-people-list>
|
||||
</adf-people-list>
|
||||
</div>
|
||||
<div class="search-list-action-container">
|
||||
<button type="button" id="close-people-search" (click)="closeSearchList()" class="mdl-button close">
|
||||
@@ -30,4 +30,4 @@
|
||||
<button type="button" id="add-people" (click)="addInvolvedUser()" class="mdl-button close">
|
||||
{{'PEOPLE.ADD_USER' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { CoreModule, AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||
import { ActivitiPeopleSearch } from './activiti-people-search.component';
|
||||
import { ActivitiPeopleList } from './activiti-people-list.component';
|
||||
import { PeopleList } from './adf-people-list.component';
|
||||
import { DataTableModule } from 'ng2-alfresco-datatable';
|
||||
import { User } from '../models/user.model';
|
||||
|
||||
@@ -56,7 +56,7 @@ describe('ActivitiPeopleSearch', () => {
|
||||
],
|
||||
declarations: [
|
||||
ActivitiPeopleSearch,
|
||||
ActivitiPeopleList
|
||||
PeopleList
|
||||
]
|
||||
}).compileComponents().then(() => {
|
||||
|
||||
|
||||
@@ -40,24 +40,24 @@
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
activiti-people-list >>> alfresco-datatable >>> thead {
|
||||
adf-people-list >>> alfresco-datatable >>> thead {
|
||||
display: none;
|
||||
}
|
||||
|
||||
activiti-people-list >>> alfresco-datatable >>> .people-full-name {
|
||||
adf-people-list >>> alfresco-datatable >>> .people-full-name {
|
||||
font-family: 'Muli';
|
||||
}
|
||||
|
||||
activiti-people-list >>> alfresco-datatable >>> .people-email {
|
||||
adf-people-list >>> alfresco-datatable >>> .people-email {
|
||||
font-family: 'Muli';
|
||||
opacity: 0.54;
|
||||
}
|
||||
|
||||
activiti-people-list >>> alfresco-datatable >>> .people-edit-label {
|
||||
adf-people-list >>> alfresco-datatable >>> .people-edit-label {
|
||||
font-family: 'Muli';
|
||||
}
|
||||
|
||||
activiti-people-list >>> alfresco-datatable >>> .people-pic {
|
||||
adf-people-list >>> alfresco-datatable >>> .people-pic {
|
||||
background: #ffc800;
|
||||
padding: 12px 10px;
|
||||
border-radius: 100px;
|
||||
@@ -69,6 +69,6 @@ activiti-people-list >>> alfresco-datatable >>> .people-pic {
|
||||
text-transform: uppercase
|
||||
}
|
||||
|
||||
activiti-people-list >>> alfresco-datatable >>> td.mdl-data-table__cell--non-numeric.non-selectable.data-cell{
|
||||
adf-people-list >>> alfresco-datatable >>> td.mdl-data-table__cell--non-numeric.non-selectable.data-cell{
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</activiti-people-search>
|
||||
</div>
|
||||
<div class="assignment-list-container" id="assignment-people-list" *ngIf="hasPeople()">
|
||||
<activiti-people-list
|
||||
<adf-people-list
|
||||
[users]="people"
|
||||
[actions]="isEditMode()"
|
||||
(clickAction)="onClickAction($event)">
|
||||
@@ -37,6 +37,6 @@
|
||||
</ng-template>
|
||||
</data-column>
|
||||
</data-columns>
|
||||
</activiti-people-list>
|
||||
</adf-people-list>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { CoreModule, AlfrescoTranslationService, LogService } from 'ng2-alfresco-core';
|
||||
import { ActivitiPeopleSearch } from './activiti-people-search.component';
|
||||
import { ActivitiPeopleList } from './activiti-people-list.component';
|
||||
import { PeopleList } from './adf-people-list.component';
|
||||
import { ActivitiPeople } from './activiti-people.component';
|
||||
import { DataTableModule } from 'ng2-alfresco-datatable';
|
||||
import { User } from '../models/user.model';
|
||||
@@ -58,7 +58,7 @@ describe('ActivitiPeople', () => {
|
||||
],
|
||||
declarations: [
|
||||
ActivitiPeopleSearch,
|
||||
ActivitiPeopleList,
|
||||
PeopleList,
|
||||
ActivitiPeople
|
||||
],
|
||||
providers: [
|
||||
|
||||
+13
-13
@@ -18,7 +18,7 @@
|
||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { CoreModule, AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||
import { ActivitiPeopleList } from './activiti-people-list.component';
|
||||
import { PeopleList } from './adf-people-list.component';
|
||||
import { User, UserEventModel } from '../models/index';
|
||||
import { DataTableModule, ObjectDataRow, DataRowEvent, DataRowActionEvent } from 'ng2-alfresco-datatable';
|
||||
|
||||
@@ -31,10 +31,10 @@ const fakeUser: User = new User({
|
||||
email: 'fake@mail.com'
|
||||
});
|
||||
|
||||
describe('ActivitiPeopleList', () => {
|
||||
describe('PeopleList', () => {
|
||||
|
||||
let activitiPeopleListComponent: ActivitiPeopleList;
|
||||
let fixture: ComponentFixture<ActivitiPeopleList>;
|
||||
let peopleListComponent: PeopleList;
|
||||
let fixture: ComponentFixture<PeopleList>;
|
||||
let element: HTMLElement;
|
||||
let componentHandler;
|
||||
|
||||
@@ -45,7 +45,7 @@ describe('ActivitiPeopleList', () => {
|
||||
DataTableModule
|
||||
],
|
||||
declarations: [
|
||||
ActivitiPeopleList
|
||||
PeopleList
|
||||
]
|
||||
}).compileComponents().then(() => {
|
||||
|
||||
@@ -53,8 +53,8 @@ describe('ActivitiPeopleList', () => {
|
||||
spyOn(translateService, 'addTranslationFolder').and.stub();
|
||||
spyOn(translateService.translate, 'get').and.callFake((key) => { return Observable.of(key); });
|
||||
|
||||
fixture = TestBed.createComponent(ActivitiPeopleList);
|
||||
activitiPeopleListComponent = fixture.componentInstance;
|
||||
fixture = TestBed.createComponent(PeopleList);
|
||||
peopleListComponent = fixture.componentInstance;
|
||||
element = fixture.nativeElement;
|
||||
componentHandler = jasmine.createSpyObj('componentHandler', [
|
||||
'upgradeAllRegistered'
|
||||
@@ -69,15 +69,15 @@ describe('ActivitiPeopleList', () => {
|
||||
let row = new ObjectDataRow(fakeUser);
|
||||
let rowEvent = new DataRowEvent(row, null);
|
||||
|
||||
activitiPeopleListComponent.clickRow.subscribe(selectedUser => {
|
||||
peopleListComponent.clickRow.subscribe(selectedUser => {
|
||||
expect(selectedUser.id).toEqual('1');
|
||||
expect(selectedUser.email).toEqual('fake@mail.com');
|
||||
expect(activitiPeopleListComponent.user.id).toEqual('1');
|
||||
expect(activitiPeopleListComponent.user.email).toEqual('fake@mail.com');
|
||||
expect(peopleListComponent.user.id).toEqual('1');
|
||||
expect(peopleListComponent.user.email).toEqual('fake@mail.com');
|
||||
done();
|
||||
});
|
||||
|
||||
activitiPeopleListComponent.selectUser(rowEvent);
|
||||
peopleListComponent.selectUser(rowEvent);
|
||||
});
|
||||
|
||||
it('should emit row action event', (done) => {
|
||||
@@ -88,13 +88,13 @@ describe('ActivitiPeopleList', () => {
|
||||
};
|
||||
let rowActionEvent = new DataRowActionEvent(row, removeObj);
|
||||
|
||||
activitiPeopleListComponent.clickAction.subscribe((selectedAction: UserEventModel) => {
|
||||
peopleListComponent.clickAction.subscribe((selectedAction: UserEventModel) => {
|
||||
expect(selectedAction.type).toEqual('remove');
|
||||
expect(selectedAction.value.id).toEqual('1');
|
||||
expect(selectedAction.value.email).toEqual('fake@mail.com');
|
||||
done();
|
||||
});
|
||||
|
||||
activitiPeopleListComponent.onExecuteRowAction(rowActionEvent);
|
||||
peopleListComponent.onExecuteRowAction(rowActionEvent);
|
||||
});
|
||||
});
|
||||
+4
-4
@@ -23,12 +23,12 @@ import { DataTableComponent } from 'ng2-alfresco-datatable';
|
||||
declare let componentHandler: any;
|
||||
|
||||
@Component({
|
||||
selector: 'activiti-people-list',
|
||||
templateUrl: './activiti-people-list.component.html',
|
||||
styleUrls: ['./activiti-people-list.component.css']
|
||||
selector: 'adf-people-list',
|
||||
templateUrl: './adf-people-list.component.html',
|
||||
styleUrls: ['./adf-people-list.component.css']
|
||||
})
|
||||
|
||||
export class ActivitiPeopleList {
|
||||
export class PeopleList {
|
||||
|
||||
@ContentChild(DataColumnListComponent) columnList: DataColumnListComponent;
|
||||
|
||||
@@ -28,4 +28,4 @@ export * from './activiti-task-details.component';
|
||||
export * from './activiti-start-task.component';
|
||||
export * from './activiti-people-search.component';
|
||||
export * from './adf-create-task-attachment.component';
|
||||
export * from './activiti-people-list.component';
|
||||
export * from './adf-people-list.component';
|
||||
|
||||
Reference in New Issue
Block a user