#487 display text widget

This commit is contained in:
Denys Vuika
2016-07-28 09:18:23 +01:00
parent f06bb0be37
commit 037825f0cf
5 changed files with 43 additions and 1 deletions

View File

@@ -40,6 +40,9 @@
<div *ngSwitchCase="'readonly'">
<display-value-widget [field]="field"></display-value-widget>
</div>
<div *ngSwitchCase="'readonly-text'">
<display-text-widget [field]="field"></display-text-widget>
</div>
<div *ngSwitchDefault>
<span>UNKNOWN WIDGET TYPE: {{field.type}}</span>
</div>

View File

@@ -0,0 +1 @@
.display-text-widget {}

View File

@@ -0,0 +1,3 @@
<div class="display-text-widget">
<span>{{field.value}}</span>
</div>

View File

@@ -0,0 +1,32 @@
/*!
* @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 } from '@angular/core';
import { WidgetComponent } from './../widget.component';
declare let __moduleName: string;
declare var componentHandler;
@Component({
moduleId: __moduleName,
selector: 'display-text-widget',
templateUrl: './display-text.widget.html',
styleUrls: ['./display-text.widget.css']
})
export class DisplayTextWidget extends WidgetComponent {
}

View File

@@ -26,6 +26,7 @@ import { DropdownWidget } from './dropdown/dropdown.widget';
import { HyperlinkWidget } from './hyperlink/hyperlink.widget';
import { RadioButtonsWidget } from './radio-buttons/radio-buttons.widget';
import { DisplayValueWidget } from './display-value/display-value.widget';
import { DisplayTextWidget } from './display-text/display-text.widget';
// core
export * from './widget.component';
@@ -46,6 +47,7 @@ export * from './dropdown/dropdown.widget';
export * from './hyperlink/hyperlink.widget';
export * from './radio-buttons/radio-buttons.widget';
export * from './display-value/display-value.widget';
export * from './display-text/display-text.widget';
export const CONTAINER_WIDGET_DIRECTIVES: [any] = [
TabsWidget,
@@ -60,7 +62,8 @@ export const PRIMITIVE_WIDGET_DIRECTIVES: [any] = [
DropdownWidget,
HyperlinkWidget,
RadioButtonsWidget,
DisplayValueWidget
DisplayValueWidget,
DisplayTextWidget
];