Merge development branch

# Conflicts:
#	ng2-components/ng2-activiti-tasklist/index.ts
#
ng2-components/ng2-activiti-tasklist/src/components/activiti-filters.com
ponent.spec.ts
#
ng2-components/ng2-activiti-tasklist/src/components/activiti-task-detail
s.component.ts
#
ng2-components/ng2-activiti-tasklist/src/components/activiti-tasklist.co
mponent.spec.ts
#	ng2-components/ng2-alfresco-login/demo/package.json
This commit is contained in:
Denys Vuika
2016-09-26 09:55:38 +01:00
61 changed files with 1891 additions and 153 deletions

View File

@@ -68,33 +68,43 @@ export class ActivitiProcessFilters implements OnInit, OnChanges {
this.filters.push(filter);
});
this.load();
this.getFilters(this.appId, this.appName);
}
ngOnChanges(changes: SimpleChanges) {
let appId = changes['appId'];
if (appId && appId.currentValue) {
this.load();
if (appId && (appId.currentValue || appId.currentValue === null)) {
this.getFiltersByAppId(appId.currentValue);
return;
}
let appName = changes['appName'];
if (appName && appName.currentValue) {
this.getFiltersByAppName(appName.currentValue);
return;
}
}
/**
* The method call the adapter data table component for render the task list
* @param tasks
* Return the task list filtered by appId or by appName
* @param appId
* @param appName
*/
private load() {
this.resetFilter();
if (this.appName) {
this.filterByAppName();
getFilters(appId?: string, appName?: string) {
if (appName) {
this.getFiltersByAppName(appName);
} else {
this.filterByAppId(this.appId);
this.getFiltersByAppId(appId);
}
}
private filterByAppId(appId) {
/**
* Return the filter list filtered by appId
* @param appId - optional
*/
getFiltersByAppId(appId?: string) {
this.activiti.getProcessFilters(appId).subscribe(
(res: FilterRepresentationModel[]) => {
this.resetFilter();
res.forEach((filter) => {
this.filterObserver.next(filter);
});
@@ -108,10 +118,14 @@ export class ActivitiProcessFilters implements OnInit, OnChanges {
);
}
private filterByAppName() {
this.activiti.getDeployedApplications(this.appName).subscribe(
/**
* Return the filter list filtered by appName
* @param appName
*/
getFiltersByAppName(appName: string) {
this.activiti.getDeployedApplications(appName).subscribe(
application => {
this.filterByAppId(application.id);
this.getFiltersByAppId(application.id);
this.selectFirstFilter();
},
(err) => {

View File

@@ -12,7 +12,7 @@
<label class="mdl-textfield__label" for="processDefinition">{{'START_PROCESS.DIALOG.LABEL.TYPE'|translate}}</label>
</div>
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" [(ngModel)]="name" rows="1" id="processName" />
<input class="mdl-textfield__input" type="text" [(ngModel)]="name" id="processName" />
<label class="mdl-textfield__label" for="processName">{{'START_PROCESS.DIALOG.LABEL.NAME'|translate}}</label>
</div>
</div>