mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-1968] fix packaging issues i18n and assets (#2665)
* fix packaging issues i18n and assets * remove other not used fodler
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Component, Inject, OnInit } from '@angular/core';
|
||||
import { FormModel, FormService, LogService } from '@alfresco/adf-core';
|
||||
import { FormModel, FormService } from '@alfresco/adf-core';
|
||||
import { InMemoryFormService } from '../../services/in-memory-form.service';
|
||||
import { DemoForm } from './demo-form';
|
||||
|
||||
@@ -32,12 +32,8 @@ export class FormComponent implements OnInit {
|
||||
|
||||
form: FormModel;
|
||||
|
||||
constructor(@Inject(FormService) private formService: InMemoryFormService, private logSevice: LogService) {
|
||||
// Prevent default outcome actions
|
||||
formService.executeOutcome.subscribe(e => {
|
||||
e.preventDefault();
|
||||
this.logSevice.log(e.outcome);
|
||||
});
|
||||
constructor(@Inject(FormService) private formService: InMemoryFormService) {
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { AppConfigService, AlfrescoApiService, EcmModelService, LogService, FormFieldOption, FormService } from '@alfresco/adf-core';
|
||||
import { AppConfigService, AlfrescoApiService, EcmModelService, LogService, FormFieldOption, FormService, FormValues, FormModel, FormOutcomeModel } from '@alfresco/adf-core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
interface ActivitiData {
|
||||
@@ -62,6 +62,23 @@ export class InMemoryFormService extends FormService {
|
||||
});
|
||||
}
|
||||
|
||||
parseForm(json: any, data?: FormValues, readOnly: boolean = false): FormModel {
|
||||
if (json) {
|
||||
let form = new FormModel(json, data, readOnly, this);
|
||||
if (!json.fields) {
|
||||
form.outcomes = [
|
||||
new FormOutcomeModel(form, {
|
||||
id: '$custom',
|
||||
name: FormOutcomeModel.SAVE_ACTION,
|
||||
isSystem: true
|
||||
})
|
||||
];
|
||||
}
|
||||
return form;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/** @override */
|
||||
getRestFieldValuesByProcessId(processDefinitionId: string, fieldId: string): Observable<any> {
|
||||
// Uncomment this to use original call
|
||||
|
Reference in New Issue
Block a user