diff --git a/ng2-components/ng2-activiti-form/src/components/widgets/container/container.widget.html b/ng2-components/ng2-activiti-form/src/components/widgets/container/container.widget.html index f89403d7f4..b6e828b34a 100644 --- a/ng2-components/ng2-activiti-form/src/components/widgets/container/container.widget.html +++ b/ng2-components/ng2-activiti-form/src/components/widgets/container/container.widget.html @@ -49,6 +49,9 @@
+
+ +
UNKNOWN WIDGET TYPE: {{field.type}}
diff --git a/ng2-components/ng2-activiti-form/src/components/widgets/core/form-field-types.ts b/ng2-components/ng2-activiti-form/src/components/widgets/core/form-field-types.ts index bddb2e3dd2..a43aa1de2e 100644 --- a/ng2-components/ng2-activiti-form/src/components/widgets/core/form-field-types.ts +++ b/ng2-components/ng2-activiti-form/src/components/widgets/core/form-field-types.ts @@ -25,6 +25,8 @@ export class FormFieldTypes { static READONLY_TEXT: string = 'readonly-text'; static UPLOAD: string = 'upload'; static TYPEAHEAD: string = 'typeahead'; + static FUNCTIONAL_GROUP: string = 'functional-group'; + static PEOPLE: string = 'people'; static READONLY_TYPES: string[] = [ FormFieldTypes.HYPERLINK, diff --git a/ng2-components/ng2-activiti-form/src/components/widgets/functional-group/functional-group.widget.css b/ng2-components/ng2-activiti-form/src/components/widgets/functional-group/functional-group.widget.css new file mode 100644 index 0000000000..95e76bb511 --- /dev/null +++ b/ng2-components/ng2-activiti-form/src/components/widgets/functional-group/functional-group.widget.css @@ -0,0 +1,3 @@ +.functional-group-widget { + width: 100%; +} diff --git a/ng2-components/ng2-activiti-form/src/components/widgets/functional-group/functional-group.widget.html b/ng2-components/ng2-activiti-form/src/components/widgets/functional-group/functional-group.widget.html new file mode 100644 index 0000000000..6939b86bd8 --- /dev/null +++ b/ng2-components/ng2-activiti-form/src/components/widgets/functional-group/functional-group.widget.html @@ -0,0 +1,9 @@ +
+ + +
diff --git a/ng2-components/ng2-activiti-form/src/components/widgets/functional-group/functional-group.widget.ts b/ng2-components/ng2-activiti-form/src/components/widgets/functional-group/functional-group.widget.ts new file mode 100644 index 0000000000..9988a6c0d4 --- /dev/null +++ b/ng2-components/ng2-activiti-form/src/components/widgets/functional-group/functional-group.widget.ts @@ -0,0 +1,44 @@ +/*! + * @license + * Copyright 2016 Alfresco Software, Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Component, OnInit } from '@angular/core'; +import { WidgetComponent } from './../widget.component'; + +declare let __moduleName: string; +declare var componentHandler; + +@Component({ + moduleId: __moduleName, + selector: 'functional-group-widget', + templateUrl: './functional-group.widget.html', + styleUrls: ['./functional-group.widget.css'] +}) +export class FunctionalGroupWidget extends WidgetComponent implements OnInit { + + value: string; + + constructor() { + super(); + } + + ngOnInit() { + let group = this.field.value; + if (group) { + this.value = group.name; + } + } +} diff --git a/ng2-components/ng2-activiti-form/src/components/widgets/index.ts b/ng2-components/ng2-activiti-form/src/components/widgets/index.ts index 32d1c765ac..8fa82892fe 100644 --- a/ng2-components/ng2-activiti-form/src/components/widgets/index.ts +++ b/ng2-components/ng2-activiti-form/src/components/widgets/index.ts @@ -29,6 +29,7 @@ import { DisplayValueWidget } from './display-value/display-value.widget'; import { DisplayTextWidget } from './display-text/display-text.widget'; import { UploadWidget } from './upload/upload.widget'; import { TypeaheadWidget } from './typeahead/typeahead.widget'; +import { FunctionalGroupWidget } from './functional-group/functional-group.widget'; // core export * from './widget.component'; @@ -50,6 +51,7 @@ export * from './display-value/display-value.widget'; export * from './display-text/display-text.widget'; export * from './upload/upload.widget'; export * from './typeahead/typeahead.widget'; +export * from './functional-group/functional-group.widget'; export const CONTAINER_WIDGET_DIRECTIVES: [any] = [ TabsWidget, @@ -67,7 +69,8 @@ export const PRIMITIVE_WIDGET_DIRECTIVES: [any] = [ DisplayValueWidget, DisplayTextWidget, UploadWidget, - TypeaheadWidget + TypeaheadWidget, + FunctionalGroupWidget ];